Stripe Tokens API

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

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/tokens Tokenize sensitive details · Post tokens #
Ask an LLM
“How do I turn bank account details into a single-use token?”
“Can I tokenize person or account details for a connected account?”
Tell an agent
Create a token for bank account {bank_account}.
Tokenize card {card} for customer {customer}.
GET /v1/tokens/{token} Get a token · Get tokens token #
Ask an LLM
“How do I check what a token represents?”
“Has this token already been used?”
Tell an agent
Show token {token}.
Check whether token {token} is used.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stripe-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stripe-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stripe Tokens API
  description: Needs description.
  contact:
    email: dev-platform@stripe.com
    name: Stripe Dev Platform Team
    url: https://stripe.com
  termsOfService: https://stripe.com/us/terms/
  version: '2023-10-16'
  x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Tokens
paths:
  /v1/tokens:
    post:
      description: 'Creates a single-use token that represents a bank account’s details.

        You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a Custom account.'
      operationId: PostTokens
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              account:
                explode: true
                style: deepObject
              bank_account:
                explode: true
                style: deepObject
              card:
                explode: true
                style: deepObject
              cvc_update:
                explode: true
                style: deepObject
              expand:
                explode: true
                style: deepObject
              person:
                explode: true
                style: deepObject
              pii:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostTokensRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/token'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      tags:
      - Tokens
      summary: Post tokens
      x-summary-source: derived
  /v1/tokens/{token}:
    get:
      description: Retrieves the token with the given ID.
      operationId: GetTokensToken
      parameters:
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - in: path
        name: token
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTokensTokenRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/token'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      tags:
      - Tokens
      summary: Get tokens token
      x-summary-source: derived
components:
  schemas:
    token:
      description: '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://stripe.com/docs/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://stripe.com/docs/api#customers)

        objects or [Custom accounts](https://stripe.com/docs/api#external_accounts).

        [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,

        performs best with integrations that use client-side tokenization.'
      properties:
        bank_account:
          $ref: '#/components/schemas/bank_account'
        card:
          $ref: '#/components/schemas/card'
        client_ip:
          description: IP address of the client that generates the token.
          maxLength: 5000
          type:
          - string
          - 'null'
        created:
          description: Time at which the object was created. Measured in seconds since the Unix epoch.
          format: unix-time
          type: integer
        id:
          description: Unique identifier for the object.
          maxLength: 5000
          type: string
        livemode:
          description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
          type: boolean
        object:
          description: String representing the object's type. Objects of the same type share the same value.
          enum:
          - token
          type: string
        type:
          description: 'Type of the token: `account`, `bank_account`, `card`, or `pii`.'
          maxLength: 5000
          type: string
        used:
          description: Determines if you have already used this token (you can only use tokens once).
          type: boolean
      required:
      - created
      - id
      - livemode
      - object
      - type
      - used
      title: Token
      type: object
      x-expandableFields:
      - bank_account
      - card
      x-resourceId: token
    GetTokensTokenRequest:
      type: object
      properties: {}
    error:
      description: An error response from the Stripe API
      properties:
        error:
          $ref: '#/components/schemas/api_errors'
      required:
      - error
      type: object
    PostTokensRequest:
      type: object
      properties:
        account:
          description: Information for the account this token represents.
          properties:
            business_type:
              enum:
              - company
              - government_entity
              - individual
              - non_profit
              type: string
              x-stripeBypassValidation: true
            company:
              properties:
                address:
                  properties:
                    city:
                      maxLength: 100
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 200
                      type: string
                    line2:
                      maxLength: 200
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                  title: address_specs
                  type: object
                address_kana:
                  properties:
                    city:
                      maxLength: 5000
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 5000
                      type: string
                    line2:
                      maxLength: 5000
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                    town:
                      maxLength: 5000
                      type: string
                  title: japan_address_kana_specs
                  type: object
                address_kanji:
                  properties:
                    city:
                      maxLength: 5000
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 5000
                      type: string
                    line2:
                      maxLength: 5000
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                    town:
                      maxLength: 5000
                      type: string
                  title: japan_address_kanji_specs
                  type: object
                directors_provided:
                  type: boolean
                executives_provided:
                  type: boolean
                export_license_id:
                  maxLength: 5000
                  type: string
                export_purpose_code:
                  maxLength: 5000
                  type: string
                name:
                  maxLength: 100
                  type: string
                name_kana:
                  maxLength: 100
                  type: string
                name_kanji:
                  maxLength: 100
                  type: string
                owners_provided:
                  type: boolean
                ownership_declaration:
                  properties:
                    date:
                      format: unix-time
                      type: integer
                    ip:
                      type: string
                    user_agent:
                      maxLength: 5000
                      type: string
                  title: company_ownership_declaration
                  type: object
                ownership_declaration_shown_and_signed:
                  type: boolean
                phone:
                  maxLength: 5000
                  type: string
                registration_number:
                  maxLength: 5000
                  type: string
                structure:
                  enum:
                  - ''
                  - 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
                  - single_member_llc
                  - sole_establishment
                  - sole_proprietorship
                  - tax_exempt_government_instrumentality
                  - unincorporated_association
                  - unincorporated_non_profit
                  - unincorporated_partnership
                  type: string
                  x-stripeBypassValidation: true
                tax_id:
                  maxLength: 5000
                  type: string
                tax_id_registrar:
                  maxLength: 5000
                  type: string
                vat_id:
                  maxLength: 5000
                  type: string
                verification:
                  properties:
                    document:
                      properties:
                        back:
                          maxLength: 500
                          type: string
                        front:
                          maxLength: 500
                          type: string
                      title: verification_document_specs
                      type: object
                  title: verification_specs
                  type: object
              title: connect_js_account_token_company_specs
              type: object
            individual:
              properties:
                address:
                  properties:
                    city:
                      maxLength: 100
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 200
                      type: string
                    line2:
                      maxLength: 200
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                  title: address_specs
                  type: object
                address_kana:
                  properties:
                    city:
                      maxLength: 5000
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 5000
                      type: string
                    line2:
                      maxLength: 5000
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                    town:
                      maxLength: 5000
                      type: string
                  title: japan_address_kana_specs
                  type: object
                address_kanji:
                  properties:
                    city:
                      maxLength: 5000
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 5000
                      type: string
                    line2:
                      maxLength: 5000
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                    town:
                      maxLength: 5000
                      type: string
                  title: japan_address_kanji_specs
                  type: object
                dob:
                  anyOf:
                  - properties:
                      day:
                        type: integer
                      month:
                        type: integer
                      year:
                        type: integer
                    required:
                    - day
                    - month
                    - year
                    title: date_of_birth_specs
                    type: object
                  - enum:
                    - ''
                    type: string
                email:
                  type: string
                first_name:
                  maxLength: 100
                  type: string
                first_name_kana:
                  maxLength: 5000
                  type: string
                first_name_kanji:
                  maxLength: 5000
                  type: string
                full_name_aliases:
                  anyOf:
                  - items:
                      maxLength: 300
                      type: string
                    type: array
                  - enum:
                    - ''
                    type: string
                gender:
                  type: string
                id_number:
                  maxLength: 5000
                  type: string
                id_number_secondary:
                  maxLength: 5000
                  type: string
                last_name:
                  maxLength: 100
                  type: string
                last_name_kana:
                  maxLength: 5000
                  type: string
                last_name_kanji:
                  maxLength: 5000
                  type: string
                maiden_name:
                  maxLength: 5000
                  type: string
                metadata:
                  anyOf:
                  - additionalProperties:
                      type: string
                    type: object
                  - enum:
                    - ''
                    type: string
                phone:
                  type: string
                political_exposure:
                  enum:
                  - existing
                  - none
                  type: string
                registered_address:
                  properties:
                    city:
                      maxLength: 100
                      type: string
                    country:
                      maxLength: 5000
                      type: string
                    line1:
                      maxLength: 200
                      type: string
                    line2:
                      maxLength: 200
                      type: string
                    postal_code:
                      maxLength: 5000
                      type: string
                    state:
                      maxLength: 5000
                      type: string
                  title: address_specs
                  type: object
                ssn_last_4:
                  maxLength: 5000
                  type: string
                verification:
                  properties:
                    additional_document:
                      properties:
                        back:
                          maxLength: 500
                          type: string
                        front:
                          maxLength: 500
                          type: string
                      title: person_verification_document_specs
                      type: object
                    document:
                      properties:
                        back:
                          maxLength: 500
                          type: string
                        front:
                          maxLength: 500
                          type: string
                      title: person_verification_document_specs
                      type: object
                  title: person_verification_specs
                  type: object
              title: individual_specs
              type: object
            tos_shown_and_accepted:
              type: boolean
          title: connect_js_account_token_specs
          type: object
        bank_account:
          description: The bank account this token will represent.
          properties:
            account_holder_name:
              maxLength: 5000
              type: string
            account_holder_type:
              enum:
              - company
              - individual
              maxLength: 5000
              type: string
            account_number:
              maxLength: 5000
              type: string
            account_type:
              enum:
              - checking
              - futsu
              - savings
              - toza
              maxLength: 5000
              type: string
            country:
              maxLength: 5000
              type: string
            currency:
              type: string
            routing_number:
              maxLength: 5000
              type: string
          required:
          - account_number
          - country
          title: token_create_bank_account
          type: object
          x-stripeBypassValidation: true
        card:
          anyOf:
          - properties:
              address_city:
                maxLength: 5000
                type: string
              address_country:
                maxLength: 5000
                type: string
              address_line1:
                maxLength: 5000
                type: string
              address_line2:
                maxLength: 5000
                type: string
              address_state:
                maxLength: 5000
                type: string
              address_zip:
                maxLength: 5000
                type: string
              currency:
                maxLength: 5000
                type: string
              cvc:
                maxLength: 5000
                type: string
              exp_month:
                maxLength: 5000
                type: string
              exp_year:
                maxLength: 5000
                type: string
              name:
                maxLength: 5000
                type: string
              number:
                maxLength: 5000
                type: string
            required:
            - exp_month
            - exp_year
            - number
            title: credit_card_specs
            type: object
          - maxLength: 5000
            type: string
          description: 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.
          x-stripeBypassValidation: true
        customer:
          description: 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://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
          maxLength: 5000
          type: string
        cvc_update:
          description: The updated CVC value this token represents.
          properties:
            cvc:
              maxLength: 5000
              type: string
          required:
          - cvc
          title: cvc_params
          type: object
        expand:
          description: Specifies which fields in the response should be expanded.
          items:
            maxLength: 5000
            type: string
          type: array
        person:
          description: Information for the person this token represents.
          properties:
            additional_tos_acceptances:
              properties:
                account:
                  properties:
                    date:
                      format: unix-time
                      type: integer
                    ip:
                      type: string
                    user_agent:
                      anyOf:
                      - maxLength: 5000
                        type: string
                      - enum:
                        - ''
                        type: string
                  title: settings_terms_of_service_specs
                  type: object
              title: person_additional_tos_acceptances_specs
              type: object
            address:
              properties:
                city:
                  maxLength: 100
                  type: string
                country:
                  maxLength: 5000
                  type: string
                line1:
                  maxLength: 200
                  type: string
                line2:
                  maxLength: 200
                  type: string
                postal_code:
                  maxLength: 5000
                  type: string
                state:
                  maxLength: 5000
                  type: string
              title: address_specs
              type: object
            address_kana:
              properties:
                city:
                  maxLength: 5000
                  type: string
                country:
                  maxLength: 5000
                  type: string
                line1:
                  maxLength: 5000
                  type: string
                line2:
                  maxLength: 5000
                  type: string
                postal_code:
                  maxLength: 5000
                  type: string
                state:
                  maxLength: 5000
                  type: string
                town:
                  maxLength: 5000
                  type: string
              title: japan_address_kana_specs
              type: object
            address_kanji:
              properties:
                city:
                  maxLength: 5000
                  type: string
                country:
                  maxLength: 5000
                  type: string
                line1:
                  maxLength: 5000
                  type: string
                line2:
                  maxLength: 5000
                  type: string
                postal_code:
                  maxLength: 5000
                  type: string
                state:
                  maxLength: 5000
                  type: string
                town:
                  maxLength: 5000
                  type: string
              title: japan_address_kanji_specs
              type: object
            dob:
              anyOf:
              - properties:
                  day:
                    type: integer
                  month:
                    type: integer
                  year:
                    type: integer
                required:
                - day
                - month
                - year
                title: date_of_birth_specs
                type: object
              - enum:
                - ''
                type: string
            documents:
              properties:
                company_authorization:
                  properties:
                    files:
                      items:
                        anyOf:
                        - maxLength: 500
                          type: string
                        - enum:
                          - ''
                          type: string
                      type: array
                  title: documents_param
                  type: object
                passport:
                  properties:
                    files:
                      items:
                        anyOf:
                        - maxLength: 500
                          type: string
                        - enum:
                          - ''
                          type: string
                      type: array
                  title: documents_param
                  type: object
                visa:
                  properties:
                    files:
                      items:
                        anyOf:
                        - maxLength: 500
                          type: string
                        - enum:
                          - ''
                          type: string
                      type: array
                  title: documents_param
                  type: object
              title: person_documents_specs
              type: object
            email:
              type: string
            first_name:
              maxLength: 5000
              type: string
            first_name_kana:
              maxLength: 5000
              type: string
            first_name_kanji:
              maxLength: 5000
              type: string
            full_name_aliases:
              anyOf:
              - items:
                  maxLength: 5000
                  type: string
                type: array
              - enum:
                - ''
                type: string
            gender:
              type: string
            id_number:
              maxLength: 5000
              type: string
            id_number_secondary:
              maxLength: 5000
              type: string
            last_name:
              maxLength: 5000
              type: string
            last_name_kana:
              maxLength: 5000
              type: string
            last_name_kanji:
              maxLength: 5000
              type: string
            maiden_name:
              maxLength: 5000
              type: string
            metadata:
              anyOf:
              - additionalProperties:
                  type: string
                type: object
              - enum:
                - ''
                type: string
            nationality:
              maxLength: 5000
              type: string
            phone:
              type: string
            political_exposure:
              maxLength: 5000
              type: string
            registered_address:
              properties:
                city:
                  maxLength: 100
                  type: string
                country:
                  maxLength: 5000
                  type: string
                line1:
                  maxLength: 200
                  type: string
                line2:
                  maxLength: 200
                  type: string
                postal_code:
                  maxLength: 5000
                  type: string
                state:
                  maxLength: 5000
                  type: string
              title: address_specs
              type: object
            relationship:
              properties:
                director:
                  type: boolean
                executive:
                  type: boolean
                legal_guardian:
                  type: boolean
                owner:
                  type: boolean
                percent_ownership:
                  anyOf:
                  - type: number
                  - enum:
                    - ''
                    type: string
                representative:
                  type: boolean
                title:
                  maxLength: 5000
                  type: string
              title: relationship_specs
              type: object
            ssn_last_4:
              type: string
            verification:
              properties:
                additional_document:
                  properties:
                    back:
                      maxLength: 500
                      type: string
                    front:
                      maxLength: 500
                      type: string
                  title: person_verification_document_specs
                  type: object
                document:
                  properties:
                    back:
                      maxLength: 500
                      type: string
                    front:
                      maxLength: 500
                      type: string
                  title: person_verification_document_specs
                  type: object
              title: person_verification_specs
              type: object
          title: person_token_specs
          type: object
        pii:
          description: The PII this token represents.
          properties:
            id_number:
              maxLength: 5000
              type: string
          title: pii_token_specs
          type: object
  securitySchemes:
    basicAuth:
      description: 'Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>'
      scheme: basic
      type: http
    bearerAuth:
      bearerFormat: auth-scheme
      description: 'Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>'
      scheme: bearer
      type: http