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

Accounts

API reference for account-related endpoints

PreviousCustomersNextCards

Last updated 1 year ago

Creating a New Account for a Customer

A new account for a customer can be created using the POST endpoint: /customers/{customerId}/accounts. .

Account Entity Updates

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

Blockchain Updates

To proceed with account deployment and activation, a challenge issued by the endpoint must be signed and verified (see Blockchain Updates).

Retrieve Account Entities

To retrieve a list of all account entities registered for the programme, make a GET request to /accounts.

Retrieve an Individual Customer's Accounts

To retrieve information about an individual customer's accounts, make a GET request to /customers/{customerId}/account with the customer ID as a path parameter.

Retrieve an Individual Account

To retrieve information about an individual account, make a GET request to /accounts/{accountId}.

Deactivate an Account

To deactivate an account, use a PATCH request to /accounts/{accountId}/deactivate. This action will also deactivate all associated resources, such as cards.

Reactivate an Account

To reactivate a previously deactivated account, use a PATCH request to /accounts/{accountId}/activate.

Closing an Account

An account can be closed and subsequently removed from the programme using a DELETE request to /account/{accountId}. This will also deactivate all associated resources, including cards, and irreversibly deactivate the smart contract associated with it. All data will be preserved for audit and compliance purposes.

βš™οΈ
πŸ”’
🏦

Retrieve accounts

get

Retrieves accounts' 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/accounts HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "customerId": "123e4567-e89b-12d3-a456-426614174000",
    "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
    "status": "initiating",
    "type": "card_account",
    "currencies": [
      "text"
    ],
    "createdAt": "2025-05-09T07:30:02.224Z",
    "updatedAt": "2025-05-09T07:30:02.224Z"
  }
]

Retrieve customer accounts

get

Retrieves customer's accounts

Authorizations
Path parameters
customerIdstring Β· uuidRequired

Unique customer 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
Customer not found
500
Internal error
get
GET /v1/customers/{customerId}/accounts HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "customerId": "123e4567-e89b-12d3-a456-426614174000",
    "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
    "status": "initiating",
    "type": "card_account",
    "currencies": [
      "text"
    ],
    "createdAt": "2025-05-09T07:30:02.224Z",
    "updatedAt": "2025-05-09T07:30:02.224Z"
  }
]

Retrieve account

get

Retrieves account's details

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} HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer JWT
Signature: text
Signature-Input: text
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
  "status": "initiating",
  "type": "card_account",
  "currencies": [
    "text"
  ],
  "createdAt": "2025-05-09T07:30:02.224Z",
  "updatedAt": "2025-05-09T07:30:02.224Z"
}

Deactivate account

patch

Deactivates account and all associated resources

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)

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/accounts/{accountId}/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",
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
  "status": "initiating",
  "type": "card_account",
  "currencies": [
    "text"
  ],
  "createdAt": "2025-05-09T07:30:02.224Z",
  "updatedAt": "2025-05-09T07:30:02.224Z"
}

Activate account

patch

Activates account and all associated resources

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)

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/accounts/{accountId}/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",
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
  "status": "initiating",
  "type": "card_account",
  "currencies": [
    "text"
  ],
  "createdAt": "2025-05-09T07:30:02.224Z",
  "updatedAt": "2025-05-09T07:30:02.224Z"
}

Close account

delete

Closes account and generates a challenge to be signed in order to delete related blockchain 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)

Responses
204
Successful operation
400
Invalid request
401
Not authorised
404
Account not found
409
Invalid state transition
500
Internal error
delete
DELETE /v1/accounts/{accountId} 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 a New Account for a Customer
  • POSTCreate new customer account
  • Account Entity Updates
  • Blockchain Updates
  • Retrieve Account Entities
  • GETRetrieve accounts
  • Retrieve an Individual Customer's Accounts
  • GETRetrieve customer accounts
  • Retrieve an Individual Account
  • GETRetrieve account
  • Deactivate an Account
  • PATCHDeactivate account
  • Reactivate an Account
  • PATCHActivate account
  • Closing an Account
  • DELETEClose account

Create new customer account

post

Creates new account for the customer and generates a challenge to be signed in order to create a related blockchain account

Authorizations
Path parameters
customerIdstring Β· uuidRequired

Unique customer 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

Type of the account

Possible values:
currenciesstring[]Required

Currencies of the account, at least one is required (ISO-4217)

Responses
201
Successful operation
application/json
Responseall of
and
400
Invalid request
401
Not authorised
404
Customer not found
500
Internal error
post
POST /v1/customers/{customerId}/accounts 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: 45

{
  "type": "card_account",
  "currencies": [
    "text"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "chainId": "eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb",
  "status": "initiating",
  "type": "card_account",
  "currencies": [
    "text"
  ],
  "createdAt": "2025-05-09T07:30:02.224Z",
  "updatedAt": "2025-05-09T07:30:02.224Z",
  "challenge": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUFvRFFnQUUzTEw1RldmVFgvL3BJaXNEL0xneFVIT2lxdlFTSUVWTgpGekloOTdLZXBlWk1iZVZsUGd1akZ4Yk5MN2x1ZVhRQnBpUWUzNmZLN0xSbXZNNHdEaWZFTkE9PQotLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0="
}