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.
- You save a card. Pay.com asks the card network for a network token and sends the
payment_method.network_token.provisionedwebhook when the network issues it. - 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. - If the network token is deleted, Pay.com sends the
payment_method.network_token.deletedwebhook.
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.
Provision network tokens
Request a token when you save a card or charge one, and set your account's default.
Authorize with network tokens
Pay with the token, and retry with the card number when the issuer declines.
Pass an existing network token
Charge or save a network token you already hold, such as a decrypted wallet token.
Retrieve a network token
Read a saved card's token and request a cryptogram for a payment made elsewhere.
Webhooks
Pay.com sends these events about a payment method's network token. Set up an endpoint for them in Webhooks.
| Event | Sent when |
|---|---|
payment_method.network_token.provisioned | The card network issued a network token for the payment method. |
payment_method.network_token.deleted | The payment method's network token was deleted. |
Each event's payload is in Payment method events.