nuBlock Business API

Complete API reference for managing currencies, sending payments, and viewing transaction history.

Base URL
https://apipayments.nublock.xyz/api/business/v1
GET/accounts/{account_id}/currencies
Get Enabled Currencies
Retrieve the list of currencies enabled for a specific account. Returns all supported currencies with their codes, names, symbols, decimals, and price.

Parameters

The unique identifier for the account

Example Request

// Get enabled currencies for an account
const response = await fetch(
  'https://apipayments.nublock.xyz/api/business/v1/accounts/{account_id}/currencies',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer sk_live_...',
      'Content-Type': 'application/json'
    }
  }
);

const data = await response.json();
// Response: { currencyId, name, symbol, decimals, price }
console.log(data.enabled_currencies);
javascript
POST/payments
Send Payment
Initiate a new payment transfer to a recipient wallet address. Supports multiple currencies and includes real-time status tracking.

Request Body

Fee Parameters

Example Request

// Send a payment
const response = await fetch(
  'https://apipayments.nublock.xyz/api/business/v1/payments',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_live_...',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      amount: 1500,
      currencyId: 'cur_usd_001',
      recipientWallet: '0xabcd...ef12',
      note: 'Invoice payment #1234',
      feeAmount: 15
    })
  }
);

const payment = await response.json();
console.log(payment.id, payment.status);
javascript
GET/transactions
List Transactions
Retrieve a paginated list of all transactions. Supports filtering by status, currency, date range, and more.

Query Parameters

Example Request

// List transactions
const response = await fetch(
  'https://apipayments.nublock.xyz/api/business/v1/transactions?' + 
    new URLSearchParams({
      limit: '10',
      status: 'completed',
      currency: 'USD'
    }),
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer sk_live_...',
      'Content-Type': 'application/json'
    }
  }
);

const { data, has_more } = await response.json();
data.forEach(txn => console.log(txn.id, txn.amount));
javascript
Rate Limits & Fees
Understand API rate limiting policies, platform fees, and best practices for handling rate limit errors.

Overview

The nuBlock Business API implements rate limiting to ensure fair usage and maintain service stability. Rate limits are applied on a per-account basis.

Platform Fees

Transaction Fee15 bps

A platform fee of 15 basis points (0.15%) is applied to each transaction. This fee is automatically deducted from the transaction amount.

Example: For a $1,000 transaction, the platform fee would be $1.50

Rate Limit Tiers

StandardDefault tier
20 requests/min

Suitable for most integrations

Response Headers

Every API response includes headers with rate limit information:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per minute
X-RateLimit-RemainingNumber of requests remaining in current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Handling Rate Limit Errors

When you exceed the rate limit, the API returns a 429 Too Many Requests response:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please retry after 60 seconds.",
    "retryAfter": 60
  }
}

Best Practice: Implement exponential backoff when retrying requests after receiving a 429 response.