Create a person token v1

POST /v1/tokens

Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with a Connect account. Learn more about account tokens.

In live mode, you can only create person tokens with your application’s publishable key. In a sandbox, you can create person tokens with your secret or publishable key.

Parameters

  • personobjectRequired

    Information for the person this token represents.

Returns

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

curl https://api.stripe.com/v1/tokens \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d "person[first_name]=Jane" \
-d "person[last_name]=Doe" \
-d "person[relationship][owner]=true"
Response
{
"id": "cpt_1EDww82eZvKYlo2CsdelTHFu",
"object": "token",
"client_ip": "8.21.168.117",
"created": 1552582904,
"livemode": false,
"redaction": null,
"type": "person",
"used": false
}

Create a PII token v1

POST /v1/tokens

Creates a single-use token that represents the details of personally identifiable information (PII). You can use this token in place of an id_number or id_number_secondary in Account or Person Update API methods. You can only use a PII token once.

Parameters

  • piiobjectRequired

    The PII this token represents.

Returns

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

curl https://api.stripe.com/v1/tokens \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d "pii[id_number]=000000000"
Response
{
"id": "pii_18PwbX2eZvKYlo2CzRXgwN3J",
"object": "token",
"client_ip": "124.123.76.134",
"created": 1466783547,
"livemode": false,
"redaction": null,
"type": "pii",
"used": false
}

Create an account token v1

POST /v1/tokens

Creates a single-use token that wraps a user’s legal entity information. Use this when creating or updating a Connect account. Learn more about account tokens.

In live mode, you can only create account tokens with your application’s publishable key. In a sandbox, you can create account tokens with your secret or publishable key.

Parameters

  • accountobjectRequired

    Information for the account this token represents.

Returns

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

curl https://api.stripe.com/v1/tokens \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d "account[business_type]=individual" \
-d "account[individual][first_name]=Jane" \
-d "account[individual][last_name]=Doe" \
-d "account[tos_shown_and_accepted]=true"
Response
{
"id": "ct_1BZ6xr2eZvKYlo2CsSOhuTfi",
"object": "token",
"client_ip": "104.198.25.169",
"created": 1513297331,
"livemode": false,
"redaction": null,
"type": "account",
"used": false
}