REST API

Accept crypto deposits for your users. Every call below can be tested live from this page.

Two ways to follow a deposit

REST only (no callback). Register with just a business name, call /api/deposit/init to get the wallet, then poll /api/platform/transactions or /api/platform/verify with your API key.

With a callback. Add a callback_url (at registration or later with PUT) and we also POST the result to you once the deposit is forwarded. Verify it with /api/platform/verify.

Authentication

Calls marked key need the header x-api-key. Registering below fills this field automatically.

Networks open for deposits

A network accepts deposits only while our gas wallet holds enough native coin to forward them. Click an open network to use it in the calls below.

curl 'https://yourapp.com/api/networks?all=1'
POST /api/platform/register

Register a platform

Creates your platform and returns its API key (shown once). Only business_name is required. callback_url and frontend_callback_url are optional.

curl -X POST 'https://yourapp.com/api/platform/register' \
  -H 'Content-Type: application/json' \
  -d '{"business_name":"my-platform","callback_url":"","frontend_callback_url":""}'
Example response
{
  "success": true,
  "message": "Platform registered successfully",
  "business_name": "my-platform",
  "callback_url": null,
  "api_key": "<64 hex chars>"
}
PUT /api/platform/register key

Add, change or remove a callback

Updates the URLs of the platform that owns the API key. Send an empty string to remove a URL.

curl -X PUT 'https://yourapp.com/api/platform/register' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"callback_url":"https://your-platform.com/api/deposit-callback","frontend_callback_url":""}'
Example response
{
  "success": true,
  "business_name": "my-platform",
  "callback_url": "https://your-platform.com/api/deposit-callback",
  "frontend_callback_url": null
}
POST /api/deposit/init

Start a deposit

Returns the deposit wallet address and QR code of a user. The user is created on first call. blockchain is optional, the first available network is used by default. Answers 503 when no network can take deposits.

curl -X POST 'https://yourapp.com/api/deposit/init' \
  -H 'Content-Type: application/json' \
  -d '{"email":"user@example.com","platform":"my-platform","blockchain":""}'
Example response
{
  "success": true,
  "wallet_address": "0x...",
  "qr_code": "data:image/png;base64,...",
  "balance": 0,
  "blockchains": [{ "name": "BSC", "symbol": "BNB", "available": true, "reason": null }],
  "selected_blockchain": "BSC",
  "transactions": [],
  "callback_url": null,
  "frontend_callback_url": null
}
POST /api/deposit/check

Scan the chain for new deposits

Scans the user wallet, records new transfers and forwards them to the master wallet. Heavy call (on-chain scan, gas funding, forward): do not run it in a tight loop.

curl -X POST 'https://yourapp.com/api/deposit/check' \
  -H 'Content-Type: application/json' \
  -d '{"email":"user@example.com","platform":"my-platform","blockchain":"BSC"}'
Example response
{
  "success": true,
  "balance": 50,
  "transactions": [{
    "amount": 50, "status": "Completed", "from": "0x...", "to": "0x...",
    "blockchain": "BSC", "tx_hash": "0x...", "tx_link": "https://...",
    "timestamp": 1766312400, "forward_tx_hash": "0x...", "forward_tx_link": "https://..."
  }]
}
GET /api/platform/balance key

User balance

Deposit totals of one user of your platform.

curl -X GET 'https://yourapp.com/api/platform/balance?user_id=user%40example.com' \
  -H 'x-api-key: YOUR_API_KEY'
Example response
{
  "success": true,
  "user_id": "user@example.com",
  "platform_id": 1,
  "platform_name": "my-platform",
  "balance": { "total_deposited": 150.5, "completed": 150.5, "pending": 0 },
  "transactions": { "total": 3, "completed": 3, "pending": 0 }
}
GET /api/platform/transactions key

Transaction history

Lists the deposits of your platform. This is the call to poll when you have no callback. time_range: 1h, 24h, 7d, 30d. status: pending, forwarding, completed, callback_sent, deducted.

curl -X GET 'https://yourapp.com/api/platform/transactions?time_range=24h&limit=100&offset=0' \
  -H 'x-api-key: YOUR_API_KEY'
Example response
{
  "success": true,
  "platform_name": "my-platform",
  "filters": { "user_id": "all", "time_range": "24h", "status": "all", "limit": 100, "offset": 0 },
  "pagination": { "total": 1, "limit": 100, "offset": 0, "has_more": false },
  "transactions": [{
    "id": 12, "user_email": "user@example.com", "amount": "50", "blockchain": "BSC",
    "status": "completed", "tx_hash": "0x...", "tx_link": "https://...",
    "created_at": "2026-10-05T10:30:00Z", "completion_time": "2026-10-05T10:31:00Z"
  }]
}
POST /api/platform/verify key

Verify a payment

Send deposit_id or tx_hash. verified is true when the status is completed or callback_sent and a completion time exists.

curl -X POST 'https://yourapp.com/api/platform/verify' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"deposit_id":"","tx_hash":"","user_id":""}'
Example response
{
  "success": true,
  "verified": true,
  "deposit": { "id": 12, "user_email": "user@example.com", "amount": 50, "blockchain": "BSC", "status": "completed", "tx_hash": "0x..." },
  "message": "Payment verified and forwarded successfully"
}

Errors

400Missing or invalid parameter
401Missing or invalid x-api-key
404Platform, user or deposit not found
409Business name already registered
503No network can take deposits right now
500Server error