OffBlocks
  • πŸ‘‹Welcome to OffBlocks
  • Overview
    • πŸ’‘What we do
    • ✨Core Concepts
    • πŸ“œWhitepaper
    • ⛓️Supported Blockchains and Assets
    • ❔FAQ
  • Developer Guides
    • πŸ—οΈSystem Architecture
    • βš™οΈAPI Integration
      • πŸš€Getting Started
      • πŸ“―Postman
      • πŸ”‘Authentication
      • πŸ”Request Signatures
      • πŸ†”Idempotency
      • ⛓️Blockchain Identifiers
      • πŸ“’Blockchain Updates
      • πŸ“²Sign in With X
      • πŸ’°Fees
      • πŸ•ΉοΈSimulator
      • πŸ”’API Reference
        • πŸ¦Έβ€β™‚οΈCustomers
        • 🏦Accounts
        • πŸ’³Cards
        • πŸ”ƒTransactions
        • πŸͺWebhooks
        • πŸ•ΉοΈSimulator
        • πŸš‚Engine
      • ⏭️States and Transitions
        • πŸ¦Έβ€β™‚οΈCustomer States
        • 🏦Account States
        • πŸ’³Card States
        • πŸ”‘Authorisation States
        • πŸ”ƒTransaction States
    • 🧬Smart Contracts
      • OffBlocksEscrow.sol
      • OffBlocksSmartWalletFactory.sol
      • OffBlocksSmartWallet.sol
      • PendingWithdrawal.sol
      • Interfaces
    • πŸ”’Step-by-step Guide
      • 1️⃣API Credentials
      • 2️⃣Authentication
      • 3️⃣Request Preparation
      • 4️⃣Customer Creation
      • 5️⃣Customer Verification
      • 6️⃣Account Creation
      • 7️⃣Card Issuance
      • 8️⃣Card Authorisations
      • 9️⃣Webhooks
  • Use Cases
    • πŸ’°Wallet Providers
    • πŸ§‘β€πŸŒΎDeFi Apps
    • 🏦Neo-banks and FinTechs
Powered by GitBook
On this page
  1. Developer Guides
  2. Step-by-step Guide

Card Issuance

PreviousAccount CreationNextCard Authorisations

Last updated 1 year ago

This step assumes you have successfully created a new account record using Account Creationstep of the guide

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.

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

{
  "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:

{
    "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 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.

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}.

{
    "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.

πŸ”’
7️⃣

Issue card

patch

Simulates card issuing success

Authorizations
Path parameters
cardIdstring Β· uuidRequired

Unique card ID

Header parameters
SignaturestringRequired

HTTP message signature

Signature-InputstringRequired

HTTP message signature input

Idempotency-Keystring Β· uuidRequired

Idempotency key (UUID)

Responses
202
Successful operation
400
Invalid request
401
Not authorised
404
Card not found
500
Internal error
patch
PATCH /v1/simulator/cards/{cardId}/issue HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000
Accept: */*

No content

Retrieve card

get

Retrieves card's details

Authorizations
Path parameters
cardIdstring Β· uuidRequired

Unique card ID

Header parameters
SignaturestringRequired

HTTP message signature

Signature-InputstringRequired

HTTP message signature input

Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Card not found
500
Internal error
get
GET /v1/cards/{cardId} HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "accountId": "123e4567-e89b-12d3-a456-426614174000",
  "type": "virtual",
  "name": "John Carter",
  "network": "visa",
  "maskedPan": "530518******9871",
  "expirationDate": "10/2028",
  "billingAddress": {
    "firstLine": "Flat G",
    "secondLine": "321 West End Lane",
    "city": "London",
    "state": "text",
    "country": "GB",
    "postCode": "NW6 2FG"
  },
  "status": "issuing",
  "createdAt": "2025-05-09T06:41:00.145Z",
  "updatedAt": "2025-05-09T06:41:00.145Z"
}
  • POSTCreate new card
  • PATCHIssue card
  • GETRetrieve card

Create new card

post

Creates new card for the account

Authorizations
Path parameters
accountIdstring Β· uuidRequired

Unique account ID

Header parameters
SignaturestringRequired

HTTP message signature

Signature-InputstringRequired

HTTP message signature input

Idempotency-Keystring Β· uuidRequired

Idempotency key (UUID)

Content-DigeststringRequired

Content digest

Body
typestring Β· enumRequired

Card type

Possible values:
Responses
201
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
500
Internal error
post
POST /v1/accounts/{accountId}/cards HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000
Content-Digest: text
Content-Type: application/json
Accept: */*
Content-Length: 299

{
  "type": "virtual",
  "billingAddress": {
    "firstLine": "Flat G",
    "secondLine": "321 West End Lane",
    "city": "London",
    "state": "text",
    "country": "GB",
    "postCode": "NW6 2FG"
  },
  "shippingAddress": {
    "firstLine": "Flat G",
    "secondLine": "321 West End Lane",
    "city": "London",
    "state": "text",
    "country": "GB",
    "postCode": "NW6 2FG"
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "accountId": "123e4567-e89b-12d3-a456-426614174000",
  "type": "virtual",
  "name": "John Carter",
  "network": "visa",
  "maskedPan": "530518******9871",
  "expirationDate": "10/2028",
  "billingAddress": {
    "firstLine": "Flat G",
    "secondLine": "321 West End Lane",
    "city": "London",
    "state": "text",
    "country": "GB",
    "postCode": "NW6 2FG"
  },
  "status": "issuing",
  "createdAt": "2025-05-09T06:41:00.145Z",
  "updatedAt": "2025-05-09T06:41:00.145Z"
}