GladysDevelopers

Cancel a payment

Stops the payment and releases anything held.

Choose a TEST app to send requests from the playground.
post/payments/{reference}/cancel

Stops the payment and releases anything held.

Authorization

BearerAuth
headerAuthorizationBearer <token>

An access token from POST /oauth/token: client_credentials for your own app, or authorization_code for a user who connected it.

Path Parameters

reference*string

Payment reference

Request Body

Reason

application/json
  1. body
reason?string

Response Body

OK

application/json
  1. response
data?
error?
message?string
meta?
success?boolean
curl -X POST "https://example.com/payments/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{  "error": {    "code": "string",    "details": {      "property1": "string",      "property2": "string"    },    "message": "string"  },  "message": "string",  "meta": {    "pagination": {      "next_cursor": "string",      "page": 0,      "per_page": 0,      "total_items": 0,      "total_pages": 0    }  },  "success": true,  "data": {    "amount": "1500.00",    "authorized_at": "string",    "cancellation_reason": "string",    "cancelled_at": "string",    "capture_method": "AUTOMATIC",    "captured_at": "string",    "checkout_url": "string",    "created_at": "string",    "currency": "string",    "description": "string",    "environment": "LIVE",    "expires_at": "string",    "fee": "1500.00",    "merchant_reference": "string",    "metadata": "string",    "net_amount": "1500.00",    "reference": "string",    "refundable_amount": "1500.00",    "refunded_amount": "1500.00",    "status": "CREATED"  }}