Logo
GoCardless API API Documentation

Create a Payment

POST {{url}}/payments

Creates a new payment object.

This fails with a mandateisinactive error if the linked mandate is cancelled or has failed. Payments can be created against mandates with status of: pendingcustomerapproval, pending_submission, submitted, and active.

Create a Payment API Docs

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Idempotency-Key
string




RESPONSES

status Created

{ "payments": { "id": "PM009P3TRF0M7Q", "created_at": "2024-03-26T17:33:20.268Z", "charge_date": "2024-04-04", "amount": 98199, "description": "Internal payment description", "currency": "GBP", "status": "pending_submission", "amount_refunded": 0, "reference": null, "metadata": {}, "fx": { "fx_currency": "GBP", "fx_amount": null, "exchange_rate": null, "estimated_exchange_rate": null }, "links": { "mandate": "MD000ZTEXWE3T0", "creditor": "CR000070S65B1S" }, "retry_if_possible": true } }



Curl
curl -X POST 'https://api-sandbox.gocardless.com/payments' -H 'Idempotency-Key: $randomUUID'

ENDPOINTS