POST /v1/customers/{customer}
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 source 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 source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due 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 default_source for a customer doesn’t trigger this behavior.
This request accepts mostly the same arguments as the customer creation call.
Servers
- https://api.stripe.com/
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
customer |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
source |
String | No | |
description |
String | No |
An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. |
metadata |
No |
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to |
|
next_invoice_sequence |
Integer | No |
The sequence to be used on the customer's next invoice. Defaults to 1. |
email |
String | No |
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. |
business_name |
No |
The customer's business name. This may be up to 150 characters. |
|
invoice_prefix |
String | No |
The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. |
balance |
Integer | No |
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. |
shipping |
No |
The customer's shipping information. Appears on invoices emailed to this customer. |
|
preferred_locales[] |
Array | No |
Customer's preferred languages, ordered by preference. |
individual_name |
No |
The customer's full name. This may be up to 150 characters. |
|
default_bank_account |
String | No |
ID of bank account to make the customer's new default for invoice payments. |
tax |
Object | No |
Tax details about the customer. |
tax.validate_location |
String | No |
Valid values:
|
tax.ip_address |
No | ||
expand[] |
Array | No |
Specifies which fields in the response should be expanded. |
bank_account |
No |
Either a token, like the ones returned by Stripe.js, or a dictionary containing a user's bank account details. |
|
card |
No |
A token, like the ones returned by Stripe.js. |
|
default_alipay_account |
String | No |
ID of Alipay account to make the customer's new default for invoice payments. |
default_source |
String | No |
If you are using payment methods created via the PaymentMethods API, see the 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 property. |
name |
String | No |
The customer's full name or business name. |
default_card |
String | No |
ID of card to make the customer's new default for invoice payments. |
cash_balance |
Object | No |
Balance information and default balance settings for this customer. |
cash_balance.settings |
Object | No | |
cash_balance.settings.reconciliation_mode |
String | No |
Valid values:
|
phone |
String | No |
The customer's phone number. |
address |
No |
The customer's address. Learn about country-specific requirements for calculating tax. |
|
tax_exempt |
String | No |
The customer's tax exemption. One of Valid values:
|
invoice_settings |
Object | No |
Default invoice settings for this customer. |
invoice_settings.default_payment_method |
String | No | |
invoice_settings.rendering_options |
No | ||
invoice_settings.custom_fields |
No | ||
invoice_settings.footer |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.