Skip to content

Infrastructure

Card tokenization: PAN, vaults, card-on-file, and network tokens explained

Understand card tokenization, vaults, card-on-file, network tokens, portability, and the impact of credentials on a multi-PSP architecture.

17 min readBy Gustavo Sanchez Palencia
Editorial illustration for the article: Card tokenization: PAN, vaults, card-on-file, and network tokens explained

Tokenization is one of the most widely used words in payments and, at the same time, one of the easiest to oversimplify. In many projects, anything that is not the original card number ends up being called a token. That does little to help when the architecture needs to decide where to store credentials, how to reuse them, how to move transactions between providers, or how to reduce exposure to sensitive data.

Understanding tokenization requires separating concepts that often appear together: PAN, vault tokens, card-on-file, network tokens, scope, portability, and authorization for subsequent use.

The question is not simply whether a token exists. The right question is: who issued this token, where is it valid, in what context can it be used, and what architectural dependency does it create?

What is card tokenization?

Tokenization is the process of replacing a sensitive payment credential with an alternative value that can represent that credential within a defined scope.

For cards, the original credential is usually the PAN, or Primary Account Number. Instead of storing and reusing the PAN for each new charge, systems can work with a token issued by a tokenization infrastructure.

The token reduces the need to expose the primary data in subsequent flows. Depending on the model, it can also impose usage restrictions, such as merchant, device, channel, or transaction type.

This does not mean every token is universally secure or portable. Security depends on the overall design and control over the relationship between the token and the original credential.

What is a PAN?

The PAN is the primary payment account number on a card. It is the most sensitive and most familiar identifier in the card payment flow.

When a checkout receives a PAN directly, that data enters the application's technical and security scope. The more components handle the credential, the greater the exposure surface and the greater the operational responsibility.

Tokenization aims to reduce this propagation.

In a mature architecture, the PAN should pass through the smallest possible number of necessary systems. Once it has been tokenized, business applications can use a substitute identifier to reference the credential without needing to know the original number in routine operations.

Is a token the same as encryption?

No.

Encryption transforms data using an algorithm and a key, allowing the original value to be recovered by whoever holds the appropriate key. Tokenization replaces the data with another identifier and normally relies on a service or vault that maintains the association or the ability to resolve the token.

The two mechanisms can coexist.

A vault can store encrypted data and issue tokens to applications. What matters architecturally is that the application stops using the PAN as an operational identifier.

This reduces coupling between sensitive data and product logic.

What is a card vault?

A vault is the infrastructure responsible for securely storing or controlling payment credentials and issuing identifiers that can be used later.

The merchant submits or captures the credential through an appropriate flow, and the vault creates a token and returns that identifier to the application.

The application can then associate the token with a customer or payment method without storing the PAN directly.

For future charges, the token is sent to the infrastructure that can resolve it and execute the transaction.

This architecture is especially useful for recurring payments, one-click purchases, and experiences involving stored credentials.

Does every vault token work with any PSP?

No.

This is one of the most important points for multi-PSP operations.

A token created by a provider's vault may only be valid within that provider. If the application sends the same identifier to another PSP, the second system may have no way to resolve it.

This means a company can have three payment integrations and still have a critical dependency on a single vault.

In the diagram, the operation looks like a multi-PSP setup. In practice, the stored credential limits which routes can actually be used.

That is why credential portability needs to be part of the orchestration strategy from the start.

What is card-on-file?

Card-on-file describes a card credential retained for subsequent use within a commercial relationship.

The concept appears in subscriptions, recurring purchases, mobility, marketplaces, delivery, accommodation, and any experience in which the user does not want to reenter their details for every transaction.

Card-on-file alone does not define how the credential is stored. It may be represented by a vault token, a network token, or another mechanism compatible with the infrastructure in use.

The central point is that there is a persistent relationship between the customer and a reusable credential.

That relationship requires consent, traceability, and appropriate handling of card changes, expiration, and cancellation.

What is a network token?

A network token is a token issued or managed within the card scheme and payment network ecosystem to represent the original credential in a controlled context.

Instead of relying exclusively on a PSP's proprietary token, the credential can be represented by an identifier linked to the card network, accompanied by the elements needed to authenticate its use in a transaction.

EMVCo's Payment Tokenisation specification describes precisely this replacement of the PAN with a Payment Token and the ability to restrict the domain in which that token is used.

Network tokens can offer lifecycle advantages and, in certain scenarios, greater portability between compatible participants. But this does not mean any network token can be sent to any acquirer without additional requirements.

Compatibility remains a concrete integration consideration.

Are PSP tokens and network tokens the same thing?

No.

A PSP token is normally an internal identifier issued by that provider's infrastructure to represent a credential stored in its vault.

A network token belongs to a different layer of the ecosystem and follows standards associated with card networks.

The two can appear together. A PSP may hide all the complexity of network tokenization and provide only its own identifier to the merchant. In another design, the application may work with an external token and also provide a cryptogram or specific authorization metadata.

AZPay's documentation covers both card tokenization and scenarios involving external network tokens, showing that these capabilities do not need to be treated as synonyms.

What is a DPAN?

DPAN is a term frequently used to represent the digital account number associated with a network token.

It serves as a substitute for the original PAN within the context defined by tokenization.

The merchant does not usually need to turn this distinction into a product rule. But payment teams need to understand it when working with integrations that receive network tokens directly.

There may also be cryptograms and dynamic data that prove the token is being used in a valid transaction.

That is why a network token should not be thought of as simply an alternative number.

Does tokenization automatically reduce PCI scope?

Not automatically.

Tokenization can reduce exposure to sensitive data and help limit which components need to handle PANs, but compliance scope depends on the entire flow.

If the application still receives, logs, or transmits primary data before tokenization, responsibility for that path remains.

Likewise, logs, queues, analytics, or support tools can reintroduce sensitive data if the system is not designed carefully.

The architecture should map where the PAN enters, where it is tokenized, and which components can see it.

Security does not happen simply because an API returned a token.

Does tokenization improve the checkout experience?

It can.

By securely retaining a credential for subsequent use, the operation can enable experiences such as one-click purchasing, quick repeat purchases, and recurring billing.

This reduces the number of fields the customer needs to complete in future journeys.

But convenience needs to be balanced with control. The interface should make it clear which method will be used and provide mechanisms for removing or updating credentials when applicable.

In addition, a stored credential does not eliminate authentication or risk analysis. Depending on the market and context, new transactions may require additional controls.

Why does tokenization matter for recurring payments?

Recurring payments depend on a credential that can be used after the first purchase.

Storing PANs directly in the application increases complexity and risk. A token allows future charges to be initiated without repeating the capture of the primary credential.

This separates subscription logic from secure card storage logic.

The application knows which token belongs to the customer and the subscription. The payment infrastructure knows how to turn that token into a valid transaction.

This separation matters because it allows the recurring payment system to evolve without spreading sensitive data across multiple services.

Should the token be a customer identifier?

No.

A common mistake is to use the payment token as if it were the customer's primary identity.

Tokens can change, expire, be replaced, be migrated, or become invalid. A customer can also have multiple cards.

The application domain should have its own stable identifiers for the customer, subscription, and payment method.

The token is a credential associated with those entities, not the commercial identity itself.

This distinction makes migrations and card updates much safer.

What happens when a card is reissued?

Cards change over time.

A card can expire, be replaced because of fraud, receive a new number, or undergo an update within the card scheme's ecosystem.

Depending on the tokenization model, the infrastructure may be able to update the relationship between the token and the underlying credential without requiring the merchant to capture the details again.

This is one reason network tokens can be useful in long-running journeys.

But the application still needs to handle states in which the credential is no longer usable and ask the customer to update it when necessary.

Tokenization does not eliminate the lifecycle. It creates a layer for managing it better.

What is credential portability?

Portability is the ability to continue using a stored credential when the operation changes its provider or processing route.

This becomes critical in migrations and multi-PSP architectures.

If all customer cards are represented by tokens exclusive to PSP A, migrating to PSP B may require a specific vault transfer process, retokenization, or recapturing the credentials.

Without planning, changing vendors can be much harder than changing an endpoint.

That is why a PSP evaluation should include questions about secure credential export, supported formats, migration processes, and compatibility with network tokens.

Payment lock-in may reside in the vault, not the API.

To turn this assessment into execution, see the roadmap for PSP migration with recurring billing, covering subscription cohorts, control of pending cycles, and criteria for returning to the original provider.

How does tokenization affect Smart Routing?

Smart Routing can only choose between routes that can actually be executed.

If a transaction uses a credential that only PSP A understands, the engine may calculate that PSP B would be better, but there is no viable path.

This shows that routing is not just a scoring function.

The decision needs to consider route capabilities: method, currency, country, authentication, available credential, and token compatibility.

A mature routing engine does not just ask which provider is healthy. It asks which providers can process that specific transaction.

Tokenization is part of the routing context.

What does client-side tokenization mean?

Some architectures use SDKs or frontend components to capture card data and exchange it for a token before the PAN reaches the merchant's main server.

This can reduce the business backend's exposure.

The application receives an identifier and uses that identifier to create the charge.

The benefit depends on how the flow is implemented and which responsibilities remain with the merchant. But the principle is useful: sensitive data should pass through as few components as possible.

AZPay's documentation covers SDK and tokenization capabilities in precisely this area of client-side integration.

Automatic and explicit tokenization

There are different points at which a token can be created.

In an automatic strategy, a successful charge may result in the creation of a reusable token without the application making a separate call.

In an explicit strategy, the application requests tokenization before a charge or as a specific operation.

AZPay's documentation describes both patterns in its card tokenization feature.

The choice depends on the journey. In some products, tokenizing only after a successful charge simplifies the flow. In others, a credential needs to be validated and stored before the first actual charge.

What is zero-auth, and how does it relate to tokenization?

Zero-auth is a flow used to validate a credential without making a traditional financial charge.

It can be useful when the application wants to verify a card before storing it for later use.

In AZPay's documentation, zero-auth is connected to tokenization: validating the credential first and then tokenizing it can prevent invalid methods from being stored.

This is especially useful for subscriptions with a free trial or experiences in which a card is registered before there is an amount to charge.

Once again, the important point is to distinguish credential validation from financial authorization.

How can orphaned tokens be avoided?

When creating tokens, the operation needs to manage their lifecycle.

A user may start registering and abandon the process. They may add a card and remove it seconds later. There may be duplicates among equivalent credentials. A token may remain active even without any useful commercial association.

The application should maintain a clear relationship between the token, customer, and payment method.

It should also have a removal or deactivation policy for when the credential should no longer be used.

Tokenization without governance can produce a growing inventory of credentials that are difficult to account for.

Logs should not expose PANs

Tokenization loses some of its value if PANs continue to appear in logs, traces, or support systems.

Payment payloads need to be handled carefully in observability.

Sensitive fields should be redacted or excluded. APM tools should not receive primary data simply because they automatically capture request bodies.

This is an example of why security needs to extend across the entire architecture.

The token reduces exposure in the core logic, but supporting pipelines also need to respect that boundary.

How should tokenized payments be reconciled?

For reconciliation, the token is normally not sufficient as the only reference.

The operation needs to relate the order, payment, attempt, provider transaction id, amount, currency, and financial states.

The token identifies a credential, not the entire transaction.

Separating these identities makes it easier to investigate failures and chargebacks.

It also prevents a token change from destroying a customer's financial history.

Tokenization and chargebacks

Tokenization protects credentials, but it does not eliminate disputes.

A transaction can use a valid token and still be disputed by the cardholder.

That is why systems need to retain evidence of purchase context, authentication, authorization, and delivery when relevant.

The token indicates which credential was represented. It does not prove on its own that the transaction was legitimate.

Credential security and risk management are complementary layers.

What does AZPay offer in this area?

AZPay's public documentation covers card tokenization for credential reuse, automatic and explicit tokenization flows, zero-auth for validation, external network tokens, and recurring payments.

This creates a coherent foundation for journeys in which a company needs to store payment methods, charge them again, and combine those credentials with other infrastructure capabilities.

The important point is not simply having a tokenization endpoint. It is understanding how the credential participates in the rest of the payment lifecycle.

Tokenization, recurring payments, 3DS, fraud prevention, orchestration, and observability are parts of the same system.

How should a tokenization strategy be chosen?

The first question is where the PAN enters the system.

The second is who issues and maintains the token.

The third is how long the credential needs to exist.

The fourth is which routes it needs to work on.

The fifth is how it will be migrated if the company changes vendors.

The sixth is how the customer updates or removes the credential.

The seventh is how incidents and failures will be investigated without exposing sensitive data.

These questions reveal more about the quality of the architecture than simply confirming that tokenization exists.

The token is part of the architecture, not just security

Tokenization often began as a direct response to the need to protect card data. In modern operations, it also affects the product, recurring payments, portability, routing, and experience.

A token can determine whether a payment can be sent to an alternative route. It can determine whether a subscription survives a change of PSP. It can enable a one-click purchase. It can reduce the number of systems that handle PANs.

That is why treating tokenization merely as a compliance detail limits the discussion.

The right architecture starts by identifying what needs to be protected and ends by understanding how the credential should circulate throughout the customer's lifecycle.

When this layer is well designed, the card stops being data copied between systems and becomes a controlled credential with an identity, scope, and lifecycle.