# Order a Physical Card to a Virtual Card
source: https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/card-lifecycle-management/order-phy-card-to-virtual-card/index.md

## Test case - Success {#test-case---success}

This test case describes issuing a physical card to an existing virtual card under the card contract.

For this test case, use the following information in the request:

|     Field     | Available value |
|---------------|-----------------|
| `reissueType` | REISSUE         |

**Sample request**

`POST /cards/70001/plastics`

```JSON
{
  "newCardExpiryDate": "3004",
  "newCbsNumber": "CBS15863242747061",
  "reissueType": "REISSUE"
}
```

**Sample response**

`201`  

`Location: /cards/70001`

```JSON
{
    "newCardContractId": 70001,
    "newCardContractNumber": "535555______5312",
    "newCardExpiryDate": "3004",
    "newSequenceNumber": "2",
    "plasticId": 2188792
}
```

## Test case -- Fail -- PIN is not set {#test-case--fail--pin-is-not-set}

This test case describes an attempt to issue a physical card to an existing virtual card under the card contract while the PIN is not set for the virtual card. The CMS requires the PIN to be set for a virtual card before reissuing the card with a physical card.

For this test case, use the following information in the request:

|   Path parameter   | Available value |
|--------------------|-----------------|
| `card_contract_id` | 30001           |

|     Field     | Available value |
|---------------|-----------------|
| `reissueType` | REISSUE         |

**Sample request**

`POST /cards/30001/plastics`

```JSON
{
    "newCardExpiryDate": "3004",
    "newCbsNumber": "CBS15863242747061",
    "reissueType": "REISSUE"
}
```

**Sample response**

`400`

```JSON
{
    "Errors": {
        "Error": [
            {
                "Source": "MASTERCARD PROCESSING",
                "ReasonCode": "CARD_CONTRACT_PIN_NOT_SET",
                "Description": "Card contract PIN is not set.",
                "Recoverable": false
            }
        ]
    }
} 
```

## Test case -- Fail -- Reissue type not supported {#test-case--fail--reissue-type-not-supported}

This test case describes an attempt to issue a physical card to an existing virtual card while the provided `reissueType` value is not configured in the CMS for a specified card contract.

For this test case, use the following information in the request:

|   Path parameter   | Available value |
|--------------------|-----------------|
| `card_contract_id` | 30003           |

|     Field     | Available value |
|---------------|-----------------|
| `reissueType` | REISSUE         |

**Sample request**

`POST /cards/30003/plastics`

```JSON
{
    "newCardExpiryDate": "3004",
    "newCbsNumber": "CBS15863242747061",
    "reissueType": "REISSUE"
}
```

**Sample response**

`400`

```JSON
{
    "Errors": {
        "Error": [
            {
                "Source": "MASTERCARD PROCESSING",
                "ReasonCode": "REISSUE_TYPE_NOT_SUPPORTED",
                "Description": "Reissue type REISSUE is not supported for card contract with id 30003.",
                "Recoverable": false
            }
        ]
    }
}
```

## Test case -- Fail -- Wrong Card status {#test-case--fail--wrong-card-status}

This test case describes an attempt to issue a physical card to an existing virtual card with the wrong status. By default, the CMS does not allow to reissue a card in inactive status (the `statusCode` different than `00`).

For this test case, use the following information in the request:

|   Path parameter   | Available value |
|--------------------|-----------------|
| `card_contract_id` | 30002           |

|     Field     | Available value |
|---------------|-----------------|
| `reissueType` | REISSUE         |

**Sample request**

`POST /cards/30002/plastics`

```JSON
{
    "newCardExpiryDate": "3004",
    "newCbsNumber": "CBS15863242747061",
    "reissueType": "REISSUE"
}
```

**Sample response**

`400`

```JSON
{
    "Errors": {
        "Error": [
            {
                "Source": "MASTERCARD PROCESSING",
                "ReasonCode": "CARD_CONTRACT_STATUS_IS_WRONG",
                "Description": "Card contract with id 30002 in wrong status to reissue.",
                "Recoverable": false
            }
        ]
    }
}
```

