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": "PM009N4V35FCTR", "created_at": "2024-03-22T20:31:28.319Z", "charge_date": "2024-04-02", "amount": 96140, "description": null, "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": "MD000ZS5B9F5D5", "creditor": "CR00006C6DF0TD" }, "retry_if_possible": true } }



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

ENDPOINTS