Customers
Create Customer
Changed onCreates a customer.
Every field is optional — a customer with no details at all is valid, and useful if you only want somewhere to attach saved payment methods.
Pass the returned id as customerId when you create a payment or a subscription to link it to this buyer.
What linking does:
- A payment saved with generatePaymentToken stores its payment method under this customer
- The customer's details are copied onto the payment at the time it is made. Editing the customer later never rewrites a payment that already happened
- A subscription gains renewal failover across the customer's other saved payment methods
Best practices:
- Create the customer once, when the buyer first registers with you, and reuse the id
- Use metadata to store your own user identifier, so you can match your records to MONEI's
post/customers
Request
- Base URLhttps://api.monei.com/v1
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+34666666666",
"billingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"shippingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"metadata": {
"systemId": "12345"
}
}Response
A customer object
Example response
{
"id": "a4e1d1dd-e0c2-4f7a-a2b1-2b0f1f9b6b1e",
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+34666666666",
"billingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"shippingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"metadata": {
"systemId": "12345"
},
"defaultTokenId": "7cc38b08ff471ccd313ad62b23b9f362b107560b",
"createdAt": "2026-09-21T10:25:52.000Z",
"updatedAt": "2026-09-21T10:25:52.000Z"
}Changes
- info
endpoint added
- info