Skip to content

Void an authorized payment.

POST
/v1/payments/{reference}/void
curl --request POST \
--url https://api.ridleypay.com/v1/payments/WRK-042/void \
--header 'Authorization: Bearer <token>'

Releases the hold on an authorized payment. No funds are captured. Only payments with status “AUTHORIZED” can be voided via this endpoint.

reference
required
string

The payment reference.

Example
WRK-042

Voided

Media typeapplication/json
object
data
object
id
integer
type
string
attributes
object
reference
string
amount
string
status
string
meta
object
message
string
Example
{
"data": {
"id": 1,
"type": "payments",
"attributes": {
"reference": "WRK-042",
"amount": "200.00",
"status": "VOIDED"
}
},
"meta": {
"message": "Authorization voided successfully."
}
}

Not found

Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "404",
"title": "Not Found",
"detail": "Payment not found."
}
]
}

Not voidable

Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "422",
"title": "Unprocessable Entity",
"detail": "Only authorized (held) payments can be voided via this endpoint."
}
]
}