Update transaction
Update a transaction’s status, reference ID, and tax amount. For draft transactions, also update line items, discounts, currency, and transaction date.
Partial updates
This endpoint only updates the fields you provide; omitted fields are left unchanged.Draft-only fields
These fields can only be updated while the transaction is indraft status, and updating any of them re-runs the tax calculation:
line_items— provide the full list. It replaces the existing line items entirely; there are no partial line-item updates. Use it to add, remove, or edit line items.discount_amount,vendor_discount_amountcurrencytransaction_date
400.Authorizations
Path Parameters
Body
Update transaction request model.
Status of the transaction.
draft, finalized, void, filed "draft"
Reference number for the transaction for your internal use.
"INV-123"
The currency of the transaction. Can only be updated while the transaction is in draft status.
3"USD"
Amount of discount applied to the transaction. Can only be updated while the transaction is in draft status.
"100"
Amount of discount applied to the vendor in the transaction. Can only be updated while the transaction is in draft status.
"100"
Date and time for the tax calculation. Can only be updated while the transaction is in draft status.
"2024-03-15T12:00:00Z"
List of line items for the transaction. Can only be updated while the transaction is in draft status.
[
{
"id": "item_123",
"quantity": "1",
"unit_price": "100"
}
]
Amount of tax provided by the customer
"100"
Response
Successful Response
Transaction response model.
Unique identifier for the transaction
"txn_123"
Date at which the transaction record was created
Date at which the transaction record was last updated
Amount of tax collected to be reported, filed, and remitted. Defaults to tax_amount if provided, otherwise it defaults to tax_calculation.tax_amount
"100"
Source of the filing tax amount. Defaults to provided if a tax_amount is provided, otherwise it defaults to calculated
provided, calculated "provided"
"calculated"
Status of the transaction. Draft will exist for 24hrs
draft, finalized, void, filed "draft"
"finalized"
"void"
"filed"
Tax calculation for the transaction
The currency of the transaction. Defaults to USD. The currency must be a valid ISO 4217 currency code.
3"USD"
Amount of discount applied to the transaction. Amount is expressed in the currency of the transaction and in denominations of the smallest unit of the currency, such as cents for USD. e.g: "100" would be 100 cents or $1.00 in a USD transaction.
"100"
Amount of discount applied to the vendor in the transaction. Most of the time, you should use the discount_amount field instead. Unlike discount_amount, this discount is funded by the vendor and typically does not reduce the taxable base of the transaction. Amount is expressed in the currency of the transaction and in denominations of the smallest unit of the currency, such as cents for USD. e.g: "100" would be 100 cents or $1.00 in a USD transaction.
"100"
List of line items for an invoice or transaction. Required for sale transactions, optional for credits. A credit transaction without line_items will be assumed to be a full refund of the invoice.
[
{
"customer": {
"address": {
"city": "Anytown",
"line1": "123 Main St",
"postal_code": "12345",
"state": "CA"
},
"tax_ids": [
{
"country": "DE",
"type": "eu_vat",
"value": "DE123456789"
}
]
},
"id": "item_123",
"product": {
"tax_attributes": [
"DIGITAL_PROPERTY.DIGITAL_SOFTWARE._DOWNLOADED"
]
},
"quantity": "1",
"unit_price": "100"
}
]
ID of the parent transaction. Used for credits on previous invoices.
"txn_123"
Reference number for the transaction for your internal use.
"INV-123"
Type of the transaction
sale, credit "sale"
"credit"
Amount of tax passed in the request: the amount provided. Amount is expressed in the currency of the transaction and in denominations of the smallest unit of the currency, such as cents for USD. e.g: 100 would be 100 cents or $1.00 in a USD transaction.
"100"