Skip to content
Status

Void a payment

POSThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/payments/{payment_id}/void

POST
/payments/{payment_id}/void

Void (cancel) an authorisation, releasing the hold on the customer’s funds. The void is for the authorised amount less anything already captured, and nothing more can be captured afterwards.

There are no parameters required to void a payment.

payment_id
required
string

The authorisation’s payment ID (pay_...) or transaction ID (tr_...), or the alt_key you gave it (case-insensitive). The record must be an authorisation, otherwise 404 Payment not found. An alt_key resolves to the newest authorisation with an amount still open, ignoring failed attempts.

Media typeapplication/json
object

Void processed

Media typeapplication/json
object
void
object
object
id
string
e.g. "vo_5139_10151"

Void operation identifier

payment
string
e.g. "pay_5139_10150"

Payment ID that was voided

amount
string
e.g. "100"

Amount that was voided

status
string · enum
e.g. "SUCCESS"

Status of the void operation

Allowed values: SUCCESS PENDING DECLINED
reference
string
e.g. "REF-00010151"

Reference for the void

created
string · date-time
e.g. "2019-10-01T16:25:24.000Z"

When the void was requested

processed
string · date-time
e.g. "2019-10-01T16:25:27.000Z"

When the void was processed

Bad request - invalid parameters

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Unauthorized - invalid credentials

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Payment not found

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Was this page helpful?