Skip to content

Create a customer.

POST
/customers

Create a customer. Every field is optional: a merchant may know nothing about a buyer beyond an email, or may be creating the record purely to hang a saved card on it later.

object
email
string | null
metadata
object
key
additional properties
string
name
string | null
phone
string | null

Customer created

A customer as returned. Timestamps are Unix milliseconds, matching every other resource on this API.

object
created
required
integer format: int64
default_payment_method_id
One of:
null
email
string | null
id
required

Identifier for a customer (cus_…).

string
livemode
required
boolean
metadata
required
object
key
additional properties
string
name
string | null
phone
string | null
updated
required
integer format: int64

Invalid request

object
error
required
object
code
required
string
message
required
string
param
string | null
retryable

When present and true, the caller may retry the same request.

boolean | null
type
required
string