Void or refund a transaction

Cancel a transaction that hasn't settled with a void, or return funds from a settled transaction with a refund.

A void cancels a transaction that hasn't settled yet. A refund returns funds from a transaction that has settled. To pick between them, see Choose a transaction type.

You send voids and refunds through the API. Merchant, payment method, and currency come from the original transaction. Bank account payments can't be voided. To return an ACH payment, see Refund an ACH payment.

A void or refund returns the same transaction object as every other type, with these differences:

  • originalTransactionId holds the ID of the transaction that was voided or refunded.
  • authorization.processorMessage holds the connection's outcome text.
  • metadata is present only when the void or refund request sends metadata. The response doesn't carry the original transaction's metadata.

Before you start, make sure you have the id of the original transaction.


Void

A void cancels a transaction that hasn't settled yet. You can run it against a sale or an auth. Whether you can void a drawdown depends on the lender. Check the lender's guide, linked from Supported connections.

To void a transaction, send POST /v1/transactions with type set to void and transactionId set to the original transaction's id.

{
    "type": "void",
    "transactionId": "{transactionId}"
}

For a transaction that has already settled, send a refund instead. See the Refund section.


Refund

A refund returns the amount of a settled sale or capture to the customer. The original transaction must settle first, so a refund can be run no earlier than the next day. Whether you can refund a drawdown depends on the lender. Check the lender's guide, linked from Supported connections.

To refund a transaction, send POST /v1/transactions with type set to refund and transactionId set to the original transaction's id. To refund only part of it, add an amount. See the Partial refund section.

{
    "type": "refund",
    "transactionId": "{transactionId}"
}
{
    "type": "refund",
    "amount": 200,
    "transactionId": "{transactionId}"
}

For a transaction that hasn't settled yet, send a void instead. See the Void section.

Partial refund

To refund only part of a transaction, send an amount lower than the original. Only that amount is refunded, and authorization.partial is true in the response. You can repeat partial refunds up to the remaining balance of the transaction.


Did this page help you?