# Network Tokens Webhooks

## Network Tokens Webhooks - Mock Testing <a href="#network-tokens-webhooks---mock-testing" id="network-tokens-webhooks---mock-testing"></a>

You can test the various Network Token notifications using the mocks and the following methods:

### Method 1: Fixed Card Numbers for Specific Responses <a href="#method-1-fixed-card-numbers-for-specific-responses" id="method-1-fixed-card-numbers-for-specific-responses"></a>

Using specific card numbers with the Create Card API, you can simulate fixed Network Token notifications. The following table lists card numbers and the corresponding Network Token notifications you will receive upon making an enrollment/create card request:

| Test Card Number | Test CardIDs                                         | Expiration Date | Notification Event-Triggered | VGS Event/State/Reason\_Code                                                                                         | Expected Responses                                                                                                                                                                                        |
| ---------------- | ---------------------------------------------------- | --------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 5100260000039220 | CRDpqQNTZMPkjFh4iQJ28grPyZYfPy4nZodLgMPDyK4qEvUpXXQ2 | Any Future Date | CARD\_UPDATED                | <p>Event: cmp\_network\_token.updated<br>State: CARD\_UPDATED<br>Reason\_code: cmp\_card\_updated</p>                | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Card Updated Notification<br>3. GET response: Card and Network Token (card\_updated status) objects are available</p>      |
| 5100260000029221 | CRDLDNW4pyFMq2meBi3vp5Z88ff8Q8WCKbctmD7hL6CFrCuZGj4T | Any Future Date | SUSPENDED                    | <p>Event: cmp\_network\_token.updated<br>State: SUSPENDED<br>Reason\_code: cmp\_network\_token.suspended</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Suspended Notification<br>3. GET response: Card and Network Token (suspended status) objects are available</p>             |
| 5100260000019222 | CRDrc7GJqNHVAqX3eQFspL2eN7b6gRvj43Q4KRSpiqFEVJotEUcX | Any Future Date | ACTIVE                       | <p>Event: cmp\_network\_token.updated<br>State: ACTIVATED<br>Reason\_code: cmp\_network\_token.activated</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Activated Notification<br>3. GET response: Card and Network Token (activated status) objects are available</p>             |
| 5100260000009223 | CRDqj7n3kRVAmBsD3WkArj4M9tUAh5eDxXpMURUwydPHQ8YSK42F | Any Future Date | DELETED                      | <p>Event: cmp\_network\_token.updated<br>State: DELETED<br>Reason\_code: cmp\_network\_token.deleted</p>             | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Deleted Notification<br>3. GET response: Card and Network Token (deleted status) objects are available</p>                 |
| 5100260000099224 | CRDM1tW9LGUPXHH9BGPePkzC1PNTshezGBHyqURv7K771rQuQpuy | Any Future Date | PROVISIONING SUCCESSFUL      | <p>Event: cmp\_network\_token.updated<br>State: ACTIVE<br>Reason\_code: cmp\_network\_token.provisioned</p>          | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Successfully Provisioned Notification<br>3. GET response: Card and Network Token (active status) objects are available</p> |
| 5100260000089225 | CRDpX9ZT8hZtEorWeqb7AhEFmVg4NyvZybBhiJ2W5koED8asxcDv | Any Future Date | PROVISIONING FAILED          | <p>Event: cmp\_network\_token.updated<br>State: FAILED<br>Reason\_code: cmp\_network\_token.provisioning\_failed</p> | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Provisioning Failed Notification<br>3. GET response: Card and Network Token (failed status) objects are available</p>      |
| 4000210000029220 | CRDoxCWvA7CmBLR1mdsirzmtrECuUX1c5G3iqP6HV83zPPcRB7vE | Any Future Date | CARD\_UPDATED                | <p>Event: cmp\_network\_token.updated<br>State: CARD\_UPDATED<br>Reason\_code: cmp\_card\_updated</p>                | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Card Updated Notification<br>3. GET response: Card and Network Token (card\_updated status) objects are available</p>      |
| 4000210000019221 | CRDM6gJUNUt8BaxaPrJ46jJn6K9NZAN1ip71FrjzDoPe3DKw1wnW | Any Future Date | SUSPENDED                    | <p>Event: cmp\_network\_token.updated<br>State: SUSPENDED<br>Reason\_code: cmp\_network\_token.suspended</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Suspended Notification<br>3. GET response: Card and Network Token (suspended status) objects are available</p>             |
| 4000210000009222 | CRDoCwtdKzpDxbn1sowRCiPRneCMmhm6EogQGKGGi47Eh6KPXzj3 | Any Future Date | ACTIVE                       | <p>Event: cmp\_network\_token.updated<br>State: ACTIVATED<br>Reason\_code: cmp\_network\_token.activated</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Activated Notification<br>3. GET response: Card and Network Token (activated status) objects are available</p>             |
| 4000210000099223 | CRDqjBoPbYX9ZtVXpDX2vvSmtpUFq9DUHcbZUuTQ3XeXP8rxgge2 | Any Future Date | DELETED                      | <p>Event: cmp\_network\_token.updated<br>State: DELETED<br>Reason\_code: cmp\_network\_token.deleted</p>             | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Deleted Notification<br>3. GET response: Card and Network Token (deleted status) objects are available</p>                 |
| 4000210000089224 | CRDpSY16wcG9484FtM2h7DEhXkeQXdMaTpeJTaEvfutjnJa9BBTw | Any Future Date | PROVISIONING SUCCESSFUL      | <p>Event: cmp\_network\_token.updated<br>State: ACTIVE<br>Reason\_code: cmp\_network\_token.provisioned</p>          | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Successfully Provisioned Notification<br>3. GET response: Card and Network Token (active status) objects are available</p> |
| 4000210000079225 | CRDKLBY6Es9jW8vyJZnTPFWNNZVBVhWeoJJUUHZqWpvPhHxq1EmY | Any Future Date | PROVISIONING FAILED          | <p>Event: cmp\_network\_token.updated<br>State: FAILED<br>Reason\_code: cmp\_network\_token.provisioning\_failed</p> | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Provisioning Failed Notification<br>3. GET response: Card and Network Token (failed status) objects are available</p>      |

Known Fact about Network Token Notifications Mock Implementation: In the mock environment, the synchronous response from the Create Card API returns the expected cardID—which matches the Network Token notifications—and accurately replicates the card number, BIN, first 8 digits, and last 4 digits as provided in the request. However, the address and expiration date fields in the mock response will not match the values from the original request.

### Method 2: Any PAN with Specific Mastercard or Visa Bins + Last4 <a href="#method-2-any-pan-with-specific-mastercard-or-visa-bins--last4" id="method-2-any-pan-with-specific-mastercard-or-visa-bins--last4"></a>

You can also test Account Updater notifications using any 16-digit PAN (Primary Account Number) that starts with the Mastercard BIN (`510026`) or Visa BIN (`400021`) and ends with a last4 value in the range `9220`–`9225`. To do this, trigger the Create Card/Enrollment flow with a PAN constructed using the specified BIN and one of the supported last4 values.\
\
For Network Token notifications, the `network_token_bin` field has been added. We have also added a new `reason_code` field to help uniquely identify the Network Token event that was triggered.

To receive these notifications please ensure to set up the webhook URL on the dashboard. See [here](https://docs.verygoodsecurity.com/cmp/developer-resources/notifications) for details on notification set-up.

| Test Cards             | Expiry Date     | Notification Event-Triggered | VGS Event                                                                                                            | Expected Response                                                                                                                                                                                         |
| ---------------------- | --------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 510026\*\*\*\*\*\*9220 | Any Future Date | CARD\_UPDATED                | <p>Event: cmp\_network\_token.updated<br><br>State: CARD\_UPDATEDReason\_code: cmp\_card\_updated</p>                | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Card Updated Notification<br>3. GET response: Card and Network Token (card\_updated status) objects are available</p>      |
| 510026\*\*\*\*\*\*9221 | Any Future Date | SUSPENDED                    | <p>Event: cmp\_network\_token.updated<br><br>State: SUSPENDEDReason\_code: cmp\_network\_token.suspended</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Suspended Notification<br>3. GET response: Card and Network Token (suspended status) objects are available</p>             |
| 510026\*\*\*\*\*\*9222 | Any Future Date | ACTIVE                       | <p>Event: cmp\_network\_token.updated<br><br>State: ACTIVATEDReason\_code: cmp\_network\_token.activated</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Activated Notification<br>3. GET response: Card and Network Token (activated status) objects are available</p>             |
| 510026\*\*\*\*\*\*9223 | Any Future Date | DELETED                      | <p>Event: cmp\_network\_token.updated<br><br>State: DELETEDReason\_code: cmp\_network\_token.deleted</p>             | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Deleted Notification<br>3. GET response: Card and Network Token (deleted status) objects are available</p>                 |
| 510026\*\*\*\*\*\*9224 | Any Future Date | PROVISIONING SUCCESSFUL      | <p>Event: cmp\_network\_token.updated<br><br>State: ACTIVEReason\_code: cmp\_network\_token.provisioned</p>          | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Successfully Provisioned Notification<br>3. GET response: Card and Network Token (active status) objects are available</p> |
| 510026\*\*\*\*\*\*9225 | Any Future Date | PROVISIONING FAILED          | <p>Event: cmp\_network\_token.updated<br><br>State: FAILEDReason\_code: cmp\_network\_token.provisioning\_failed</p> | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Provisioning Failed Notification<br>3. GET response: Card and Network Token (failed status) objects are available</p>      |
| 400021\*\*\*\*\*\*9220 | Any Future Date | CARD\_UPDATED                | <p>Event: cmp\_network\_token.updated<br><br>State: CARD\_UPDATEDReason\_code: cmp\_card\_updated</p>                | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Card Updated Notification<br>3. GET response: Card and Network Token (card\_updated status) objects are available</p>      |
| 400021\*\*\*\*\*\*9221 | Any Future Date | SUSPENDED                    | <p>Event: cmp\_network\_token.updated<br><br>State: SUSPENDEDReason\_code: cmp\_network\_token.suspended</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Suspended Notification<br>3. GET response: Card and Network Token (suspended status) objects are available</p>             |
| 400021\*\*\*\*\*\*9222 | Any Future Date | ACTIVE                       | <p>Event: cmp\_network\_token.updated<br><br>State: ACTIVATEDReason\_code: cmp\_network\_token.activated</p>         | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Activated Notification<br>3. GET response: Card and Network Token (activated status) objects are available</p>             |
| 400021\*\*\*\*\*\*9223 | Any Future Date | DELETED                      | <p>Event: cmp\_network\_token.updated<br><br>State: DELETEDReason\_code: cmp\_network\_token.deleted</p>             | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Deleted Notification<br>3. GET response: Card and Network Token (deleted status) objects are available</p>                 |
| 400021\*\*\*\*\*\*9224 | Any Future Date | PROVISIONING SUCCESSFUL      | <p>Event: cmp\_network\_token.updated<br><br>State: ACTIVEReason\_code: cmp\_network\_token.provisioned</p>          | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Successfully Provisioned Notification<br>3. GET response: Card and Network Token (active status) objects are available</p> |
| 400021\*\*\*\*\*\*9225 | Any Future Date | PROVISIONING FAILED          | <p>Event: cmp\_network\_token.updated<br><br>State: FAILEDReason\_code: cmp\_network\_token.provisioning\_failed</p> | <p>1. Sync response: Card Object Creation Successful<br>2. Async notification: Provisioning Failed Notification<br>3. GET response: Card and Network Token (failed status) objects are available</p>      |

### Method 3: Network Token Mock Webhook Notifications with Networks <a href="#method-3-network-token-mock-webhook-notifications-with-networks" id="method-3-network-token-mock-webhook-notifications-with-networks"></a>

**Both Visa and Mastercard** Network Token notifications cannot be tested because both networks do not provide a mock environment for Network Token webhook notifications. Please refer to Method 1 above to test Network Token Notifications.

### Network Token Provisioning Failure Reason Codes <a href="#network-token-provisioning-failure-reason-codes" id="network-token-provisioning-failure-reason-codes"></a>

| Reason Code              | Reason Text                                                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| card\_enrollment\_failed | Invalid payment instrument or data associated with the payment instrument                                    |
| card\_not\_allowed       | Card cannot be used for tokenization at this moment. Please try again later                                  |
| card\_not\_allowed       | The requested action is not allowed for a given PAN. This card is valid but cannot be used for tokenization. |
| declined                 | This card is not eligible for tokenization at this moment with the Network; Retry at a later time.           |
| declined                 | No further operations are allowed. Contact bank                                                              |
| service\_unavailable     | Downstream service unavailable; retry later                                                                  |
| rejected                 | This card is not eligible for tokenization at this moment with the Network; Retry later.                     |

### Notifications Set Up <a href="#notifications-set-up" id="notifications-set-up"></a>

You can configure a webhook to receive updates for the Network Token. For detailed instructions on setting up notifications, click [here](https://docs.verygoodsecurity.com/cmp/developer-resources/api/network-token-events).

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verygoodsecurity.com/cmp/developer-resources/guides/testing/network-tokens-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
