Use Accounts as customersPublic preview
Accept payments from Accounts configured as customers.
With Accounts v2, you can use an Account object similarly to a Customer object by assigning it the customer configuration.
When you’re enabled for Accounts v2, your Stripe-hosted integrations, such as Checkout, create Accounts with the customer configuration instead of creating Customers. We recommend that you update Customer references in your code to reference Accounts instead.
| Purpose | v1 reference | v2 reference |
|---|---|---|
| Customer reference | customer | customer_ |
| Customer identification | cus_ | acct_ |
| Set billing address | address |
|
| Set shipping address | shipping | configuration.customer.shipping |
Provide an Account as the customer
API requests such as Subscriptions and SetupIntents require you to specify a customer. These requests accept either the customer or customer_ parameter. The following sample shows a subscription that specifies the customer by passing an Accounts v2 object as the customer_.
Reference Accounts in Customers v1 integrations
A request that specifies customer_ returns both customer and customer_ properties, with correspondingly formatted values. This maintains compatibility with existing Billing and Payments integrations.
{ "id": "sub_1Mow234", . . . "customer": "cus_xxxxx", "customer_account": "acct_xxxxx" }
You can also retrieve or update customer-configured Accounts using the /v1/customers endpoint.
Accounts v2 webhooks
Webhooks for Accounts v2 send thin events.
| Action | v1 event | v2 event |
|---|---|---|
| Customer created | customer. | Accounts v2 sends separate events indicating the account creation and the customer configuration:
|
| Billing address updated | customer. | v2. |
| Subscription actions | customer. | None; use the v1 event |
| Customer deleted | customer. | v2. |
Customer invoice properties
| Data value | Customers v1 property | Accounts v2 property |
|---|---|---|
| Customer stored credit | invoice_ | None; see Reference an Accounts v2 ID in a /v1/customers path |
| Customer invoice prefix | invoice_ | configuration.customer.billing.invoice.prefix |
| Custom settings | invoice_ | configuration.customer.billing.invoice.custom_fields |
| Default payment method | invoice_ | configuration.customer.billing.default_payment_method |
| Invoice footer | invoice_ | configuration.customer.billing.invoice.footer |
| Invoice rendering options | invoice_ | configuration.customer.billing.invoice.rendering.template |
Reference an Accounts v2 ID in a v1/customers path parameter
Accounts v2 doesn’t have endpoints for every customer function. To perform the following actions for an Accounts v2 object, use the v1/customers endpoint and pass the Account ID (acct_) as the path parameter.
| Use case | v1 endpoint with account ID |
|---|---|
| Manage cash balances |
|
| Manage cash balance transactions |
|
Manage invoice credit balance For Accounts v2, the ending_balance of the account’s most recently finalized invoice is the equivalent of the |
|