Stripe: Create a bank account token
Stripe tokens.postTokens: arguments, response, policy and SDK examples.
← Tokens operations · Get started
Operation stripe.posttokens
Provider route: POST /v1/tokens. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["tokens"]["postTokens"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.tokens.postTokens(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.tokens.post_tokens(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
headers | object | Optional | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Minimum length: 1 Maximum length: 255 |
body | object | Optional | Additional keys: not allowed |
body.account | object | Optional | Information for the account this token represents. |
body.account.business_type | string | Optional | One of: company, government_entity, individual, non_profit |
body.account.company | object | Optional | |
body.account.company.address | object | Optional | |
body.account.company.address.city | string | Optional | Maximum length: 100 |
body.account.company.address.country | string | Optional | Maximum length: 5000 |
body.account.company.address.line1 | string | Optional | Maximum length: 200 |
body.account.company.address.line2 | string | Optional | Maximum length: 200 |
body.account.company.address.postal_code | string | Optional | Maximum length: 5000 |
body.account.company.address.state | string | Optional | Maximum length: 5000 |
body.account.company.address_kana | object | Optional | |
body.account.company.address_kana.city | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.country | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.line1 | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.line2 | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.postal_code | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.state | string | Optional | Maximum length: 5000 |
body.account.company.address_kana.town | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji | object | Optional | |
body.account.company.address_kanji.city | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.country | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.line1 | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.line2 | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.postal_code | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.state | string | Optional | Maximum length: 5000 |
body.account.company.address_kanji.town | string | Optional | Maximum length: 5000 |
body.account.company.administrative_address | object | Optional | |
body.account.company.administrative_address.city | string | Optional | Maximum length: 100 |
body.account.company.administrative_address.country | string | Optional | Maximum length: 5000 |
body.account.company.administrative_address.line1 | string | Optional | Maximum length: 200 |
body.account.company.administrative_address.line2 | string | Optional | Maximum length: 200 |
body.account.company.administrative_address.postal_code | string | Optional | Maximum length: 5000 |
body.account.company.administrative_address.state | string | Optional | Maximum length: 5000 |
body.account.company.directors_provided | boolean | Optional | |
body.account.company.directorship_declaration | object | Optional | |
body.account.company.directorship_declaration.date | integer | Optional | Format: unix-time |
body.account.company.directorship_declaration.ip | string | Optional | |
body.account.company.directorship_declaration.user_agent | string | Optional | Maximum length: 5000 |
body.account.company.executives_provided | boolean | Optional | |
body.account.company.export_license_id | string | Optional | Maximum length: 5000 |
body.account.company.export_purpose_code | string | Optional | Maximum length: 5000 |
body.account.company.name | string | Optional | Maximum length: 200 |
body.account.company.name_kana | string | Optional | Maximum length: 200 |
body.account.company.name_kanji | string | Optional | Maximum length: 200 |
body.account.company.owners_provided | boolean | Optional | |
body.account.company.ownership_declaration | object | Optional | |
body.account.company.ownership_declaration.date | integer | Optional | Format: unix-time |
body.account.company.ownership_declaration.ip | string | Optional | |
body.account.company.ownership_declaration.user_agent | string | Optional | Maximum length: 5000 |
body.account.company.ownership_declaration_shown_and_signed | boolean | Optional | |
body.account.company.ownership_exemption_reason | string | Optional | One of: , qualified_entity_exceeds_ownership_threshold, qualifies_as_financial_institution |
body.account.company.phone | string | Optional | Maximum length: 5000 |
body.account.company.principal_place_of_business | object | Optional | |
body.account.company.principal_place_of_business.city | string | Optional | Maximum length: 100 |
body.account.company.principal_place_of_business.country | string | Optional | Maximum length: 5000 |
body.account.company.principal_place_of_business.line1 | string | Optional | Maximum length: 200 |
body.account.company.principal_place_of_business.line2 | string | Optional | Maximum length: 200 |
body.account.company.principal_place_of_business.postal_code | string | Optional | Maximum length: 5000 |
body.account.company.principal_place_of_business.state | string | Optional | Maximum length: 5000 |
body.account.company.registration_date | JSON | Optional | |
body.account.company.registration_date (anyOf 1) | object | Alternative | |
body.account.company.registration_date (anyOf 1).day | integer | Required within parent | |
body.account.company.registration_date (anyOf 1).month | integer | Required within parent | |
body.account.company.registration_date (anyOf 1).year | integer | Required within parent | |
body.account.company.registration_date (anyOf 2) | string | Alternative | One of: |
body.account.company.registration_number | string | Optional | Maximum length: 5000 |
body.account.company.representative_declaration | object | Optional | |
body.account.company.representative_declaration.date | integer | Optional | Format: unix-time |
body.account.company.representative_declaration.ip | string | Optional | |
body.account.company.representative_declaration.user_agent | string | Optional | Maximum length: 5000 |
body.account.company.structure | string | Optional | One of: , free_zone_establishment, free_zone_llc, government_instrumentality, governmental_unit, incorporated_non_profit, incorporated_partnership, limited_liability_partnership, llc, multi_member_llc, private_company, private_corporation, private_partnership, public_company, public_corporation, public_partnership, registered_charity, single_member_llc, sole_establishment, sole_proprietorship, tax_exempt_government_instrumentality, unincorporated_association, unincorporated_non_profit, unincorporated_partnership |
body.account.company.tax_id | string | Optional | Maximum length: 5000 |
body.account.company.tax_id_registrar | string | Optional | Maximum length: 5000 |
body.account.company.vat_id | string | Optional | Maximum length: 5000 |
body.account.company.verification | object | Optional | |
body.account.company.verification.document | object | Optional | |
body.account.company.verification.document.back | string | Optional | Maximum length: 500 |
body.account.company.verification.document.front | string | Optional | Maximum length: 500 |
body.account.individual | object | Optional | |
body.account.individual.address | object | Optional | |
body.account.individual.address.city | string | Optional | Maximum length: 100 |
body.account.individual.address.country | string | Optional | Maximum length: 5000 |
body.account.individual.address.line1 | string | Optional | Maximum length: 200 |
body.account.individual.address.line2 | string | Optional | Maximum length: 200 |
body.account.individual.address.postal_code | string | Optional | Maximum length: 5000 |
body.account.individual.address.state | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana | object | Optional | |
body.account.individual.address_kana.city | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.country | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.line1 | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.line2 | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.postal_code | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.state | string | Optional | Maximum length: 5000 |
body.account.individual.address_kana.town | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji | object | Optional | |
body.account.individual.address_kanji.city | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.country | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.line1 | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.line2 | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.postal_code | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.state | string | Optional | Maximum length: 5000 |
body.account.individual.address_kanji.town | string | Optional | Maximum length: 5000 |
body.account.individual.dob | JSON | Optional | |
body.account.individual.dob (anyOf 1) | object | Alternative | |
body.account.individual.dob (anyOf 1).day | integer | Required within parent | |
body.account.individual.dob (anyOf 1).month | integer | Required within parent | |
body.account.individual.dob (anyOf 1).year | integer | Required within parent | |
body.account.individual.dob (anyOf 2) | string | Alternative | One of: |
body.account.individual.email | string | Optional | |
body.account.individual.first_name | string | Optional | Maximum length: 100 |
body.account.individual.first_name_kana | string | Optional | Maximum length: 5000 |
body.account.individual.first_name_kanji | string | Optional | Maximum length: 5000 |
body.account.individual.full_name_aliases | JSON | Optional | |
body.account.individual.full_name_aliases (anyOf 1) | array | Alternative | |
body.account.individual.full_name_aliases (anyOf 1)[] | string | Each item | Maximum length: 300 |
body.account.individual.full_name_aliases (anyOf 2) | string | Alternative | One of: |
body.account.individual.gender | string | Optional | |
body.account.individual.id_number | string | Optional | Maximum length: 5000 |
body.account.individual.id_number_secondary | string | Optional | Maximum length: 5000 |
body.account.individual.last_name | string | Optional | Maximum length: 100 |
body.account.individual.last_name_kana | string | Optional | Maximum length: 5000 |
body.account.individual.last_name_kanji | string | Optional | Maximum length: 5000 |
body.account.individual.maiden_name | string | Optional | Maximum length: 5000 |
body.account.individual.metadata | JSON | Optional | |
body.account.individual.metadata (anyOf 1) | object | Alternative | Additional keys: see wildcard field |
body.account.individual.metadata (anyOf 1).* | string | Additional keys | |
body.account.individual.metadata (anyOf 2) | string | Alternative | One of: |
body.account.individual.phone | string | Optional | |
body.account.individual.political_exposure | string | Optional | One of: existing, none |
body.account.individual.registered_address | object | Optional | |
body.account.individual.registered_address.city | string | Optional | Maximum length: 100 |
body.account.individual.registered_address.country | string | Optional | Maximum length: 5000 |
body.account.individual.registered_address.line1 | string | Optional | Maximum length: 200 |
body.account.individual.registered_address.line2 | string | Optional | Maximum length: 200 |
body.account.individual.registered_address.postal_code | string | Optional | Maximum length: 5000 |
body.account.individual.registered_address.state | string | Optional | Maximum length: 5000 |
body.account.individual.relationship | object | Optional | |
body.account.individual.relationship.director | boolean | Optional | |
body.account.individual.relationship.executive | boolean | Optional | |
body.account.individual.relationship.owner | boolean | Optional | |
body.account.individual.relationship.percent_ownership | JSON | Optional | |
body.account.individual.relationship.percent_ownership (anyOf 1) | number | Alternative | |
body.account.individual.relationship.percent_ownership (anyOf 2) | string | Alternative | One of: |
body.account.individual.relationship.title | string | Optional | Maximum length: 5000 |
body.account.individual.ssn_last_4 | string | Optional | Maximum length: 5000 |
body.account.individual.verification | object | Optional | |
body.account.individual.verification.additional_document | object | Optional | |
body.account.individual.verification.additional_document.back | string | Optional | Maximum length: 500 |
body.account.individual.verification.additional_document.front | string | Optional | Maximum length: 500 |
body.account.individual.verification.document | object | Optional | |
body.account.individual.verification.document.back | string | Optional | Maximum length: 500 |
body.account.individual.verification.document.front | string | Optional | Maximum length: 500 |
body.account.tos_shown_and_accepted | boolean | Optional | |
body.bank_account | object | Optional | The bank account this token will represent. |
body.bank_account.account_holder_name | string | Optional | Maximum length: 5000 |
body.bank_account.account_holder_type | string | Optional | One of: company, individual Maximum length: 5000 |
body.bank_account.account_number | string | Required within parent | Maximum length: 5000 |
body.bank_account.account_type | string | Optional | One of: checking, futsu, savings, toza Maximum length: 5000 |
body.bank_account.country | string | Required within parent | Maximum length: 5000 |
body.bank_account.currency | string | Optional | Format: currency |
body.bank_account.payment_method | string | Optional | Maximum length: 5000 |
body.bank_account.routing_number | string | Optional | Maximum length: 5000 |
body.card | JSON | Optional | The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user’s credit card details, with the options described below. |
body.card (anyOf 1) | object | Alternative | |
body.card (anyOf 1).address_city | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).address_country | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).address_line1 | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).address_line2 | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).address_state | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).address_zip | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).currency | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).cvc | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).exp_month | string | Required within parent | Maximum length: 5000 |
body.card (anyOf 1).exp_year | string | Required within parent | Maximum length: 5000 |
body.card (anyOf 1).name | string | Optional | Maximum length: 5000 |
body.card (anyOf 1).networks | object | Optional | |
body.card (anyOf 1).networks.preferred | string | Optional | One of: cartes_bancaires, mastercard, visa |
body.card (anyOf 1).number | string | Required within parent | Maximum length: 5000 |
body.card (anyOf 2) | string | Alternative | Maximum length: 5000 |
body.customer | string | Optional | Create a token for the customer, which is owned by the application’s account. You can only use this with an [OAuth access token](https://docs.stripe.com/connect/standard-accounts) or [Stripe-Account header](https://docs.stripe.com/connect/authentication). Learn more about [cloning saved payment methods](https://docs.stripe.com/connect/cloning-saved-payment-methods). Maximum length: 5000 |
body.cvc_update | object | Optional | The updated CVC value this token represents. |
body.cvc_update.cvc | string | Required within parent | Maximum length: 5000 |
body.expand | array | Optional | Specifies which fields in the response should be expanded. |
body.expand[] | string | Each item | Maximum length: 5000 |
body.person | object | Optional | Information for the person this token represents. |
body.person.additional_tos_acceptances | object | Optional | |
body.person.additional_tos_acceptances.account | object | Optional | |
body.person.additional_tos_acceptances.account.date | integer | Optional | Format: unix-time |
body.person.additional_tos_acceptances.account.ip | string | Optional | |
body.person.additional_tos_acceptances.account.user_agent | JSON | Optional | |
body.person.additional_tos_acceptances.account.user_agent (anyOf 1) | string | Alternative | Maximum length: 5000 |
body.person.additional_tos_acceptances.account.user_agent (anyOf 2) | string | Alternative | One of: |
body.person.address | object | Optional | |
body.person.address.city | string | Optional | Maximum length: 100 |
body.person.address.country | string | Optional | Maximum length: 5000 |
body.person.address.line1 | string | Optional | Maximum length: 200 |
body.person.address.line2 | string | Optional | Maximum length: 200 |
body.person.address.postal_code | string | Optional | Maximum length: 5000 |
body.person.address.state | string | Optional | Maximum length: 5000 |
body.person.address_kana | object | Optional | |
body.person.address_kana.city | string | Optional | Maximum length: 5000 |
body.person.address_kana.country | string | Optional | Maximum length: 5000 |
body.person.address_kana.line1 | string | Optional | Maximum length: 5000 |
body.person.address_kana.line2 | string | Optional | Maximum length: 5000 |
body.person.address_kana.postal_code | string | Optional | Maximum length: 5000 |
body.person.address_kana.state | string | Optional | Maximum length: 5000 |
body.person.address_kana.town | string | Optional | Maximum length: 5000 |
body.person.address_kanji | object | Optional | |
body.person.address_kanji.city | string | Optional | Maximum length: 5000 |
body.person.address_kanji.country | string | Optional | Maximum length: 5000 |
body.person.address_kanji.line1 | string | Optional | Maximum length: 5000 |
body.person.address_kanji.line2 | string | Optional | Maximum length: 5000 |
body.person.address_kanji.postal_code | string | Optional | Maximum length: 5000 |
body.person.address_kanji.state | string | Optional | Maximum length: 5000 |
body.person.address_kanji.town | string | Optional | Maximum length: 5000 |
body.person.dob | JSON | Optional | |
body.person.dob (anyOf 1) | object | Alternative | |
body.person.dob (anyOf 1).day | integer | Required within parent | |
body.person.dob (anyOf 1).month | integer | Required within parent | |
body.person.dob (anyOf 1).year | integer | Required within parent | |
body.person.dob (anyOf 2) | string | Alternative | One of: |
body.person.documents | object | Optional | |
body.person.documents.company_authorization | object | Optional | |
body.person.documents.company_authorization.files | array | Optional | |
body.person.documents.company_authorization.files[] | JSON | Each item | |
body.person.documents.company_authorization.files[] (anyOf 1) | string | Alternative | Maximum length: 500 |
body.person.documents.company_authorization.files[] (anyOf 2) | string | Alternative | One of: |
body.person.documents.passport | object | Optional | |
body.person.documents.passport.files | array | Optional | |
body.person.documents.passport.files[] | JSON | Each item | |
body.person.documents.passport.files[] (anyOf 1) | string | Alternative | Maximum length: 500 |
body.person.documents.passport.files[] (anyOf 2) | string | Alternative | One of: |
body.person.documents.visa | object | Optional | |
body.person.documents.visa.files | array | Optional | |
body.person.documents.visa.files[] | JSON | Each item | |
body.person.documents.visa.files[] (anyOf 1) | string | Alternative | Maximum length: 500 |
body.person.documents.visa.files[] (anyOf 2) | string | Alternative | One of: |
body.person.email | string | Optional | |
body.person.first_name | string | Optional | Maximum length: 5000 |
body.person.first_name_kana | string | Optional | Maximum length: 5000 |
body.person.first_name_kanji | string | Optional | Maximum length: 5000 |
body.person.full_name_aliases | JSON | Optional | |
body.person.full_name_aliases (anyOf 1) | array | Alternative | |
body.person.full_name_aliases (anyOf 1)[] | string | Each item | Maximum length: 5000 |
body.person.full_name_aliases (anyOf 2) | string | Alternative | One of: |
body.person.gender | string | Optional | |
body.person.id_number | string | Optional | Maximum length: 5000 |
body.person.id_number_secondary | string | Optional | Maximum length: 5000 |
body.person.last_name | string | Optional | Maximum length: 5000 |
body.person.last_name_kana | string | Optional | Maximum length: 5000 |
body.person.last_name_kanji | string | Optional | Maximum length: 5000 |
body.person.maiden_name | string | Optional | Maximum length: 5000 |
body.person.metadata | JSON | Optional | |
body.person.metadata (anyOf 1) | object | Alternative | Additional keys: see wildcard field |
body.person.metadata (anyOf 1).* | string | Additional keys | |
body.person.metadata (anyOf 2) | string | Alternative | One of: |
body.person.nationality | string | Optional | Maximum length: 5000 |
body.person.phone | string | Optional | |
body.person.political_exposure | string | Optional | One of: existing, none |
body.person.registered_address | object | Optional | |
body.person.registered_address.city | string | Optional | Maximum length: 100 |
body.person.registered_address.country | string | Optional | Maximum length: 5000 |
body.person.registered_address.line1 | string | Optional | Maximum length: 200 |
body.person.registered_address.line2 | string | Optional | Maximum length: 200 |
body.person.registered_address.postal_code | string | Optional | Maximum length: 5000 |
body.person.registered_address.state | string | Optional | Maximum length: 5000 |
body.person.relationship | object | Optional | |
body.person.relationship.authorizer | boolean | Optional | |
body.person.relationship.director | boolean | Optional | |
body.person.relationship.executive | boolean | Optional | |
body.person.relationship.legal_guardian | boolean | Optional | |
body.person.relationship.owner | boolean | Optional | |
body.person.relationship.percent_ownership | JSON | Optional | |
body.person.relationship.percent_ownership (anyOf 1) | number | Alternative | |
body.person.relationship.percent_ownership (anyOf 2) | string | Alternative | One of: |
body.person.relationship.representative | boolean | Optional | |
body.person.relationship.title | string | Optional | Maximum length: 5000 |
body.person.ssn_last_4 | string | Optional | |
body.person.us_cfpb_data | object | Optional | |
body.person.us_cfpb_data.ethnicity_details | object | Optional | |
body.person.us_cfpb_data.ethnicity_details.ethnicity | array | Optional | |
body.person.us_cfpb_data.ethnicity_details.ethnicity[] | string | Each item | One of: cuban, hispanic_or_latino, mexican, not_hispanic_or_latino, other_hispanic_or_latino, prefer_not_to_answer, puerto_rican |
body.person.us_cfpb_data.ethnicity_details.ethnicity_other | string | Optional | Maximum length: 5000 |
body.person.us_cfpb_data.race_details | Model | Optional | Expand Create a person — accounts post Accounts Account People — request body — body us cfpb data race details |
body.person.us_cfpb_data.self_identified_gender | string | Optional | Maximum length: 5000 |
body.person.verification | object | Optional | |
body.person.verification.additional_document | object | Optional | |
body.person.verification.additional_document.back | string | Optional | Maximum length: 500 |
body.person.verification.additional_document.front | string | Optional | Maximum length: 500 |
body.person.verification.document | object | Optional | |
body.person.verification.document.back | string | Optional | Maximum length: 500 |
body.person.verification.document.front | string | Optional | Maximum length: 500 |
body.pii | object | Optional | The PII this token represents. |
body.pii.id_number | string | Optional | Maximum length: 5000 |
Referenced models: Create a person — accounts post Accounts Account People — request body — body us cfpb data race details
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve a token — response body |
Referenced models: Retrieve a token — response body
Schemas
Section titled “Schemas”703 more schemas are linked from the tables above, on the schema pages.
Retrieve a token — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. Use our [recommended payments integrations](https://docs.stripe.com/payments) to perform this process on the client-side. This guarantees that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way. If you can't use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. If your integration uses this method, you're responsible for any PCI compliance that it might require, and you must keep your secret API key safe. Unlike with client-side tokenization, your customer's information isn't sent directly to Stripe, so we can't determine how it's handled or stored. You can't store or use tokens more than once. To store card or bank account information for later use, create [Customer](https://docs.stripe.com/api#customers) objects or [External accounts](/api#external_accounts). [Radar](https://docs.stripe.com/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization. |
bank_account | Model | Optional | Expand Retrieve a bank account — response body |
card | Model | Optional | Expand Retrieve a card — customers get Customers Customer Cards Id — response body |
client_ip | JSON | Optional | |
client_ip (anyOf 1) | string | Alternative | IP address of the client that generates the token. Maximum length: 5000 |
client_ip (anyOf 2) | null | Alternative | |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: token |
type | string | Required within parent | Type of the token: `account`, `bank_account`, `card`, or `pii`. Maximum length: 5000 |
used | boolean | Required within parent | Determines if you have already used this token (you can only use tokens once). |
Referenced models: Retrieve a bank account — response body, Retrieve a card — customers get Customers Customer Cards Id — response body
Create a person — accounts post Accounts Account People — request body — body us cfpb data race details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
race | array | Optional | |
race[] | string | Each item | One of: african_american, american_indian_or_alaska_native, asian, asian_indian, black_or_african_american, chinese, ethiopian, filipino, guamanian_or_chamorro, haitian, jamaican, japanese, korean, native_hawaiian, native_hawaiian_or_other_pacific_islander, nigerian, other_asian, other_black_or_african_american, other_pacific_islander, prefer_not_to_answer, samoan, somali, vietnamese, white |
race_other | string | Optional | Maximum length: 5000 |
Delete a customer — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: customer |
Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currently_due | JSON | Optional | |
currently_due (anyOf 1) | array | Alternative | Fields that need to be resolved to keep the external account enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled. |
currently_due (anyOf 1)[] | string | Each item | Maximum length: 5000 |
currently_due (anyOf 2) | null | Alternative | |
errors | JSON | Optional | |
errors (anyOf 1) | array | Alternative | Fields that are `currently_due` and need to be collected again because validation or verification failed. |
errors (anyOf 1)[] | Model | Each item | Expand Update an Account Capability — response body — requirements errors item |
errors (anyOf 2) | null | Alternative | |
past_due | JSON | Optional | |
past_due (anyOf 1) | array | Alternative | Fields that haven't been resolved by `current_deadline`. These fields need to be resolved to enable the external account. |
past_due (anyOf 1)[] | string | Each item | Maximum length: 5000 |
past_due (anyOf 2) | null | Alternative | |
pending_verification | JSON | Optional | |
pending_verification (anyOf 1) | array | Alternative | Fields that are being reviewed, or might become required depending on the results of a review. If the review fails, these fields can move to `eventually_due`, `currently_due`, `past_due` or `alternatives`. Fields might appear in `eventually_due`, `currently_due`, `past_due` or `alternatives` and in `pending_verification` if one verification fails but another is still pending. |
pending_verification (anyOf 1)[] | string | Each item | Maximum length: 5000 |
pending_verification (anyOf 2) | null | Alternative |
Referenced models: Update an Account Capability — response body — requirements errors item
Retrieve a card — customers get Customers Customer Cards Id — response body — networks
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
preferred | JSON | Optional | |
preferred (anyOf 1) | string | Alternative | The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. Maximum length: 5000 |
preferred (anyOf 2) | null | Alternative |
Create an account — response body — groups The groups associated with the account payments pricing
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
payments_pricing | JSON | Optional | |
payments_pricing (anyOf 1) | string | Alternative | The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details. Maximum length: 5000 |
payments_pricing (anyOf 2) | null | Alternative |
Create an account — response body — tos acceptance
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | JSON | Optional | |
date (anyOf 1) | JSON | Alternative | |
date (anyOf 1) (anyOf 1) | integer | Alternative | The Unix timestamp marking when the account representative accepted their service agreement Format: unix-time |
date (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
date (anyOf 2) | null | Alternative | |
ip | JSON | Optional | |
ip (anyOf 1) | string | Alternative | The IP address from which the account representative accepted their service agreement Maximum length: 5000 |
ip (anyOf 2) | null | Alternative | |
service_agreement | string | Optional | The user's service agreement type Maximum length: 5000 |
user_agent | JSON | Optional | |
user_agent (anyOf 1) | string | Alternative | The user agent of the browser from which the account representative accepted their service agreement Maximum length: 5000 |
user_agent (anyOf 2) | null | Alternative |
Create an account — response body — controller
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
fees | Model | Optional | Expand Create an account — response body — controller fees |
is_controller | boolean | Optional | `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://docs.stripe.com/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. |
losses | Model | Optional | Expand Create an account — response body — controller losses |
requirement_collection | string | Optional | A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. Known values: application, stripe |
stripe_dashboard | Model | Optional | Expand Create an account — response body — controller stripe dashboard |
type | string | Required within parent | The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. Known values: account, application |
Referenced models: Create an account — response body — controller fees, Create an account — response body — controller losses, Create an account — response body — controller stripe dashboard
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.posttokens. Catalog operation: PostTokens. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}