Skip to navigation

Create a customer

Creates a customer to bill. If an event already created a draft customer with the same externalId, the draft is promoted to active and returned instead of a new customer.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the customers=v1 beta. Send this header to use it.

Allowed values:

Request

Body
namestringRequired1-255 characters
Display name, shown on invoices and value receipts.
addressobjectOptional
Billing address, used for tax and shown on invoices. Send null to remove it.
currencystringOptionalformat: "^[a-z]{3}$"

Lowercase ISO 4217 code. Must be enabled on your account; defaults to the account’s currency.

emailstring or nullOptionalformat: "email"<=255 characters
Billing contact email.
externalIdstringOptional1-255 characters

Your ID for the customer, 1 to 255 characters. Unique on your account, ignoring letter case, together with every alias. Events and other resources can name the customer by it; prefer the cus_ ID for long-lived integrations.

legalNamestring or nullOptional<=255 characters

Legal entity name for invoices, when it differs from name.

metadatamap from strings to stringsOptional

String key-value pairs of your own, up to 500 characters per value. Always updatable.

parentstring or nullOptional1-255 characters

The customer this one belongs to, such as a subsidiary’s group: its cus_ ID, your externalId or one of its aliases, or null to remove it. One level only: a parent cannot have a parent. A child’s new orders bill the parent unless billTo says otherwise.

phonestring or nullOptional<=64 characters
Billing contact phone number.
segmentslist of stringsOptional

The segments the customer starts in, by key or seg_ ID. A segment named twice counts once. At most 20 segments after that; each must exist and not be archived.

taxExemptStatusenumOptional

none: taxed as usual. exempt: invoices carry no tax, and the tax provider is told the customer is exempt. reverse: reverse charge, for a business customer that accounts for VAT itself; the customer’s VAT number is sent to the tax provider, which applies reverse charge where the rules allow, and the customer needs a VAT entry in taxIds. GST reverse charge is not supported yet. A change applies to invoices issued afterwards. More values may be added.

Allowed values:
taxIdslist of objectsOptional
Up to 5 tax IDs, shown on invoices.
websitestring or nullOptional<=255 characters
The customer's website.

Response

201
idstring
The customer's ID. Use it wherever a customer is named.
objectenum

The type of object. Always customer.

Allowed values:
createdAtdatetime
When the object was created.
addressobject
Billing address, used for tax and shown on invoices.
archivedAtdatetime or null

When the customer was archived, or null. An archived customer stays readable and on its invoices, takes no new orders, and keeps its externalId reserved.

churnedAtdatetime or null

When the customer churned, or null. Informational: it does not stop billing.

currencystring
Lowercase ISO 4217 code the customer is billed in.
defaultPaymentMethodstring or object or any

The pm_ payment method this customer’s invoices and auto top-ups follow: a card is charged, a bank transfer account is paid into. Null when there is none. Needs Paid-Beta: payments=v1. The full paymentMethod object when the request expands defaultPaymentMethod.

emailstring or null
Billing contact email.
externalIdstring or null

Your ID for the customer, 1 to 255 characters. Unique on your account, ignoring letter case, together with every alias. Events and other resources can name the customer by it; prefer the cus_ ID for long-lived integrations.

legalNamestring or null

Legal entity name for invoices, when it differs from name.

livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

namestring
Display name, shown on invoices and value receipts.
parentstring or object or any

The parent customer’s cus_ ID, or null. One level: a parent has no parent of its own. The full customer object when the request expands parent.

phonestring or null
Billing contact phone number.
segmentslist of strings
The keys of the segments the customer is in, sorted by key, up to 20. Archived segments are never listed. Empty when it is in none.
statusenum

draft: created automatically when an event named a customer that did not exist yet; never billed. active: created through the API or dashboard, or promoted from a draft by creating it.

Allowed values:
taxExemptStatusenum

none: taxed as usual. exempt: invoices carry no tax, and the tax provider is told the customer is exempt. reverse: reverse charge, for a business customer that accounts for VAT itself; the customer’s VAT number is sent to the tax provider, which applies reverse charge where the rules allow, and the customer needs a VAT entry in taxIds. GST reverse charge is not supported yet. A change applies to invoices issued afterwards. More values may be added.

Allowed values:
taxIdslist of objects
The customer's tax IDs, shown on invoices.
updatedAtdatetime
When the object was last changed.
websitestring or null
The customer's website.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error