Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A refund or void can be submitted via the API using the /txns endpoint. You can look up additional information about the /txns endpoint in theAPI Reference.

How to submit a refund or void a payment via the API

The process of submitting a card payment (sale) refund, an eCheck refund, or voiding an approved transaction is virtually the same. The only difference between these three options is the type value included in the request.

Info

A refund can be issued when the transaction status is “3” (captured) or “4” (settled), but payments with these statuses cannot be voided. A payment can only be voided if the transaction status is “1” (approved).

API transaction statuses:

...

A partial or full refund/void is submitted in the API by sending a POST request to the /txns endpoint and including the Transaction ID of the payment that is being refunded/voided. By default, if no amount is set when submitting a refund/void via the API it will be a full refund for the entire amount of the original transaction.

...

Other optional fields (e.g. fee, first [name], last [name] etc.) can be included in the API request, but they are not required for the refund/void to process successfully.

How to cancel an approved payment via the API

As covered elsewhere, the fundamental difference between voiding and canceling a payment is that canceling a transaction simply removes the approved payment from the Merchant’s daily batch, but does not actually reverse the authorization (as voiding does).

...