Void an authorized payment.
POST
/v1/payments/{reference}/void
const url = 'https://api.ridleypay.com/v1/payments/WRK-042/void';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”reference
required
string
The payment reference.
Example
WRK-042Responses
Section titled “ Responses ”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." } ]}