Book a free call

Payment Tokenization: How It Protects Card Data

Payment tokenization replaces card numbers with tokens that are useless if stolen. Here is how it works, where it helps, and what to ask your payment provider.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Payment Tokenization: How It Protects Card Data
On this page

Short answer

Payment tokenization is the practice of replacing a card number with a token, a random value that stands in for the card in a specific system. If the token is stolen, it cannot be used to pay elsewhere, because the token only works where it was issued and only for its intended purpose.

What is payment tokenization?

Payment tokenization is a security method that swaps a real card number for a token at the point where the card is first accepted, and then uses the token for every later step in that system.

When a customer pays, the card number travels to a token vault, which is a secure store run by the payment network, the gateway or a token service provider. The vault returns a token, and the merchant stores the token instead of the card number. Later charges, refunds and subscriptions use the token, and the vault maps it back to the real card when the payment is processed.

Token type Who issues it Where it works
Network token Card network such as Visa or Mastercard Across merchants using that network
Gateway token Payment gateway or processor Within that gateway only
Merchant token Merchant or its token provider Within that merchant's systems
Device token Phone wallet such as Apple Pay On that device, for that card

Tokenization is not the same as encryption. Encryption scrambles the card number but the result can be unscrambled with the key. A token has no mathematical relationship to the card number, so there is no key that turns a token back into a card.

How does a payment token work?

A payment token works by keeping the real card number in one secure vault and using a substitute value everywhere else, so a breach of the merchant's systems exposes tokens, not cards.

  1. First payment. The customer enters the card number, which is sent to the token vault over a secure connection.
  2. Token issued. The vault stores the card number and returns a token, often with rules attached, such as which merchant and which device may use it.
  3. Token stored. The merchant stores the token in its database and uses it for later charges, refunds and subscriptions.
  4. Token used. When a payment is needed, the merchant sends the token to the vault, which maps it to the real card and completes the charge.
  5. Card updated. When a card is replaced, network tokens can be updated automatically, so subscriptions keep working without asking the customer for new details.

The vault is the single point of trust. It must be run by a provider that meets the payment industry's security standards, and the merchant never sees the card number again after the first payment.

Network tokens vs gateway tokens

Network tokens and gateway tokens differ in who issues them and how widely they can be used: network tokens work across merchants, while gateway tokens work only inside one gateway.

Network tokens are issued by the card networks. Because the network controls the vault, a network token can be updated when a card is replaced, which reduces failed subscription payments. Networks also attach extra data, such as a cryptogram that proves the token is genuine, which can improve approval rates.

Gateway tokens are issued by a payment gateway or processor. They are simpler to set up, because the gateway handles the vault and the merchant changes little. The drawback is lock-in: moving to another gateway usually means re-tokenizing every stored card, which is a project in itself.

Many merchants use both. Network tokens handle recurring payments and card updates, while gateway tokens cover the merchant's internal systems. The right mix depends on how many gateways you use and how often your customers' cards change.

Where payment tokenization helps most

Payment tokenization helps most where card numbers are stored and reused: subscriptions, saved cards in a shop or app, and marketplaces that pay out to many sellers.

Subscriptions benefit first. A stored card that is tokenized keeps working when the physical card is replaced, and a breach of the subscription database exposes tokens that cannot be used elsewhere. That combination cuts both failed payments and breach risk.

Saved cards in e-commerce benefit next. Customers expect a one-click checkout, and tokenization lets the merchant offer it without storing card numbers. The checkout feels fast to the customer and the merchant's compliance scope shrinks, because the card data lives in the vault, not in the shop's database.

Marketplaces and platforms benefit because they hold payment details for many sellers and buyers. Tokens let them route payments and refunds without ever holding the underlying card numbers, which simplifies their security reviews and audits.

Tokenization does not help where the card is used once and never stored. A single guest checkout gains little, because there is no stored card to protect.

Example (hypothetical): a subscription shop

Example (hypothetical): a subscription shop has 8,000 customers paying monthly. Before tokenization it stores card numbers in its own database, and about 6% of monthly charges fail because cards have expired or been replaced.

At 8,000 customers, 6% is 480 failed charges a month. Each failed charge takes about 10 minutes of support time to chase, which is 480 times 10 minutes, or 4,800 minutes, which is 80 hours a month.

The shop switches to network tokens. When cards are replaced, the tokens update automatically, and the failure rate falls to 2%. That is 160 failed charges a month, or 160 times 10 minutes, which is about 27 hours a month.

The shop saves about 53 hours a month of support time, and the card numbers are no longer in its database. The saving comes from fewer failures, not from the tokens themselves, and it depends on the vault updating tokens when cards change.

What are the common mistakes?

The most common payment tokenization mistakes are treating tokens as a full security fix, mixing token types without a plan, and forgetting the vault when changing providers.

  • Thinking tokens replace all security. Tokens protect stored card numbers, but they do not stop fraud on the first payment or protect other customer data.
  • Mixing token types. Using gateway tokens in one system and network tokens in another creates confusion about which token works where.
  • No plan for provider changes. Moving gateways with gateway tokens means re-tokenizing every card, which teams discover too late.
  • Ignoring token lifecycle. Tokens can expire or be revoked. If the system does not handle that, payments fail silently.
  • Storing card numbers anyway. If any system still keeps the real card number, the compliance scope does not shrink.

What to ask your payment provider

You should ask your payment provider who runs the vault, which token types are supported, how card updates are handled, and what happens if you change providers.

  1. Who runs the vault? Ask whether the vault is run by the network, the gateway or a third party, and what security certifications it holds.
  2. Which token types are supported? Ask whether network tokens, gateway tokens or both are available, and which one your checkout will use.
  3. How are card updates handled? Ask whether tokens update automatically when a card is replaced, and what the failure rate looks like.
  4. What does it cost? Ask whether tokenization is included in the processing fee or charged separately, and check the vendor pricing page.
  5. What if we switch providers? Ask how stored tokens move to a new provider, and whether re-tokenization is needed.

The answers shape the real cost and the real benefit. A cheap tokenization service that locks you into one gateway can cost more over time than a slightly dearer one that uses network tokens.

Key takeaways

  • A token replaces the card number everywhere except the vault
  • Network tokens update when cards change; gateway tokens lock you in
  • Subscriptions and saved cards gain the most from tokenization
  • Tokens protect stored cards, not the first payment
  • Ask who runs the vault before you sign

Frequently asked questions

Is payment tokenization the same as encryption?

No. Encryption scrambles a card number into a form that can be unscrambled with a key. Tokenization replaces the card number with a random token that has no mathematical link to the card, so there is no key that turns a token back into a card number.

Does tokenization remove the need for PCI DSS compliance?

No, but it can reduce the scope. If card numbers are never stored or processed in your systems, fewer of the PCI DSS requirements apply to you. The token vault and the payment provider still carry their own compliance duties, and your systems still need basic security controls.

What happens if a token is stolen?

A stolen token is of little use on its own, because it only works in the system and for the purpose it was issued for. A token issued for one merchant cannot be used at another, and a token tied to one device cannot be used from a different device.

Do tokens work for refunds?

Yes. A refund can be issued against the token, and the vault maps it back to the original card. The merchant never needs the card number again after the first payment, which is one of the main benefits of tokenization.

How is payment tokenization different from asset tokenization?

Payment tokenization replaces card numbers with tokens to protect payment data. Asset tokenization turns real-world assets such as property or funds into tokens on a blockchain so they can be traded. The word is shared, but the purpose and the technology are different.

Should a small shop bother with tokenization?

Yes, if it stores cards for repeat customers or subscriptions. Most payment gateways offer tokenization as a standard feature, and the shop gains safer storage and fewer failed payments without building anything itself. A shop that only takes one-off guest payments gains less.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a payment flow and want card data out of your systems? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Crypto Payment Gateway service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call