> For the complete documentation index, see [llms.txt](https://firstoken.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firstoken.gitbook.io/api-docs/api-reference/network-token/test-cards-for-network-token.md).

# Test Cards for Network Token

### Overview

Use these test card numbers to test network token enrollment and provisioning in the Firstoken sandbox environment. All test cards must first be tokenized using Firstoken's standard tokenization process before they can be enrolled in network tokenization.

{% hint style="info" %}
**Important**: These test cards only work in the sandbox environment (`https://api.firstoken-staging.co`).
{% endhint %}

***

### Testing Workflow

1. **Tokenize the card** using Firstoken's tokenization endpoint to create a permanent token
2. **Enroll the token** using the Network Token Enrollment endpoint
3. **Wait for provisioning** to complete (you will receive a webhook notification if configured)
4. **Retrieve credentials** (if using external processors) using the Get Payment Credentials endpoint

***

### Successful Network Token Provisioning

Use these test card numbers to provision network tokens successfully.

#### Visa

| Number           | Expiration Date | CVV |
| ---------------- | --------------- | --- |
| 4622943123100639 | 12/26           | 242 |
| 4622943123100647 | 12/26           | 749 |
| 4622943123100654 | 12/26           | 972 |
| 4622943123100662 | 12/26           | 344 |
| 4622943123100670 | 12/26           | 306 |
| 4622943123100688 | 12/26           | 065 |
| 4622943123100696 | 12/26           | 264 |

#### Mastercard

| Number           | Expiration Date | CVV |
| ---------------- | --------------- | --- |
| 5120342233150747 | Any future date | Any |
| 5120343287499758 | Any future date | Any |
| 5120350100064594 | Any future date | Any |

#### American Express

| Number                | Expiration Date | CVV |
| --------------------- | --------------- | --- |
| Any valid Amex number | Any             | Any |

***

### Unsuccessful Network Token Provisioning

Use these test card numbers to test unsuccessful provisioning scenarios.

#### Visa

| Number           | Expiration Date | CVV | Failure Reason             |
| ---------------- | --------------- | --- | -------------------------- |
| 4000000011111111 | Any future date | Any | CARD\_VERIFICATION\_FAILED |
| 4001770011111100 | Any future date | Any | CARD\_NOT\_ELIGIBLE        |
| 4010057011444411 | Any future date | Any | CARD\_NOT\_ALLOWED         |
| 4010057022001002 | Any future date | Any | DECLINED                   |
| 4010057044441103 | Any future date | Any | DECLINED — Unprovisioned   |
| 4020057033111111 | Any future date | Any | SERVICE\_UNAVAILABLE       |

#### American Express

| Number          | Expiration Date | CVV | Failure Reason       |
| --------------- | --------------- | --- | -------------------- |
| 370000000000028 | Any future date | Any | CARD\_NOT\_ELIGIBLE  |
| 370000000000002 | Any future date | Any | DECLINED             |
| 370000000000119 | Any future date | Any | SERVICE\_UNAVAILABLE |
| 370000000000036 | Any future date | Any | CARD\_NOT\_ALLOWED   |

***

### Testing Different Scenarios

#### Scenario 1: Successful Enrollment and Provisioning

**Test card**: `5120342233150747` (Mastercard)

**Expected flow**:

1. Tokenize card → Returns Firstoken token
2. Enroll token → Returns `status: "Enrolled"`
3. Wait for provisioning to complete
4. Get credentials → Returns network payment credentials with `status: "Provisioned"`

#### Scenario 2: Card Not Eligible for Network Tokenization

**Test card**: `4001770011111111` (Visa - CARD\_NOT\_ELIGIBLE)

**Expected flow**:

1. Tokenize card → Returns Firstoken token
2. Enroll token → Returns `status: "Not_enrolled"` with `error_info.reason: "Unprovisioned"`
3. Get credentials → Returns 404 "No active network token found"

#### Scenario 3: Token Already Enrolled

**Test card**: Any previously enrolled test card

**Expected flow**:

1. Tokenize card → Returns Firstoken token
2. Enroll token (first time) → Returns `status: "Enrolled"`
3. Wait for provisioning to complete
4. Enroll token (second time) → Returns `status: "Already_enrolled"`
5. Get credentials → Returns network payment credentials with `status: "Provisioned"`

***

### Testing Best Practices

1. **Start fresh**: Use different test cards for each test run when testing successful provisioning, as provisioned tokens cannot be deleted
2. **Test error scenarios**: Use the unsuccessful provisioning cards to verify your error handling logic
3. **Verify all statuses**: Test enrollment responses for Enrolled, Already\_enrolled, and Not\_enrolled
4. **Test credential retrieval**: Verify GET /payment-credentials works correctly for both successful and unsuccessful enrollments
5. **Poll for credentials**: After successful enrollment, poll the Get Payment Credentials endpoint to verify when provisioning is complete

***

### Troubleshooting Test Cards

| Issue                                                 | Solution                                                                                    |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| "Card already enrolled" error on first enrollment     | This test card was previously used. Choose a different test card number                     |
| Enrollment succeeds but credentials not available     | Provisioning may still be in progress. Wait and retry GET /payment-credentials              |
| GET /payment-credentials returns 404 after enrollment | Provisioning may still be in progress, or the card is not eligible for network tokenization |
| Test card declined during tokenization                | Ensure you're using the sandbox environment and replaced all X characters with 0            |
| Unexpected enrollment status                          | Verify you're using the correct test card for your intended scenario                        |
