Skip to main content
A transaction records a completed sale. Numeral files and remits tax based on the transactions recorded in each jurisdiction and period. Create one from a calculation after the customer pays. Record returns against it as refunds.
Where transactions fit

The Transaction object

Attributes

string
The ID of the transaction, tr_…. Store it: refunds and lookups use it.
string, value is "tax.transaction"
String representing the object’s type.
string
The calculation this transaction was created from.
string
Your order ID, as sent when creating the transaction.
string
Your payment ID. Empty when not set. Returned by the GET endpoints.
string
ISO 4217 currency the customer paid in.
string
Currency the tax on this transaction will be filed in.
number
Exchange rate from the customer currency to the filing currency. 0 when they’re the same. Returned by the GET endpoints.
string
The address the tax was calculated for. address_line_2 (can be null), address_city, address_province, address_postal_code and address_country follow the same pattern. Returned by the GET endpoints.
array of objects
The line items from the calculation.
string
Numeral-generated ID for this line item. Use it in partial refunds.
object
reference_line_item_id, reference_product_id, reference_product_name and product_tax_code, as on the calculation.
array of objects
One row per taxing jurisdiction: tax_rate, tax_due_decimal, fee_amount, rate_type, tax_authority_name, tax_authority_type, tax_type, and note. Same fields as on the calculation.
string
New in 2026-11-01. Why this row came out the way it did. Empty string for normally calculated tax. See Notes. Transactions created before this version was released may return an empty note.
integer
Tax on the line, in the currency’s smallest unit.
integer
Line amount before tax.
integer
Line amount including tax.
number
Quantity sold.
string
Sale type for the line, e.g. b2c.
timestamp
Unix seconds when the sale was made.
string
PURCHASE for a sale. Returned by the GET endpoints.
timestamp
Unix seconds when the transaction was recorded. updated_at follows the same pattern. Returned by the GET endpoints.
boolean
true if made with a test API key. Live transactions count toward your nexus totals, and Numeral files them where you’re registered.
object
Key-value pairs from the request, echoed unchanged. Only present when sent.
Transactions don’t have an effective_tax_rate. Use the one on the calculation, or divide tax_amount by amount_excluding_tax.
The Transaction object

Create a transaction

Records a sale from a calculation. Create it after the customer pays and before the calculation expires (24 hours). Try it in the API reference.The transaction comes back in the shape of the X-API-Version you send now, whatever version the calculation was made on.

Parameters

string
required
The id of the calculation to record.
string
required
Your order ID. Must be unique across your transactions.
integer
When the sale was made, Unix seconds. Defaults to now.
object
String key-value pairs, echoed back in the response.

Returns

A Transaction object, without the GET-only fields.
POST /tax/transactions
Response

Retrieve a transaction

Returns a transaction by its id.
string
required
The transaction’s id.

Returns

A Transaction object.
GET /tax/transactions/:id

List transactions for an order

Returns the transactions recorded with a given reference_order_id.
string
required
Your order ID.

Returns

An object with a transactions array of Transaction objects.
GET /tax/transactions
Response

Delete a transaction

Deletes a transaction, for example one recorded by mistake. To record a return, create a refund instead.
string
required
The transaction’s id.

Returns

The deleted object type and when it was deleted.
DELETE /tax/transactions/:id
Response

The Refund object

A refund records money returned to the customer against a transaction. Amounts are negative.

Attributes

string
The ID of the refund, ref_tr_…. Store it: reversing the refund needs it.
string, value is "tax.refund"
String representing the object’s type.
enum
full or partial. Returned when the refund is created.
timestamp
Unix seconds when the refund was made.
boolean
true if made with a test API key.
array of objects
The refunded line items. Same fields as the transaction’s line items.
array of objects
The original sale’s rows, including note, with the sale’s rates and tax_due_decimal.
integer
Tax refunded on this line (negative).
integer
Sale amount refunded on this line (negative).
integer
Total refunded on this line (negative).
number
Quantity refunded.
The Refund object

Create a refund

Records a full or partial refund against a transaction. Try it in the API reference.

Parameters

string
required
The id of the transaction to refund.
enum
required
full refunds everything. partial refunds the line_items you send.
integer
When the refund was made, Unix seconds. Defaults to now.
array of objects
Required for partial refunds.
string
The transaction line to refund. Or identify it by reference_product_id.
string
The product to refund, matched against the original transaction’s lines.
integer
required
Sale amount refunded, excluding tax, as a negative number in the currency’s smallest unit.
integer
required
Tax refunded, as a negative number.
number
required
Quantity refunded.
string
Your line item ID, used only for reporting.

Returns

A Refund object.
POST /tax/refunds

List refunds for a transaction

Returns every refund recorded against a transaction.
string
required
The transaction’s id.

Returns

An object with a refunds array of Refund objects, without refund_type.
GET /tax/transactions/:id/refunds
Response

Reverse a refund

Undoes a refund you created, for example one recorded by mistake.
string
required
The id of the refund to reverse.

Returns

A Refund object for the reversal.
POST /tax/refund_reversals

Errors

Errors return code, type, and message. Handle them by type. Full list in Error Codes.
404