Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

The Token object


The Token object

Attributes

  • id string Unique identifier for the object.
  • card nullable object Hash describing the card used to make the charge.

More attributes

  • object string, value is "token"
  • bank _ account nullable object
  • client _ ip nullable string
  • created timestamp
  • description nullable string
  • livemode boolean
  • type string
  • used boolean

The Token object

{ "id": "tok_1N3T00LkdIwHu7ixt44h1F8k", "object": "token", "card": { "id": "card_1N3T00LkdIwHu7ixRdxpVI1Q", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "unchecked", "dynamic_last4": null, "exp_month": 5, "exp_year": 2026, "fingerprint": "mToisGZ01V71BCos", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "tokenization_method": null, "wallet": null }, "client_ip": "52.35.78.6", "created": 1683071568, "livemode": false, "type": "card", "used": false}

Create a bank account token

POST / v1 / tokens

Creates a single-use token that represents a bank account’s details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a connected account where controller.requirement_collection is application, which includes Custom accounts.

Parameters

  • bank _ account object The bank account this token will represent.

More parameters

  • customer string Connect only

Returns

Returns the created bank account token if it’s successful. Otherwise, this call raises an error.

Response

{ "id": "btok_1N3T00LkdIwHu7ixt44h1F8k", "object": "token", "bank_account": { "id": "ba_1NWScr2eZvKYlo2C8MgV5Cwn", "object": "bank_account", "account_holder_name": "Jenny Rosen", "account_holder_type": "individual", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtz", "last4": "6789", "routing_number": "110000000", "status": "new" }, "client_ip": null, "created": 1689981645, "livemode": false, "redaction": null, "type": "bank_account", "used": false}

Create a card token

POST / v1 / tokens

Creates a single-use token that represents a credit card’s details. You can use this token in place of a credit card dictionary with any v1 API method. You can only use these tokens once by creating a new Charge object or by attaching them to a Customer object.

To use this functionality, you need to enable access to the raw card data APIs. In most cases, you can use our recommended payments integrations instead of using the API.

Parameters

  • card object | string 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.

Returns

Returns the created card token if it’s successful. Otherwise, this call raises an error.

Response

{ "id": "tok_1N3T00LkdIwHu7ixt44h1F8k", "object": "token", "card": { "id": "card_1N3T00LkdIwHu7ixRdxpVI1Q", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "unchecked", "dynamic_last4": null, "exp_month": 5, "exp_year": 2026, "fingerprint": "mToisGZ01V71BCos", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "tokenization_method": null, "wallet": null }, "client_ip": "52.35.78.6", "created": 1683071568, "livemode": false, "type": "card", "used": false}
Last verified 2026-09-24

Is this helpful?