Skip to main content
Network tokens are an add-on feature and may be subject to extra charges.
For an overview of network tokens, how they work, and why to use them, see Network Tokens.

Provisioning

In Commerce, network tokens are provisioned automatically. Commerce tokens can be enriched with network tokens from the card schemes: once a card payment method undergoes tokenization, and if the network tokens feature is enabled for your account, Commerce requests a network token from the card scheme and associates it with the token in the background. If this operation is successful, the network token status is updated to active. The network token’s lifecycle is aligned with the Commerce token — you do not provision or manage it separately.

Identifying a network token

Your processor shows a network token payment by the token’s own card-like number, the TPAN. To match it against a Commerce token, the token resource carries the TPAN in masked form next to the masked card number: Filter the token list by the last four digits of the TPAN the same way you filter by the card number:
The value is four characters; anything else is rejected with a validation error. The filter only matches tokens whose digits are already stored. All three fields are also part of the token.created and token.updated webhook payloads, the PAR again only when scheme references are enabled. The network token is provisioned after the token is created, so token.created normally carries null digits; they arrive with a token.updated event.
Only the masked digits leave the card data environment. The full TPAN stays PCI-scoped and is only available through payment data.
The digits are filled in as the card scheme reports them: at provisioning for newly created tokens, and for tokens provisioned earlier on their next payment-data request or through a backfill run by Hellgate. Every change is announced by a token.updated webhook. Until then the fields are null while network_token_status is already active. Visa reports the PAR only at provisioning, so Visa tokens provisioned earlier stay without one. When the network token is deleted, the digits and the PAR are cleared.

Payment Account Reference

The Payment Account Reference (PAR) is a scheme-issued identifier for the underlying card account. The card number (FPAN) and every network token derived from it share the same PAR, so it lets you recognize one card across its tokens and across channels without handling card data. It cannot be used to make a payment.

Network token payments

To use a network token for payment authorization, a cryptogram must first be requested. It is created and used during the payment request as proof of token validation for card transactions requiring authorization, helping to authenticate the transaction and ensure its integrity. The sequence diagram below shows how to use a network token and request a cryptogram. Both the network token (TPAN) and its cryptogram are PCI-scoped data. You can consume a payment-data bundle in two ways:
  • Decrypt it yourself — read encrypted_authentication_data from the response, decrypt it with your merchant key, and send the network token and cryptogram to your PSP. This requires you to handle PCI-scoped data.
  • Forward without handling card data — let Commerce inject the network token, cryptogram, and related fields into your acquirer request server-side, so the raw values never reach your systems.
In the Managed Ecosystem operating model, encrypted_authentication_data is not returned. Use forwarding to authorize payments.

Step 1: Request authentication data

Commerce allows you to create these cryptograms using a previously imported token.

Step 2: Decrypt authentication data

Commerce processes the request and returns the encrypted authentication data. This encrypted authentication data contains the network token and the cryptogram. For more information, please refer to our API documentation. The network token is used to authenticate the transaction, and the cryptogram is used to validate the network token. To decrypt the payload, follow these steps:
  • Use the encryption_key that was generated when the merchant was created
  • Use the encrypted_authentication_data string, which you receive as part of requesting a cryptogram response
Below is an example of how to perform decryption in Elixir. However, this can also be accomplished using your preferred programming language.
The decrypted payload will be in JSON format and will appear as follows:

Step 3: Authorize with your PSP

Forward without handling card data

If you would rather not decrypt and handle the network token and cryptogram yourself, forward your acquirer request through POST /payment-data/{id}/forward. Commerce forwards the request to the destination URL configured in your merchant settings and injects the PCI-scoped values via placeholders, so the raw network token and cryptogram never touch your systems. This is the only way to authorize payments in the Managed Ecosystem operating model. Reference each value with a placeholder in your request body: Number placeholders are strings by default; append | unwrap to emit the native type, for example {{ expiration_year | unwrap }}. See Forward payment-data for the full reference. Under the hood this builds on Guardian’s cryptogram forwarding.