Tokens

Create a card token

The createCardToken() method takes a CreateCardTokenRequest object as its only parameter.

$request = $stripe->tokens->createCardTokenRequest("4242424242424242", 1, 2020);
$stripe->tokens->createCardToken($request);

Create a bank account token

The createBankAccountToken() method takes a CreateBankAccountTokenRequest object as its only parameter.

$request = $stripe->tokens->createBankAccountTokenRequest("US", "110000000", "000123456789");
$stripe->tokens->createBankAccountToken($request);

Retrieve a token

$token = $stripe->tokens->getTOken("token_id");