Billing
Wallet balance and transactions, top-ups, auto top-up and invoices.
/walletCurrent balance plus paginated wallet transactions. Query params: ?page=0 (default 0), ?limit=50 (1–200).
{
"balance": 12.34,
"transactions": [
{
"id": "txn_3Kd...",
"type": "topup",
"amount": 10.0,
"balanceAfter": 22.34,
"provider": "paypal",
"status": "completed",
"createdAt": "2026-07-10T12:00:00Z"
},
{
"id": "txn_9Lw...",
"type": "hourly_charge",
"amount": -0.061,
"balanceAfter": 12.34,
"provider": null,
"status": "completed",
"createdAt": "2026-07-11T13:00:00Z"
}
],
"hasMore": false,
"page": 0
}type is one of topup, hourly_charge, order_charge, admin_adjustment.
/wallet/topupsStart a wallet top-up. Returns a checkout URL — redirect the user there to pay. Amount: 5–10,000 USD. Provider: paypal or nowpayments (crypto).
{
"amount": 25,
"provider": "paypal"
}{
"transactionId": "txn_3Kd...",
"provider": "paypal",
"approveUrl": "https://www.paypal.com/checkoutnow?token=..."
}nowpayments returns invoiceUrl instead. The balance is credited by the payment webhook once the payment clears.
/wallet/auto-topupAutomatic top-up when the balance drops below a threshold. GET returns the current config; POST updates it (threshold 0–10,000, amount 5–10,000). Only the NOWPayments provider is supported — crypto auto top-up emails an invoice rather than charging silently.
{
"enabled": true,
"threshold": 5,
"amount": 20,
"provider": "nowpayments"
}{
"enabled": true,
"threshold": 5,
"amount": 20,
"provider": "nowpayments"
}
→ { "ok": true }/wallet/payment-methodsWhich payment providers are enabled on this deployment. Not rate-limited.
{
"paypal": true,
"nowpayments": true
}/invoicesList your invoices, newest first. GET /invoices/{id} returns a single invoice (404 if not yours).
[
{
"id": "inv_5Rt...",
"amount": 25.0,
"description": "Wallet top-up",
"status": "paid",
"creditWallet": true,
"dueDate": "2026-07-15",
"sentAt": "2026-07-08T09:00:00Z",
"paidAt": "2026-07-08T09:04:00Z",
"createdAt": "2026-07-08T09:00:00Z",
"invoiceNumber": "BRK-20260708-A1B2C3D4",
"paymentProvider": "nowpayments",
"paymentUrl": "https://nowpayments.io/payment/...",
"paypalInvoiceNumber": null
}
]status is one of draft, sent, paid, cancelled.