provider POST /v1/customers/{customer}
@utdk/stripe /v1/customers/{customer}
Update a customer
<p>Updates the specified customer by setting the values of the parameters passed. Any parameters not provided are left unchanged. For example, if you pass the <strong>source</strong> parameter, that becomes the customer’s active source (such as a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the <strong>source</strong> parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the <code>past_due</code> state, then the latest open invoice for the subscription with automatic collection enabled is retried. This retry doesn’t count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the invoice. Changing the <strong>default_source</strong> for a customer doesn’t trigger this behavior.</p> <p>This request accepts mostly the same arguments as the customer creation call.</p>
customer path required
string

Try it

Authentication
Configure credentials for Stripe API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

postcustomerscustomer
POST/v1/customers/{customer}
<p>Updates the specified customer by setting the values of the parameters passed. Any parameters not provided are left unchanged. For example, if you pass the <strong>source</strong> parameter, that becomes the customer’s active source (such as a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the <strong>source</strong> parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the <code>past_due</code> state, then the latest open invoice for the subscription with automatic collection enabled is retried. This retry doesn’t count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the invoice. Changing the <strong>default_source</strong> for a customer doesn’t trigger this behavior.</p> <p>This request accepts mostly the same arguments as the customer creation call.</p>

Parameters

required

Input

The customer's address. Learn about [country-specific requirements for calculating tax](https://docs.stripe.com/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer).

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.

Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details.

The customer's business name. This may be up to *150 characters*.

A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).

Balance information and default balance settings for this customer.

ID of Alipay account to make the customer's new default for invoice payments.

ID of bank account to make the customer's new default for invoice payments.

ID of card to make the customer's new default for invoice payments.

If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. If you want to add a new payment source and make it the default, see the [source](https://docs.stripe.com/api/customers/update#update_customer-source) property.

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

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*.

Specifies which fields in the response should be expanded.

The customer's full name. This may be up to *150 characters*.

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

Default invoice settings for this customer.

Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

The customer's full name or business name.

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

The customer's phone number.

Customer's preferred languages, ordered by preference.

The customer's shipping information. Appears on invoices emailed to this customer.

Tax details about the customer.

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

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stripe from '@utdk/stripe';

await stripe.postcustomerscustomer()