Ensure your integration with the Network Tokenization API works correctly by simulating network tokenization in Test Mode.

Step 1: Create a Pagos Account or Sign In

If you’re interested in Network Tokenization, you can try it out in Test Mode. Sign up for a Pagos account or log into your existing account, then click the environment toggle in the top-right corner; a yellow bar will appear across the top of the Pagos Service Panel to confirm you’re in Test Mode.

Step 2: Generate Your Test Mode API Key

In Test Mode, generate an API Key for the Network Tokenization API.
These API Keys are universal across Test Mode and will be used for testing all Pagos API products. If you’ve already created an API key in Test Mode, you don’t need to create a new one.
To generate your API key:
1

Click your settings icon in the top-right corner of your Pagos Service Panel.
2

Under Developers, click API Keys.
3

In the API Keys tab, click Create API Key to add a new key to your account.
4

In the side panel that opens, set your Key Name, then click Create API Key.
5

Copy your new API Key and store it somewhere secure.
This is the only time you can view this key!
6

Click I’ve Copied My Keys to confirm and exit the side panel.

Step 3: Test Provisioning a Network Token

Use our test PANs to test provisioning a network token in Test Mode.

Step 4: Test Transacting With a Token

You can test fetching a cryptogram on the tokenRefId returned for a card you successfully tokenized.
{
    "cryptogram": "eY1KRnm18Uawh78qUjzWeQ==",
    "token": "4552981839633026",
    "eci": "07",
    "metadata": null,
    "expirationDate": {
        "year": "2026",
        "month": "06"
    }
}

Step 5: Test Requesting Account Data

You can test requesting account data on the tokenRefId returned for a card you successfully tokenized. The response for your /account call will include a cardArt array containing URLs to the card image file(s).
Amex and Discover cards don’t support card art at this time.
{
    "cardNetworkName": "visa",
    "tokenAccount": {
        "last4": "0002",
        "expirationDate": {
            "month": "06",
            "year": "2026"
        },
        "par": "V2831416512995186306443704057"
    },
    "backgroundColor": "0xffffff",
    "foregroundColor": "0x000000",
    "labelColor": null,
    "contactName": null,
    "contactWebsite": null,
    "contactEmail": null,
    "contactNumber": null,
    "termsAndConditionsUrl": null,
    "privacyPolicyUrl": null,
    "shortDescription": "Test Visa Dark Card",
    "longDescription": null,
    "cardArt": [
        {
            "url": "https://assets.sandbox.pagos.ai/card-art/visa/522e753f-3873-4cb7-90ae-18a458dcfc6f.png",
            "description": null,
            "height": 100,
            "width": 100,
            "type": "card_art"
        },
        {
            "url": "https://assets.sandbox.pagos.ai/card-art/visa/b58c78b7-32a6-4e87-80e2-b3a3b0c12a91.png",
            "description": null,
            "height": 969,
            "width": 1536,
            "type": "card_art"
        }
    ],
    "metadata": null,
    "assetStatus": "available"
}

Step 6: Test Requesting the Status of a Token

You can test requesting a token’s status using the tokenRefId returned for a card you successfully tokenized. The response for your /status call will include random year and month values, following the examples below:
{
    "tokenRefId": "visa-8e9c3493ce9a2e299b7242b43254b625",
    "expirationDate": {
        "year": "2024",
        "month": "09"
    },
    "status": "active",
    "cardNetworkName": "visa",
    "panLast4": "1100"
}

Step 7: Test Token Status Changes

Network Tokenization Test Mode is stateful, meaning all token status actions will persist for the life of a token.
Use the tokenRefId returned for a card you successfully tokenized to test the following status changes:

Test PANs

All test PANs will pass Luhn verification checks.
VISA TEST PANPROVISIONING RESPONSE
4000000000000002Success
4000000000000010ProvisionDataExpired
4000000000000028CardVerificationFailed
4000000000000036CardNotEligible
4000000000000044CardNotAllowed
4000000000000051CardDeclined
4000000000000069ProvisionNotAllowed
4000000000000077InvalidTokenStatus
4000000000000085Success
4000000000000093Success
MASTERCARD TEST PANPROVISIONING RESPONSE
5100000000000008Success
5100000000000024CardNotEligible
5100000000000032IssuerDeclined
5100000000000040InvalidInput
5100000000000057InvalidInput
5100000000000065Success
5100000000000073Success
DISCOVER TEST PANPROVISIONING RESPONSE
6011000000000004Success
6011000000000012ProvisionDataExpired
6011000000000020CardVerificationFailed
6011000000000038CardNotEligible
6011000000000046CardNotAllowed
6011000000000053CardDeclined
6011000000000061ProvisionNotAllowed
AMEX TEST PANPROVISIONING RESPONSE
370000000000002Success
370000000000010CardMarketNotSupported
370000000000028CardNotEligible
370000000000036CardCannotBeTokenized
370000000000044IssuerNotSupported
370000000000051CardCancelled
370000000000069Success
370000000000077Success