Skip to Content
Docs

Retrieve a network token and cryptogram

Read the network token Pay.com holds for a saved card, and request a cryptogram for a payment you make through another provider.

You can read the network token Pay.com holds for a saved card, and request a cryptogram to pay with it outside Pay.com. Both endpoints take a card payment method's pm_card_ ID.

The response holds the token's full number. Handle it as you handle card numbers, and keep it out of your logs.

Retrieve the token

Call GET /v1/payment_methods/{id}/network_token with the payment method's ID.

curl https://api.sandbox.pay.com/v1/payment_methods/pm_card_296645958265997316/network_token \
  -u ':sk-pay-com-sandbox-…'
FieldDescription
numberThe network token's number.
exp_month, exp_yearThe token's expiration month and year, which can differ from the card's.
payment_account_referenceThe payment account reference (PAR). It stays the same across the card account's numbers and tokens.
token_serviceThe network's token service: vts (Visa), mdes (Mastercard), or aets (American Express). Empty if none applies.
requestor_idThe ID of the token requestor the token was issued to.

Request a cryptogram

Call GET /v1/payment_methods/{id}/network_token/cryptogram for each payment you make with the token.

This endpoint is not idempotent. Every call generates a new cryptogram from the card network, so disable automatic HTTP retries on this request.

curl https://api.sandbox.pay.com/v1/payment_methods/pm_card_296645958265997316/network_token/cryptogram \
  -u ':sk-pay-com-sandbox-…'

Forward the token instead

Vault forwarding sends a request to another provider with the token filled in, so your server never handles the raw token number. Use the network_token.number, network_token.exp_month, network_token.exp_year, network_token.cryptogram, and network_token.eci placeholders. See Vault forwarding and Placeholders.

Next steps

Was this page helpful?