Create a customer

Changed on

Creates a new customer object.

post/v1/customers

Request

  • Base URL: https://api.stripe.com
  • URL: https://api.stripe.com/v1/customers
  • Auth: one of:
    • HTTP basic
    • HTTP bearer

Request body application/x-www-form-urlencoded

balanceinteger

An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.

descriptionstring

An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.

emailstring

Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters.

expandstring[]

Specifies which fields in the response should be expanded.

invoice_prefixstring

The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers.

namestring

The customer's full name or business name.

next_invoice_sequenceinteger

The sequence to be used on the customer's next invoice. Defaults to 1.

payment_methodstring
phonestring

The customer's phone number.

preferred_localesstring[]

Customer's preferred languages, ordered by preference.

sourcestring
tax_exempt'' | 'exempt' | 'none' | 'reverse'

The customer's tax exemption. One of none, exempt, or reverse.

test_clockstring

ID of the test clock to attach to the customer.

Response

Successful response.

balanceinteger

The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see invoice_credit_balance.

business_namestring

The customer's business name.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

currencystring nullable

Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.

customer_accountstring nullable

The ID of an Account representing a customer. You can use this ID with any v1 API that accepts a customer_account parameter.

delinquentboolean nullable

Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the invoice.due_date will set this field to true.

If an invoice becomes uncollectible by dunning, delinquent doesn't reset to false.

If you care whether the customer has paid their most recent subscription invoice, use subscription.status instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to false.

descriptionstring nullable

An arbitrary string attached to the object. Often useful for displaying to users.

emailstring nullable

The customer's email address.

idstring required

Unique identifier for the object.

individual_namestring

The customer's individual name.

invoice_credit_balanceobject

The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.

invoice_prefixstring nullable

The prefix for the customer used to generate unique invoice numbers.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

namestring nullable

The customer's full name or business name.

next_invoice_sequenceinteger

The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.

object'customer' required

String representing the object's type. Objects of the same type share the same value.

phonestring nullable

The customer's phone number.

preferred_localesstring[] nullable

The customer's preferred locales (languages), ordered by preference.

tax_exempt'exempt' | 'none' | 'reverse' nullable

Describes the customer's tax exemption status, which is none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the following text: "Reverse charge".

Changes

    • warning

      added the new final_payment_failure enum value to the ////// response property for the response status

    • warning

      added the new first_payment_failure enum value to the ////// response property for the response status

    • info

      added the optional property /// to the response with the status

Some revisions have not been checked yet.