Void Order
Overview
Use the Void Order endpoint to void orders where funds have been authorized but not settled. An order amount can be voided in full or partially voided (up to the amount of funds that have been authorized but not captured).
API Request
This endpoint uses HMAC
Please read our API Authentication section to ensure you are crafting your request properly.
The request body may contain a voidAmount
. If this field is not passed with the request body, the total amount of the order be voided.
To Void an order, send an API call to:
POST {{baseUrl}}/orders/{{orderId}}/void
Request Body Parameters
Parameter | Required? | Type | Description |
---|---|---|---|
voidAmount | No | Integer | Include this field for partial order voiding. If this field is not passed with the request body, the total amount of the order be voided. Note: that the void amount cannot exceed the total amount of funds that have been captured. |
Request Body Example
{
"voidAmount": 1523 // $15.23
}
API Response:
Response Body Parameters
Response Parameter | Type | Description |
---|---|---|
voidTransactionId | string | TransactionId from the Payment Gateway |
status | string | "success" or "failure" |
errorCode | string, nullable | Error code supplied by the payment gateway if a failure occurred |
transactionIds | array | List of all transactionIds related to the order, supplied to us from the payment gateway |
gatewayResponse | string | Raw response from the payment gateway |
Response Body Example
{
"voidTransactionId": "115245",
"status": "Failure",
"errorCode": "102",
"transactionIds": [
"54270a3e-a0b6-424b-83c2-4d3ab976acd2",
],
"gatewayResponse": "string"
}
API Reference
Our API Reference contains additional details about this endpoint and its use.
Updated 7 months ago