Skip to content
Last updated

Cancel, void, and refund

Both operations go to POST /v1/transactions/{id}/cancel. The body decides which one you get.

VoidRefund
Use it whenThe transaction has not settledThe transaction has settled
Body{"type": "VOID"}{"type": "REFUND", "amount": …}
AmountAlways the full originalFull or partial
The cardholder seesUsually nothing, or a hold disappearingA credit on their statement
SettlesNever. The transaction leaves the batchAs a separate credit

Void when you can, refund when you must. A void removes the transaction before it ever reaches the cardholder's statement, which means no charge and no credit to explain. A refund is two visible entries and takes days to reach them.

Which one applies

Read is_settled on the transaction.

  • false — it has not settled. Void it.
  • true — it has settled. Refund it.

Sending a void for a settled transaction fails, and sending a refund for an unsettled one is not the operation you want. When in doubt, read the transaction first with GET /v1/transactions/{id}.

Void

Loading...

A void takes only type. There is no amount field, because a void is always for the full original amount — you cannot void part of a transaction.

Response

The void record. type comes back as CANCEL, which is how a response reports a void, and reference_transaction_id points at the sale that was voided. expiry and cvv_result_code are null because neither is re-checked on a void.

{ "id": "TRANSACTION-01KEW38F2RT6N4Z1AJGV5MPQ82", "reference_transaction_id": "TRANSACTION-01KEW32V6YNV11T33XGDR7TGWC", "type": "CANCEL", "result": "APPROVED", "client_id": "CLIENT-01KFDKXMQ637EKEAY410MSQSXB", "client_dba": "Acme Jewelry", "integrations": [ "TSYS" ], "response_code": "00", "response_description": "Approved", "batch_id": null, "is_settled": false, "time_created": "2026-07-15T17:30:44Z", "amount": 10000, "tip": 0, "tax_amount": null, "currency": "USD", "payment_method": { "type": "CARD", "truncated_pan": "****-****-****-5439", "payment_token": "CARD_TOKEN-01KFDKXMQ637EKEAY410MSQSXB", "expiry": null, "first_name": "John", "last_name": "Doe", "entry_method": "keyed", "auth_code": "123456", "retrieval_reference_number": "000000603076", "card_type": "UNKNOWN", "card_brand": "Visa", "cvv_result_code": null }, "recurring": false, "initiator": "CUSTOMER", "network_transaction_id": "000000004271001", "metadata": { "order_id": "ORD-10432", "sales_channel": "web", "customer_reference": "cust-8891" } }

The result is a new transaction with a type of CANCEL. Note the word: you send VOID and you read CANCEL. Its reference_transaction_id points at the transaction it voided.

Refund

Loading...

amount is required, and it may be less than the original — that example refunds 25.00 of a 100.00 sale. It may not be more.

Response

The refund record. amount is the refunded amount, not the original sale amount. type comes back as REFUND, and reference_transaction_id points at the sale that was refunded. The refund joins the open batch, so its batch_id is null until that batch settles.

{ "id": "TRANSACTION-01KEW3B7XKC9P5W2DMHY6NRS13", "reference_transaction_id": "TRANSACTION-01KEW32V6YNV11T33XGDR7TGWC", "type": "REFUND", "result": "APPROVED", "client_id": "CLIENT-01KFDKXMQ637EKEAY410MSQSXB", "client_dba": "Acme Jewelry", "integrations": [ "TSYS" ], "response_code": "00", "response_description": "Approved", "batch_id": null, "is_settled": false, "time_created": "2026-07-16T10:12:58Z", "amount": 2500, "tip": 0, "tax_amount": null, "currency": "USD", "payment_method": { "type": "CARD", "truncated_pan": "****-****-****-5439", "payment_token": "CARD_TOKEN-01KFDKXMQ637EKEAY410MSQSXB", "expiry": null, "first_name": "John", "last_name": "Doe", "entry_method": "keyed", "auth_code": "123456", "retrieval_reference_number": "000000603076", "card_type": "UNKNOWN", "card_brand": "Visa", "cvv_result_code": null }, "recurring": false, "initiator": "CUSTOMER", "network_transaction_id": "000000004271001", "metadata": { "order_id": "ORD-10432", "sales_channel": "web", "customer_reference": "cust-8891" } }

A refund is its own transaction with a type of REFUND, and it settles in a batch like any other. The money reaches the cardholder when that batch settles, not when you make the call.

What comes back

A void and a refund both return the new transaction, and its payment_method describes the payment method of the transaction you canceled. It does not repeat everything the original response carried.

  • On a card, expiry, first_name, last_name, cvv_result_code and payment_token are null. Read the original transaction for those values.
  • On a bank account, payment_token is left out of the response entirely, rather than sent as null. The other bank account fields carry the original's values.

Any payment_method property may be null, so check for null before you use a value.

Partial refunds

Send the amount you are returning. To refund in several parts, call the endpoint again with the next amount; each call is a separate REFUND transaction against the same original.

The gateway does not stop you from refunding more in total than the original transaction, so track the running total yourself if you issue partial refunds. Reading the original back and summing the refunds that reference it is the reliable way to do that.

Releasing an authorization

An authorization you never capture is a hold on someone's funds. Void it rather than leaving it to expire — the issuer decides when that happens, and it is usually days.

Authorize and capture covers the flow that leads here.

Next steps