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. API Integration
  3. API Reference

Cards

API reference for card-related endpoints

PreviousAccountsNextTransactions

Last updated 1 year ago

Creating and Ordering a New Card for a Customer

A new card for the customer can be created and ordered using the POST endpoint: /customers/{customerId}/cards. This operation creates a new card through our issuance partner with Visa or MasterCard. If a physical card is requested, it also initiates a shipment order to the specified address. Please note that each card is linked to a specific account, and currently, we only support a limit of one virtual and one physical card per customer's account.

Card Entity Updates

Any internal updates to the card entity will be reported through webhook update events. For details on how to set up and manage webhook subscriptions, please refer to Webhooks.

Retrieve Cards for a Specific Account

To retrieve a list of cards associated with a specific account, make a GET request to /accounts/{accountId}/cards.

Retrieve All Cards

To retrieve a list of all cards associated with the programme, make a GET request to /cards. To fetch details of a specific card by ID, use a GET request to /cards/{cardId}.

Retrieve an Individual Card

To retrieve information about an individual card, make a GET request to /cards/{cardId}.

Deactivate a Card

To deactivate a card, use a PATCH request to /cards/{cardId}/deactivate.

Reactivate a Card

To reactivate a previously deactivated card, use a PATCH request to /cards/{cardId}/activate.

Terminate a Card

A card can be terminated using a DELETE request to /cards/{cardId}. This is an irreversible operation, and the card will not be available for new payments. However, it will remain active for pending holds for up to 30 days.

βš™οΈ
πŸ”’
πŸ’³

Retrieve account cards

get

Retrieves account's cards

Authorizations
Path parameters
accountIdstring Β· uuidRequired

Unique account 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
Account not found
500
Internal error
get
GET /v1/accounts/{accountId}/cards 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:29:16.099Z",
    "updatedAt": "2025-05-09T06:29:16.099Z"
  }
]

Retrieve cards

get

Retrieves cards' details

Authorizations
Header parameters
SignaturestringRequired

HTTP message signature

Signature-InputstringRequired

HTTP message signature input

Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
500
Internal error
get
GET /v1/cards 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:29:16.099Z",
    "updatedAt": "2025-05-09T06:29:16.099Z"
  }
]

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:29:16.099Z",
  "updatedAt": "2025-05-09T06:29:16.099Z"
}

Deactivate card

patch

Deactivates card and all associated resources

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
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
409
Invalid state transition
500
Internal error
patch
PATCH /v1/cards/{cardId}/deactivate HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000
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:29:16.099Z",
  "updatedAt": "2025-05-09T06:29:16.099Z"
}

Activate card

patch

Activates card and all associated resources

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
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
409
Invalid state transition
500
Internal error
patch
PATCH /v1/cards/{cardId}/activate HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000
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:29:16.099Z",
  "updatedAt": "2025-05-09T06:29:16.099Z"
}

Terminate card

delete

Terminates card

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
204
Successful operation
400
Invalid request
401
Not authorised
404
Card not found
409
Invalid state transition
500
Internal error
delete
DELETE /v1/cards/{cardId} 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

  • Creating and Ordering a New Card for a Customer
  • POSTCreate new card
  • Card Entity Updates
  • Retrieve Cards for a Specific Account
  • GETRetrieve account cards
  • Retrieve All Cards
  • GETRetrieve cards
  • Retrieve an Individual Card
  • GETRetrieve card
  • Deactivate a Card
  • PATCHDeactivate card
  • Reactivate a Card
  • PATCHActivate card
  • Terminate a Card
  • DELETETerminate 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:29:16.099Z",
  "updatedAt": "2025-05-09T06:29:16.099Z"
}