Payment
Cancel a payment
Cancels the payment if it has not already been submitted to the banks. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a cancellation_failed error unless the payment's status is pending_submission.
post/payments/{payment_id}/actions/cancel
Request
- Base URLhttps://api.gocardless.com
- AuthHTTP bearer
Path parameters
payment_idstring required
The payment id
Headers
GoCardless-Versionstring required
Request body
Response
Action completed successfully
Example response
{
"payments": {
"id": "PM123",
"created_at": "2014-01-01T12:00:00.000Z",
"amount": 1000,
"amount_refunded": 150,
"currency": "EUR",
"description": "One-off upgrade fee",
"charge_date": "2014-05-21",
"reference": "WINEBOX001",
"status": "submitted",
"app_fee": 100,
"links": {
"mandate": "MD123",
"creditor": "CR123",
"payout": "PO123",
"subscription": "SU123",
"instalment_schedule": "IS123"
},
"fx": {
"exchange_rate": "1.1234567890",
"estimated_exchange_rate": "1.1234567890",
"fx_currency": "EUR"
},
"scheme": "bacs"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.