recommended payments integrations to * perform this process client-side. This ensures that no sensitive card data * touches your server, and allows your integration to operate in a PCI-compliant * way. * * If you cannot use client-side tokenization, you can also create tokens using the * API with either your publishable or secret API key. Keep in mind that if your * integration uses this method, you are responsible for any PCI compliance that * may be required, and you must keep your secret API key safe. Unlike with * client-side tokenization, your customer's information is not sent directly to * Stripe, so we cannot determine how it is handled or stored. * * Tokens cannot be stored or used more than once. To store card or bank account * information for later use, you can create Customer objects or Custom accounts. Note * that Radar, our integrated solution * for automatic fraud protection, performs best with integrations that use * client-side tokenization. * * Related guide: Accept * a payment * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property \Stripe\BankAccount $bank_account
These bank accounts are payment methods on Customer
objects.
On the other hand External Accounts are transfer destinations on Account
objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: Bank Debits and Transfers.
* @property \Stripe\Card $cardYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: Card Payments with Sources.
* @property null|string $client_ip IP address of the client that generated the token. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property bool $livemode Has the valuetrue
if the object exists in live mode or the value false
if the object exists in test mode.
* @property string $type Type of the token: account
, bank_account
, card
, or pii
.
* @property bool $used Whether this token has already been used (tokens can be used only once).
*/
class Token extends ApiResource
{
const OBJECT_NAME = 'token';
use ApiOperations\Create;
use ApiOperations\Retrieve;
const TYPE_ACCOUNT = 'account';
const TYPE_BANK_ACCOUNT = 'bank_account';
const TYPE_CARD = 'card';
const TYPE_PII = 'pii';
}