Payment Tokenization
Payment tokenization is the process of replacing a sensitive card number (PAN — Primary Account Number) with a non-sensitive substitute called a token. The token can be stored on merchant systems and used for future charges without exposing the real card data, dramatically reducing the scope of PCI DSS compliance.
Payment tokenization is the process of replacing a sensitive card number (PAN — Primary Account Number) with a non-sensitive substitute called a token. The token can be stored on merchant systems and used for future charges without exposing the real card data, dramatically reducing the scope of PCI DSS compliance.
There are two distinct types of tokenization used in payments:
Merchant tokenization (vault tokens): The payment gateway receives the card number, stores it in a secure vault, and returns a gateway-specific token (e.g., tok_1234abcd). The merchant stores this token. Future charges pass the token to the gateway, which looks up the real card in its vault and processes the charge. The token is specific to that gateway — it cannot be used with a different processor.
Network tokenization (device tokens): The card network (Visa, Mastercard) issues a device account number (DAN) that represents the real PAN in the network's Token Service Provider (TSP) infrastructure. This is the technology behind Apple Pay and Google Pay. Network tokens are tied to a specific device and merchant, rotate automatically when the physical card is replaced, and carry cryptograms that prove the payment came from the enrolled device.
Tokenization directly reduces PCI DSS scope. If a merchant stores only tokens and the gateway vault is breached by a third party, the stolen tokens are useless — they cannot be used at other merchants and do not expose real card numbers. The real PAN is only decrypted within the gateway's vaulting environment during charge processing.
The tokenization flow also integrates with client-side JavaScript libraries (Stripe.js, Braintree Drop-in). The JavaScript intercepts the card form submission, sends the card data directly to the gateway over TLS, and replaces the form values with a token before the form is submitted to the merchant's server — so the merchant's server never receives the card number in a request parameter. This is the recommended pattern for all web checkout forms.