Create a customer
Add a customer before they pay, such as an account from your own system.
Customers are added for you when checkout collects an email, or when a payment names one in customer_email. Create one yourself to set their details before they pay: later payments with the same email link to them. You receive customer.created. Customers can't be deleted.
blocked isn't taken here. To stop someone from paying, create them, then update them with blocked set to true.
Body
emailstring RequiredUnique among your customers.namestringUp to 80 characters. Defaults to one made from the email, such as Mateo Garcia formateo.garcia@example.com.notestringFor your team, up to 500 characters.
Errors
- 400
invalid_requestA field is missing, unknown or out of range.fieldnames it. - 409
customer_existsAnother customer already has this email.
Any request can also fail on its key or its body. See errors.
Request
curl -X POST "https://dash.402pay.co/api/v1/customers" \ -H "Authorization: Bearer $PAY402_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Mateo García", "email": "mateo.garcia@example.com", "note": "Invoiced monthly." }'Response201 Created
{ "data": { "id": "cst_6OOyvqK7aSwN8Ve8", "kind": "customer", "name": "Mateo García", "email": "mateo.garcia@example.com", "blocked": false, "note": "Invoiced monthly.", "stats": { "payments_count": 0, "incomplete_count": 0, "volume": { "amount": 0, "currency": "USD" }, "average": null, "last_payment_at": null, "preferred_rail": null }, "created_at": "2026-09-27T18:31:10.909Z", "updated_at": "2026-09-27T18:31:10.909Z" }}