Skip to content

WaaS API Reference

Base URL: https://payments-api-dev-966260606560.europe-west2.run.app
Auth: X-API-Key header for all WaaS endpoints


Customer Wallet Management

Create Customer HD Wallet

POST /api/v1/wallet/customers

Creates a BIP39 HD wallet for a customer. The mnemonic is encrypted at rest and returned only on creation.

http
POST /api/v1/wallet/customers
X-API-Key: live_sk_...
Content-Type: application/json

{
  "customer_id": "user_12345",
  "word_count": 12
}
FieldTypeRequiredDescription
customer_idstringYour internal customer identifier (email, UUID, or any string)
word_countinteger12 or 24 BIP39 words (default: 12)

Response 200 OK

json
{
  "customer_id": "user_12345",
  "wallet_id": 42,
  "mnemonic": ["word1", "word2", "...", "word12"],
  "created_at": "2026-06-25T14:00:00Z"
}

⚠️ Store the mnemonic immediately. It is shown once only and cannot be retrieved without the wallet:reveal_seed API permission.

Error 402 Payment Required

json
{ "error": "subscription expired — please renew your plan to continue" }

Error 403 Forbidden

json
{
  "error": "Wallet address limit reached for your current plan. Please upgrade to add more customer wallets.",
  "code": "WALLET_LIMIT_EXCEEDED"
}

List All Customer Wallets

GET /api/v1/wallet/customers

http
GET /api/v1/wallet/customers?page=1&limit=20&search=user_
X-API-Key: live_sk_...
ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Results per page
searchstringFilter by customer_id

Response 200 OK

json
{
  "customers": [ { "customer_id": "user_12345", "wallet_id": 42, "created_at": "..." } ],
  "total": 87,
  "page": 1,
  "limit": 20
}

Address Derivation

Derive a Blockchain Address

POST /api/v1/wallet/{customerID}/derive

Derives a new blockchain address for a customer wallet at the specified BIP-44 derivation index.

Set enable_monitoring: true to automatically subscribe this address to the deposit monitor — incoming transactions will fire wallet.deposit.detected and wallet.deposit.confirmed webhooks.

http
POST /api/v1/wallet/user_12345/derive
X-API-Key: live_sk_...
Content-Type: application/json

{
  "network": "ETH",
  "index": 0,
  "is_testnet": false,
  "enable_monitoring": true
}
FieldTypeRequiredDescription
networkstringBTC, BCH, LTC, BSC, ETH, POL, TRX, SOL, XRP
indexintegerBIP-44 address index (default: 0)
is_testnetbooleanUse testnet address space (default: false)
enable_monitoringbooleanSubscribe to deposit webhooks (default: false)

Response 200 OK

json
{
  "customer_id": "user_12345",
  "network": "ETH",
  "address": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12",
  "index": 0,
  "derivation_path": "m/44'/60'/0'/0/0",
  "is_testnet": false,
  "monitored": true
}

Error 402 — Subscription expired
Error 404 — Wallet not found for this customer_id
Error 400 — Invalid network

Deposit Lifecycle (when enable_monitoring: true)

Statussafe_to_creditWebhookAction
detectedfalsewallet.deposit.detectedShow "pending" to customer — do not credit
confirmedtruewallet.deposit.confirmedCredit customer account

Always check safe_to_credit: true before crediting. Never credit on wallet.deposit.detected.

Confirmation Method by Network

NetworkMethodTypical Settlement Time
ETHBlock depth~3 minutes
BSCBlock depth~30 seconds
POLBlock depth~60 seconds
BTCBlock depth (Esplora)~30 minutes
LTCTime-based settlement~10 minutes
BCHTime-based settlement~30 minutes
TRXTime-based settlement~60 seconds
SOLTime-based settlement~15 seconds
XRPTime-based settlement~30 seconds

List Addresses for a Customer

GET /api/v1/wallet/{customerID}/addresses

http
GET /api/v1/wallet/user_12345/addresses?refresh=true
X-API-Key: live_sk_...
ParameterTypeDescription
refreshbooleanTrigger live on-chain balance refresh for all addresses (default false)

Response 200 OK

json
{
  "customer_id": "user_12345",
  "addresses": [
    {
      "id": 101,
      "address": "0x1a2b...",
      "network": "ETH",
      "address_index": 0,
      "derivation_path": "m/44'/60'/0'/0/0",
      "monitored": true,
      "total_received": "500.00",
      "balances": [
        { "currency": "ETH", "amount": "0.0012" },
        { "currency": "USDT", "amount": "500.00" }
      ]
    }
  ],
  "total": 3
}

List All Addresses (All Customers)

GET /api/v1/wallet/addresses

Returns all derived addresses across every customer wallet.

http
GET /api/v1/wallet/addresses?network=ETH&currency=USDT&page=1&limit=20
X-API-Key: live_sk_...
ParameterTypeDescription
networkstringFilter by network code
currencystringFilter by currency
searchstringSearch by address or customer ID
pageintegerPage number (default 1)
limitintegerResults per page (default 20)

Transfers & Sending

Send Crypto from Customer Wallet

POST /api/v1/wallet/{customerID}/transfer

Broadcasts a blockchain transaction from the customer's derived address.

http
POST /api/v1/wallet/user_12345/transfer
X-API-Key: live_sk_...
Content-Type: application/json

{
  "network": "ETH",
  "currency": "USDT",
  "to_address": "0xRecipientAddress...",
  "amount": "100000000",
  "index": 0
}
FieldTypeRequiredDescription
networkstringBTC, BCH, LTC, BSC, ETH, POL, TRX, SOL, XRP
currencystringToken or native currency (e.g. "USDT", "ETH", "BTC")
to_addressstringRecipient blockchain address
amountstringAmount as a string — send "2.5" (human-readable, auto-converted) or "2500000000000000000" (pre-converted base units)
indexintegerAddress derivation index (default 0)

Amount format: Pass either a human-readable decimal ("2.5") or a pre-converted integer in the network's smallest unit ("2500000000000000000"). The API converts decimal input automatically.

Decimal places by network and currency:

NetworkCurrencyDecimals1 unit in base units
ETHETH18"1000000000000000000"
ETHUSDT, USDC6"1000000"
BSCBNB18"1000000000000000000"
BSCUSDT, USDC18"1000000000000000000"
POLPOL18"1000000000000000000"
POLUSDT, USDC6"1000000"
TRXTRX, USDT6"1000000"
SOLSOL9"1000000000"
SOLUSDC6"1000000"
BTC, LTC, BCHnative8"100000000"
XRPXRP6"1000000"

Response 200 OK

json
{
  "tx_hash": "0xabc123def456...",
  "network": "ETH",
  "currency": "USDT",
  "amount": "100000000",
  "to_address": "0xRecipient...",
  "status": "submitted"
}

Error 500 — Broadcast failed: insufficient funds, no UTXOs, unfunded account, incorrect amount format

Requires wallet:transfer API key permission.


Estimate Gas Fee

POST /api/v1/wallet/estimate-gas

Estimates the gas cost for an EVM transfer. No authentication required.
Only supports EVM networks: BSC, ETH, POL.

http
POST /api/v1/wallet/estimate-gas
Content-Type: application/json

{
  "network": "ETH",
  "currency": "USDT",
  "from_address": "0xSenderAddress...",
  "to_address": "0xRecipientAddress...",
  "amount": "100000000"
}

Response 200 OK

json
{
  "gas_limit": "65000",
  "gas_price": "20000000000",
  "estimated_fee": "0.0013",
  "estimated_fee_usd": "3.50"
}

Fee Collection Configuration

WaaS allows you to collect a percentage fee from your customers on every deposit or transfer, sent directly on-chain to your own addresses.

Get Current Fee Configuration

GET /api/v1/wallet/fees

http
GET /api/v1/wallet/fees
X-API-Key: live_sk_...

Response 200 OK

json
{
  "fee_percent": "0.01",
  "is_enabled": true,
  "fee_addresses": {
    "ETH": "0xYourEthAddress...",
    "BSC": "0xYourBscAddress...",
    "POL": "0xYourPolAddress...",
    "TRX": "TYourTronAddress...",
    "SOL": "YourSolanaAddress...",
    "BTC": "bc1YourBtcAddress...",
    "XRP": "rYourXrpAddress..."
  }
}

Set Fee Configuration

POST /api/v1/wallet/fees

Enable fee collection and set your percentage and receiving addresses in a single call.

http
POST /api/v1/wallet/fees
X-API-Key: live_sk_...
Content-Type: application/json

{
  "fee_percent": "0.01",
  "is_enabled": true,
  "fee_addresses": {
    "POL": "0xYourPolAddress...",
    "ETH": "0xYourEthAddress..."
  }
}
FieldTypeRequiredDescription
fee_percentstringFee as a decimal — "0.01" = 1%, "0.005" = 0.5%. Maximum "0.5" (50%)
is_enabledbooleantrue to activate fee collection
fee_addressesobjectMap of network → your receiving address. Omitted networks will not have fees collected

Response 200 OK

json
{
  "fee_percent": "0.01",
  "is_enabled": true,
  "fee_addresses": { "POL": "0x...", "ETH": "0x..." }
}

Fee collection only applies to networks where you have configured a receiving address. If no address is set for a network, fees are skipped on that network even if is_enabled: true.


Update Settlement Addresses Only

PUT /api/v1/wallet/fees/addresses

Update the per-network receiving addresses without changing your fee percentage or enabled status.

http
PUT /api/v1/wallet/fees/addresses
X-API-Key: live_sk_...
Content-Type: application/json

{
  "addresses": {
    "SOL": "YourNewSolanaAddress...",
    "TRX": ""
  }
}

Pass "" (empty string) for a network to remove its fee address and stop collecting on that network.


View Earnings

GET /api/v1/wallet/earnings

Returns a summary of fees collected across all networks, plus recent fee records.

http
GET /api/v1/wallet/earnings
X-API-Key: live_sk_...

Response 200 OK

json
{
  "total_fees_by_currency": [
    { "currency": "USDT", "network": "ETH", "total_amount": "150.50", "count": 42 },
    { "currency": "POL",  "network": "POL", "total_amount": "8.20",   "count": 12 }
  ],
  "recent_fees": [...],
  "total_transfers": 54
}

Transaction History

Get Customer Transaction History

GET /api/v1/wallet/{customerID}/transactions

http
GET /api/v1/wallet/user_12345/transactions?network=ETH&currency=USDT&status=confirmed&page=1&limit=20
X-API-Key: live_sk_...
ParameterTypeDescription
networkstringFilter by network
currencystringFilter by currency
statusstringFilter by status
pageintegerPage number (default 1)
limitintegerResults per page (default 20)

Seed & Key Management

Retrieve Customer Seed Phrase

GET /api/v1/wallet/{customerID}/seed

Returns the BIP39 mnemonic for a customer's wallet.

⚠️ Requires wallet:reveal_seed API key permission. Handle with extreme care — anyone with the mnemonic controls all funds in the wallet.

http
GET /api/v1/wallet/user_12345/seed
X-API-Key: live_sk_...

Response 200 OK

json
{
  "customer_id": "user_12345",
  "mnemonic": ["word1", "word2", "...", "word12"],
  "word_count": 12
}

Error 404 — Wallet not found


Export Private Key for Address

POST /api/v1/wallet/{customerID}/export-key

Returns the raw private key for a specific derived address.

⚠️ Requires wallet:export_key API key permission. Use only when the customer explicitly requests it (e.g., wallet export to external app). Never log or transmit private keys.

http
POST /api/v1/wallet/user_12345/export-key
X-API-Key: live_sk_...
Content-Type: application/json

{
  "network": "ETH",
  "index": 0
}

Response 200 OK

json
{
  "address": "0x1a2b3c...",
  "private_key": "0xabcdef1234...",
  "network": "ETH"
}

Rach Payments API