Skip to navigation

Commit and refund transactions

Move a transaction through its lifecycle so records stay filing-ready.

View as Markdown

A recorded transaction (SalesInvoice) moves through a lifecycle: it’s created, committed for reporting, and later adjusted, voided, or refunded as orders change. Each action is a dedicated endpoint scoped to a company and transaction code.

Commit

Committing marks a transaction as final so it’s included in returns and reports.

POST
/api/v2/companies/:companyCode/transactions/:transactionCode/commit
curl -X POST https://rest.avatax.com/api/v2/companies/companyCode/transactions/transactionCode/commit \
-H "Authorization: <apiKey>" \
-H "Content-Type: application/json-patch+json" \
-d '{
"commit": true
}'

Void

Void a transaction that should never have been recorded — a cancelled order, for example. Voided documents are excluded from reporting.

POST
/api/v2/companies/:companyCode/transactions/:transactionCode/void
curl -X POST https://rest.avatax.com/api/v2/companies/companyCode/transactions/transactionCode/void \
-H "Authorization: <apiKey>" \
-H "Content-Type: application/json-patch+json" \
-d '{
"code": "DocVoided"
}'

Pass a code describing why:

{ "code": "DocVoided" }

Refund

Issue a refund against a committed invoice. AvaTax creates a linked ReturnInvoice with the reversed tax.

POST
/api/v2/companies/:companyCode/transactions/:transactionCode/refund
curl -X POST https://rest.avatax.com/api/v2/companies/companyCode/transactions/transactionCode/refund \
-H "Authorization: <apiKey>" \
-H "Content-Type: application/json-patch+json" \
-d '{
"refundDate": "2026-07-06",
"refundTransactionCode": "2bcc9dd4-a822-4edc-86fc-e93130e3d8fe",
"refundType": "Full",
"referenceCode": "Refund for a committed transaction"
}'
Full refund of a plant order
{
"refundTransactionCode": "INV-1001-R",
"refundType": "Full",
"refundDate": "2026-07-10"
}

Choosing the right action

Use adjust to replace the document’s lines while keeping the same transaction code and history.

Use void with the DocVoided reason so the transaction drops out of reporting entirely.

Use refund to record the reversed tax as a linked return, preserving the original invoice.

Void and refund are not interchangeable. Voiding erases the record; refunding preserves the original invoice and books an offsetting return. Choose based on whether money actually moved.