Create or find a customer
Finds the customer with this reference, then the one with this email, and makes
one when neither exists: 201 when made, 200 when found. A customer found by
email without a reference is given this one; a found customer's name and
metadata stay as they were. A reference and an email that already belong to two
different customers are refused with 409. In the mode of the API key.
Authorization
ApiKey A merchant API key, sent as Authorization: Bearer vk_live_…. The prefix
selects the mode: vk_test_ for testnets, vk_live_ for real money.
In: header
Header Parameters
Makes the request safe to retry: the same key replays the first response instead of repeating the effect. At most 255 characters.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/customers" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'{ "object": "customer", "id": "string", "livemode": true, "email": "string", "name": "string", "reference": "string", "metadata": { "property1": "string", "property2": "string" }, "created_at": "2019-08-24T14:15:22Z"}