API reference
Tokens
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. 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 objects or External accounts. Radar, our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization.
https://api.knoxapi.comCreate 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.
Body parameters
accountobjectInformation for the account this token represents.
Show 4 child parameters
business_typestringPossible valuescompanygovernment_entityindividualnon_profit
companyobjectShow 26 child parameters
addressobjectChild parameters are listed in the OpenAPI document.
address_kanaobjectChild parameters are listed in the OpenAPI document.
address_kanjiobjectChild parameters are listed in the OpenAPI document.
administrative_addressobjectChild parameters are listed in the OpenAPI document.
directors_providedbooleandirectorship_declarationobjectChild parameters are listed in the OpenAPI document.
executives_providedbooleanexport_license_idstringexport_purpose_codestringnamestringname_kanastringname_kanjistringowners_providedbooleanownership_declarationobjectChild parameters are listed in the OpenAPI document.
ownership_declaration_shown_and_signedbooleanownership_exemption_reasonstringPossible valuesqualified_entity_exceeds_ownership_thresholdqualifies_as_financial_institution
phonestringprincipal_place_of_businessobjectChild parameters are listed in the OpenAPI document.
registration_dateobjectChild parameters are listed in the OpenAPI document.
registration_numberstringrepresentative_declarationobjectChild parameters are listed in the OpenAPI document.
structurestringPossible valuesfree_zone_establishmentfree_zone_llcgovernment_instrumentalitygovernmental_unitincorporated_non_profitincorporated_partnershiplimited_liability_partnershipllcmulti_member_llcprivate_companyprivate_corporationprivate_partnershippublic_companypublic_corporationpublic_partnershipregistered_charity- and 7 more
tax_idstringtax_id_registrarstringvat_idstringverificationobjectChild parameters are listed in the OpenAPI document.
individualobjectShow 23 child parameters
addressobjectChild parameters are listed in the OpenAPI document.
address_kanaobjectChild parameters are listed in the OpenAPI document.
address_kanjiobjectChild parameters are listed in the OpenAPI document.
dobobjectChild parameters are listed in the OpenAPI document.
emailstringfirst_namestringfirst_name_kanastringfirst_name_kanjistringfull_name_aliasesarray of stringsgenderstringid_numberstringid_number_secondarystringlast_namestringlast_name_kanastringlast_name_kanjistringmaiden_namestringmetadataobjectphonestringpolitical_exposurestringPossible valuesexistingnone
registered_addressobjectChild parameters are listed in the OpenAPI document.
relationshipobjectChild parameters are listed in the OpenAPI document.
ssn_last_4stringverificationobjectChild parameters are listed in the OpenAPI document.
tos_shown_and_acceptedboolean
bank_accountobjectThe bank account this token will represent.
Show 8 child parameters
account_numberstringRequiredcountrystringRequiredaccount_holder_namestringaccount_holder_typestringPossible valuescompanyindividual
account_typestringPossible valuescheckingfutsusavingstoza
currencystringpayment_methodstringrouting_numberstring
cardobject | stringThe 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.
Show 13 child parameters
exp_monthstringRequiredexp_yearstringRequirednumberstringRequiredaddress_citystringaddress_countrystringaddress_line1stringaddress_line2stringaddress_statestringaddress_zipstringcurrencystringcvcstringnamestringnetworksobjectShow 1 child parameter
preferredstringPossible valuescartes_bancairesmastercardvisa
customerstringCreate a token for the customer, which is owned by the application's account. You can only use this with an OAuth access token or Stripe-Account header. Learn more about cloning saved payment methods.
cvc_updateobjectThe updated CVC value this token represents.
Show 1 child parameter
cvcstringRequired
expandarray of stringsSpecifies which fields in the response should be expanded.
personobjectInformation for the person this token represents.
Show 27 child parameters
additional_tos_acceptancesobjectShow 1 child parameter
accountobjectChild parameters are listed in the OpenAPI document.
addressobjectShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
address_kanaobjectShow 7 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestringtownstring
address_kanjiobjectShow 7 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestringtownstring
dobobjectShow 3 child parameters
dayintegerRequiredmonthintegerRequiredyearintegerRequired
documentsobjectShow 3 child parameters
company_authorizationobjectChild parameters are listed in the OpenAPI document.
passportobjectChild parameters are listed in the OpenAPI document.
visaobjectChild parameters are listed in the OpenAPI document.
emailstringfirst_namestringfirst_name_kanastringfirst_name_kanjistringfull_name_aliasesarray of stringsgenderstringid_numberstringid_number_secondarystringlast_namestringlast_name_kanastringlast_name_kanjistringmaiden_namestringmetadataobjectnationalitystringphonestringpolitical_exposurestringPossible valuesexistingnone
registered_addressobjectShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
relationshipobjectShow 8 child parameters
authorizerbooleandirectorbooleanexecutivebooleanlegal_guardianbooleanownerbooleanpercent_ownershipnumberrepresentativebooleantitlestring
ssn_last_4stringus_cfpb_dataobjectShow 3 child parameters
ethnicity_detailsobjectChild parameters are listed in the OpenAPI document.
race_detailsobjectChild parameters are listed in the OpenAPI document.
self_identified_genderstring
verificationobjectShow 2 child parameters
additional_documentobjectChild parameters are listed in the OpenAPI document.
documentobjectChild parameters are listed in the OpenAPI document.
piiobjectThe PII this token represents.
Show 1 child parameter
id_numberstring
Returns
The token object.
curl -X POST https://api.knoxapi.com/v1/tokens \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const token = await stripe.tokens.create();import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
token = client.v1.tokens.create()require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
token = Stripe::Token.create(){
"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": "pass",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2030,
"fingerprint": "AOB934RVNwzk6xtn",
"funding": "credit",
"id": "card_1Pgc7BB7WZ01zgkWeZoy4YdD",
"last4": "4242",
"metadata": {},
"name": null,
"networks": {
"preferred": null
},
"object": "card",
"tokenization_method": null,
"regulated_status": null
},
"client_ip": null,
"created": 1234567890,
"id": "tok_1Pgc7BB7WZ01zgkWptnajzKJ",
"livemode": false,
"object": "token",
"type": "card",
"used": false
}Retrieve a token
GET/v1/tokens/{token}
Retrieves the token with the given ID.
Path parameters
tokenstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The token object.
curl https://api.knoxapi.com/v1/tokens/tok_1Pgc7BB7WZ01zgkWptnajzKJ \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const token = await stripe.tokens.retrieve('tok_1Pgc7BB7WZ01zgkWptnajzKJ');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
token = client.v1.tokens.retrieve("tok_1Pgc7BB7WZ01zgkWptnajzKJ")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
token = Stripe::Token.retrieve('tok_1Pgc7BB7WZ01zgkWptnajzKJ'){
"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": "pass",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2030,
"fingerprint": "AOB934RVNwzk6xtn",
"funding": "credit",
"id": "card_1Pgc7BB7WZ01zgkWeZoy4YdD",
"last4": "4242",
"metadata": {},
"name": null,
"networks": {
"preferred": null
},
"object": "card",
"tokenization_method": null,
"regulated_status": null
},
"client_ip": null,
"created": 1234567890,
"id": "tok_1Pgc7BB7WZ01zgkWptnajzKJ",
"livemode": false,
"object": "token",
"type": "card",
"used": false
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.