Voids
Using a Payment ID
Using the payment_id
and authorization
values returned from a previous payment, void requests are submitted as POST requests to the /payments/payment_id/void
path.
For example, let's assume we've created a payment and received a payment_id
of 1a57e58b-25e5-412d-93fb-fc7b2f5c48d1
and an authorization
of EP273834
in the response. Then, to void the payment, we'd send the request to /payments/1a57e58b-25e5-412d-93fb-fc7b2f5c48d1/void
, as follows:
POST /payments/1a57e58b-25e5-412d-93fb-fc7b2f5c48d1/void
{
"amount": 100,
"authorization": "EP273834",
"terminal": {"gateway_id": "YOUR_GW_ID"}
}
Without a Payment ID
Using a payment_id
is preferable and a much simpler process. However, if you do not know the payment_id
, you can still void a payment though you will also need access to the original payment method and the original authorization
value.
Since you do not know the payment_id
, you use "open" in place of the payment_id
in the path, and it becomes /payments/open/void
.
Then, you need to specify both the authorization
value and the payment_method
in the request body:
POST /payments/open/void
{
"amount": 100,
"authorization": "EP273834",
"terminal": {"gateway_id": "YOUR_GW_ID"},
"payment_method": {
"credit_card": {
"cardholder": "Bob Jones",
"number": "4111111111111111",
"expiry_month": "02",
"expiry_year": "2026"
}
}
}
Updated over 3 years ago