Skip to Content
Docs

Network tokens

Save cards as network tokens from Visa, Mastercard, and American Express, which keep working when the issuer replaces the card.

A network token is a number the card network issues in place of the card's own number. Pay.com requests network tokens from the Visa Token Service (VTS), the Mastercard Digital Enablement Service (MDES), and the American Express Token Service (AETS) for the cards you save, and charges the cards with them.

Why use network tokens

A network token is tied to the customer's card account, not to one card number.

  • Saved cards stay current. When the issuer replaces a card, its network token keeps working, so you keep charging the same pm_card_ payment method without asking the customer for the new card.
  • Each payment carries a cryptogram. The network makes a cryptogram for each payment, which shows the issuer that the token came from the merchant it was issued to. This can help raise authorization rates.

How Pay.com uses them

Pay.com adds a network token to a card you save and uses it when you charge the card. You don't change how you charge saved cards.

  1. You save a card. Pay.com asks the card network for a network token and sends the payment_method.network_token.provisioned webhook when the network issues it.
  2. You charge the pm_card_ payment method. When network token authorization is on, Pay.com sends the token to the issuer instead of the card number, and can retry with the card number if the issuer declines.
  3. If the network token is deleted, Pay.com sends the payment_method.network_token.deleted webhook.

Not every card gets a network token, so a saved card can have none. You still charge it the same way.

Wallet tokens and payouts

Apple Pay and Google Pay also pay with a network token, the device's Device Primary Account Number (DPAN). When Pay.com decrypts the wallet's token, it sends the DPAN and its cryptogram for you. When you decrypt it yourself, send it as a network_token with token_type set to applepay or googlepay, and the cryptogram and ECI in three_ds. See Send the cryptogram.

Payouts take a network token as a destination, with the cryptogram at the top level of network_token. See Pay out to a network token.

Choose a flow

Each flow has its own guide.

Webhooks

Pay.com sends these events about a payment method's network token. Set up an endpoint for them in Webhooks.

EventSent when
payment_method.network_token.provisionedThe card network issued a network token for the payment method.
payment_method.network_token.deletedThe payment method's network token was deleted.

Each event's payload is in Payment method events.

Was this page helpful?