Refund Order

Overview

Use the Refund Order endpoint to send a refund to the card that was processed during the initial transaction. It is important to note that a refund cannot be processed until after funds have settled, which is different than how a Void is treated.

API Request

👍

This endpoint uses MAC with SHA-256

Please read our API Authentication section to ensure you are crafting your request properly.

The request body has a RefundAmount field. If this field is not passed with a value, the API will refund the total of the order. However, if you specify a RefundAmount then that is the amount that will be refunded. As an example:

An order of $100 has settled. You initiate this API call with the RefundAmount field of $10. This will create a refund of $10, which is how much will be refunded.

To Refund an order, send an API call to:

POST {{baseUrl}}/orders/{{orderId}}/refund

Request Body Parameters Below is a description of the Request Body for this API call:
ParameterRequired?TypeDescription
refundAmountNoIntegerIf this field is not passed with a value, the API will refund the total of the order. However, if the refundAmount is specified, then that amount that will be refunded.

If the refund performed is not for the entire total amount, a new authorization will be performed for the remaining amount on the order after the refund has been completed.

Note: the refund amount cannot exceed the total amount of funds that have been captured.
Request Body Example
{
  "refundAmount": 1523 // Represents $15.23
}

API Response:

Response Body Parameters
Response ParameterTypeDescription
refundTransactionIdstringThe Transaction ID received from the payment gateway
statusstring"success" or "failure"
errorCodestring, nullableError code from the payment gateway if failure occurs
transactionIdsarrayList of all the transactionIds from the payment gateway that are relevant to this refund
gatewayResponsestringRaw response from the payment gateway. We share this with you in case you need to contact the gateway directly
Response Body Example
{
  "refundTransactionId": "1115245",
  "status": "Success", 
  "errorCode": null,
  "transactionIds": [ 
    "1115245",
  ],
  "gatewayResponse": "string"
}

👍

API Reference

Our API Reference contains additional details about this endpoint and its use.