Logo
GoCardless API API Documentation

Create a Customer

POST {{url}}/customers

Please consider using the Billing Requests API instead of Customers for any future integrations.

Creates a new customer object.

Note: the region field should be uncommented for US customer addresses.

Create a customer API Docs

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Idempotency-Key
number




RESPONSES

status Created

{ "customers": { "id": "CU0014DQP7YPKP", "created_at": "2024-03-22T20:42:11.311Z", "email": "gregory93@example.net", "given_name": "Bridie", "family_name": "Altenwerth", "company_name": null, "address_line1": "61188 Godfrey Ports", "address_line2": null, "address_line3": null, "city": "Swaniawskitown", "region": null, "postal_code": "E8 3GX", "country_code": "GB", "language": "en", "swedish_identity_number": null, "danish_identity_number": null, "phone_number": null, "metadata": { "crm_id": "ABCD769" } } }



Curl
curl -X POST 'https://api-sandbox.gocardless.com/customers' -H 'Idempotency-Key: 12345' -d '{"customers":{"email":"$randomExampleEmail","given_name":"$randomExampleEmail","family_name":"$randomExampleEmail","address_line1":"$randomExampleEmail","city":"$randomExampleEmail","postal_code":"E8 3GX","country_code":"GB","metadata":{"crm_id":"ABCD$randomExampleEmail"}}}'

ENDPOINTS