Customers

The Customers resource is designed to manage customer data effectively by providing endpoints for various operations. It enables you to create new customer records, retrieve a list of existing customers, update details for specific customers, and remove customer records when necessary. This API is essential for maintaining accurate and up-to-date customer information within your application, ensuring seamless integration and efficient data handling.

Creates a new customer

post

Creates a new customer object

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
idstringOptional

The unique identifier of a customer.

Example: 5823594808
emailstring · emailOptional

The customer email address.

Example: [email protected]
defaultSourceIdstringOptional

The identifier of the default source attached to this customer.

Example: fd74a5c5-0163-469a-ae8e-031f0259b576
localestringOptional

A locale designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code.

Example: en_US
typestring · enumOptional

The type of customer.

Example: individualPossible values:
enabledbooleanOptional

Usually used to disable the customer. The default is true. If false, attempts to create orders for the customer will fail.

Example: true
Responses
chevron-right
201

201 Created

application/json
idstringOptional

The unique identifier for the customer.

Example: 5823594809
createdTimestring · date-timeOptional

The time at which the customer was created.

Example: 2018-04-25T20:36:00Z
emailstring · emailOptional

The customer email address.

Example: [email protected]
defaultSourceIdstring · uuidOptional

The identifier of the default payment source attached to this customer.

requestToBeForgottenbooleanOptional

If true, indicates this customer has requested to be forgotten.

Default: falseExample: true
typestring · enumOptional

The type of customer.

Example: individualPossible values:
localestringOptional

A locale designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code.

Example: en_US
enabledboolean · nullableOptional

Usually used to disable the customer. The default is true. If false, attempts to create orders for the customer will fail.

Example: true
liveModebooleanOptional

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Example: false
updatedTimestring · date-timeOptional

Time at which the customer was last updated.

Example: 2018-04-25T20:36:00Z
post
/customers

Gets a customer by ID

get

Retrieves the details of a customer by supplying the unique identifier of the customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

Responses
get
/customers/{id}

Updates an existing customer

post

Updates an existing customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

Body
emailstring · emailOptional

The customer email address.

Example: [email protected]
defaultSourceIdstringOptional

The identifier of the default source attached to this customer.

Example: fd74a5c5-0163-469a-ae8e-031f0259b576
requestToBeForgottenbooleanOptional

If true, indicates this customer has submitted a request to be forgotten.

Example: true
typestring · enumOptional

The type of customer.

Example: individualPossible values:
localestringOptional

A locale designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code.

Example: en_US
enabledbooleanOptional

Usually used to disable the customer. The default is true. If false, attempts to create orders for the customer will fail.

Example: true
Responses
post
/customers/{id}

Deletes a customer by ID

delete

Permanently deletes a customer by supplying the unique identifier of the customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

Responses
delete
/customers/{id}

No content

Attaches a source to a customer

post

Attaches a source to a customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

sourceIdstring · uuidRequired

Source ID

Responses
post
/customers/{id}/sources/{sourceId}

Detaches a source from a customer

delete

Detaches a source from a customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

sourceIdstring · uuidRequired

Source ID

Responses
delete
/customers/{id}/sources/{sourceId}

No content

Attaches a tax identifier to a customer

post

Attaches a tax identifier to a customer

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Customer ID

taxIdstring · uuidRequired

Tax ID

Responses
post
/customers/{id}/tax-identifiers/{taxId}

Last updated