> For the complete documentation index, see [llms.txt](https://docs.offblocks.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.offblocks.xyz/developer-guides/step-by-step-guide/card-issuance.md).

# Card Issuance

{% hint style="info" %}
This step assumes you have successfully created a new account record using [Account Creation](/developer-guides/step-by-step-guide/account-creation.md)step of the guide
{% endhint %}

Now that you have created a customer account, you are able to issue cards for the account. To do so, you need to use `/accounts/{accountId}/card` `POST` request.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}/cards" method="post" expanded="true" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

Let's say we want to open a new virtual card (physical cards are not supported at the moment):

```json
{
  "type": "virtual",
  "billingAddress": {
    "firstLine": "1 Test Avenue",
    "city": "London",
    "country": "GB",
    "postCode": "SW1 1AA"
  }
}
```

If everything was successful, you will receive a response with status `201 (Created)` which looks similar to the following:

```json
{
    "accountId": "ae61c362-4136-49af-8e01-544457fe265b",
    "billingAddress": {
        "city": "London",
        "country": "GB",
        "firstLine": "1 Test Avenue",
        "postCode": "SW1 1AA"
    },
    "createdAt": "2024-01-12T15:12:26.923705379Z",
    "id": "fc4912aa-cac9-4bb0-a6a7-6ec50bf45879",
    "status": "issuing",
    "type": "virtual",
    "updatedAt": "2024-01-12T15:12:26.923705379Z"
}
```

At this stage, you can use our [Simulator](/developer-guides/api-integration/simulator.md) to issue or fail a pending card issuance request.

Assuming you would like to issue the card and proceed with next steps, you need to make an empty `PATCH` request to `/simulator/cards/{cardId}/issue`.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/simulator/cards/{cardId}/issue" method="patch" expanded="true" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

If your request was successful, you will receive an empty response with status `202 (Accepted)`.

In our Sandbox environment the card will be automatically issued and activated, which you can verify by making a `GET` request to `/cards/{cardId}`.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/cards/{cardId}" method="get" expanded="true" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

```json
{
    "accountId": "ae61c362-4136-49af-8e01-544457fe265b",
    "billingAddress": {
        "city": "London",
        "country": "GB",
        "firstLine": "1 Test Avenue",
        "postCode": "SW1 1AA"
    },
    "createdAt": "2024-01-12T15:12:26.923705Z",
    "id": "fc4912aa-cac9-4bb0-a6a7-6ec50bf45879",
    "status": "active",
    "type": "virtual",
    "updatedAt": "2024-01-12T15:16:03.983949Z"
}
```

From there we can proceed to simulating card authorisations and transactions.
