Account

Methods for managing accounts, deployments, callback secrets, and balance summaries in B2BINPAY DeFi API

GET
/api/v1/accounts

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Query Parameters

isHidden?|

If true, returns only accounts hidden for the current user. If false, returns only visible accounts.

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts"
[  {    "id": "123e4567-e89b-12d3-a456-426614174000",    "name": "Marketing Team",    "contract": "0x1234567890123456789012345678901234567890",    "members": [      "0x1111111111111111111111111111111111111111",      "0x2222222222222222222222222222222222222222"    ],    "createdAt": "2024-01-01T00:00:00.000Z",    "initialConfig": {      "members": [        "0x1111111111111111111111111111111111111111",        "0x2222222222222222222222222222222222222222"      ],      "threshold": 1,      "nonce": "0xa1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678"    },    "isTron": false,    "smartContractVersionId": "1.0.0-evm",    "networkId": "728126428",    "isHidden": false  }]
Empty
Empty
GET
/api/v1/accounts/{accountId}

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000"
{  "account": {    "id": "123e4567-e89b-12d3-a456-426614174000",    "name": "Marketing Team",    "contract": "0x1234567890123456789012345678901234567890",    "members": [      "0x1111111111111111111111111111111111111111",      "0x2222222222222222222222222222222222222222"    ],    "createdAt": "2024-01-01T00:00:00.000Z",    "initialConfig": {      "members": [        "0x1111111111111111111111111111111111111111",        "0x2222222222222222222222222222222222222222"      ],      "threshold": 1,      "nonce": "0xa1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678"    },    "isTron": false,    "smartContractVersionId": "1.0.0-evm",    "networkId": "728126428",    "isHidden": false  },  "deployments": [    {      "deploymentId": "123e4567-e89b-12d3-a456-426614174000",      "chainId": "1",      "networkName": "Ethereum Mainnet",      "approvers": [        "0x1111111111111111111111111111111111111111",        "0x2222222222222222222222222222222222222222"      ],      "threshold": 1,      "deploymentStatus": "pending",      "transactionHash": "0x777...",      "deployedAt": "2024-01-16T14:20:00Z"    }  ]}
Empty
Empty
Empty
PUT
/api/v1/accounts/{accountId}

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000" \  -H "Content-Type: application/json" \  -d '{    "name": "My Account"  }'
{  "id": "123e4567-e89b-12d3-a456-426614174000",  "name": "Marketing Team",  "contract": "0x1234567890123456789012345678901234567890",  "members": [    "0x1111111111111111111111111111111111111111",    "0x2222222222222222222222222222222222222222"  ],  "createdAt": "2024-01-01T00:00:00.000Z",  "initialConfig": {    "members": [      "0x1111111111111111111111111111111111111111",      "0x2222222222222222222222222222222222222222"    ],    "threshold": 1,    "nonce": "0xa1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678"  },  "isTron": false,  "smartContractVersionId": "1.0.0-evm",  "networkId": "728126428",  "isHidden": false}
Empty
Empty
Empty
GET
/api/v1/accounts/{accountId}/deploy-params

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000/deploy-params"
{  "implementationAddress": "0x1234567890abcdef1234567890abcdef12345678",  "initializerBytecode": "0x1234567890...",  "nonce": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",  "deployerAddress": "0x1234567890abcdef1234567890abcdef12345678"}
Empty
Empty
GET
/api/v1/accounts/{accountId}/balance/summary

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

baseCurrency*string

Base currency for conversion

Value in

  • "usd"
  • "eur"
  • "cny"
chainId*string

Chain ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000/balance/summary?baseCurrency=usd&chainId=1"
{  "totalBalance": "150000",  "uncollectedBalance": "32000",  "uncollectedInvoices": 5,  "allRatesReceived": true}
Empty
Empty
GET
/api/v1/accounts/{accountId}/balance/assets

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

page?number

Page number (starts from 1)

Range0 < value <= 9007199254740991
Default1
pageSize?number

Number of items per page (max 100)

Range0 < value <= 100
Default10
sortBy?string

Field to sort by

Default"balance"

Value in

  • "balance"
  • "converted_balance"
sortOrder?string

Sort order (ASC or DESC)

Default"desc"

Value in

  • "asc"
  • "desc"
baseCurrency*string

Base currency for conversion

Value in

  • "usd"
  • "eur"
  • "cny"
chainId*string

Chain ID

currencyIds?array<string>

Filter by currency IDs

isScam?boolean|string
isVerified?boolean|string
isHidden?boolean|string

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000/balance/assets?baseCurrency=usd&chainId=1"
{  "total": 100,  "page": 1,  "pageSize": 10,  "items": [    {      "currency": {        "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",        "symbol": "USDT",        "name": "Tether USD",        "chainId": "1",        "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",        "decimals": 6,        "isScam": false,        "isVerified": true,        "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"      },      "balance": "2.5",      "convertedBalance": "162500",      "isHidden": false    }  ]}
Empty
Empty
GET
/api/v1/accounts/{accountId}/balances

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

accountId*string

Account unique identifier

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

currencyIds?array<string>

Filter by currency IDs

isScam?boolean|string
isVerified?boolean|string
isHidden?boolean|string
chainId*string

Chain ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/123e4567-e89b-12d3-a456-426614174000/balances?chainId=1"
[  {    "currency": {      "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",      "symbol": "USDT",      "name": "Tether USD",      "chainId": "1",      "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",      "decimals": 6,      "isScam": false,      "isVerified": true,      "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"    },    "balance": "2.5",    "isHidden": false  }]
Empty
Empty
GET
/api/v1/accounts/deployments/{deploymentId}/nonce-info

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

deploymentId*string

UUID

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

curl -X GET "https://example.com/api/v1/accounts/deployments/123e4567-e89b-12d3-a456-426614174000/nonce-info"
{  "currentNonce": "5",  "lastExecutedNonce": "4"}
Empty
Empty

Last updated on