Skip to content

Treasury & Dashboard

Dashboard endpoints require a JWT Bearer token (Authorization: Bearer <token>).
Base URL: https://rach-caas-api-dx75yvdhaq-nw.a.run.app


Treasury Management

Get Tenant USDC Balance

Returns your business's current internal USDC balance held within the Rach treasury. This is the balance that gets debited when you call POST /v1/users/fund.

GET /v1/dashboard/treasury/tenant-balance

http
GET /v1/dashboard/treasury/tenant-balance
Authorization: Bearer <jwt>

Response 200 OK

json
{
  "available_usdc": "1250.000000",
  "reserved_usdc": "50.000000",
  "total_funded_usdc": "3000.000000",
  "mmo_id": "tenant_abc"
}
FieldDescription
available_usdcUSDC immediately available for customer funding
reserved_usdcUSDC locked in pending operations
total_funded_usdcCumulative USDC pushed to customer SCWs

Submit Treasury Topup

Notifies Rach that fiat has been deposited into the Rach settlement account (bank transfer or HUB2 settlement) and requests a USDC credit to your internal balance.

The topup is created with status PENDING and must be confirmed by a Rach operator or the automated confirmation endpoint before your balance is credited.

POST /v1/dashboard/treasury/topup

http
POST /v1/dashboard/treasury/topup
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "amount": "500.00",
  "token": "USDC",
  "reference": "HUB2_SETL_20240625_001",
  "note": "Monthly treasury reload — Wave settlement batch"
}
FieldTypeRequiredDescription
amountstringUSDC amount requested
tokenstring"USDC" or "USDT"
referencestringHUB2 settlement ID, bank reference, or on-chain tx hash
notestringOptional memo

Response 202 Accepted

json
{
  "topup_id": "topup_xyz123",
  "status": "PENDING",
  "message": "Topup submitted. Awaiting Rach confirmation."
}

Confirm Topup (Rach Operator / Internal)

Marks a pending topup as CONFIRMED and immediately credits the tenant's USDC balance. Called by Rach operators after verifying fiat receipt, or by the automated HUB2 reconciliation system.

POST /v1/dashboard/treasury/topup/{id}/confirm

http
POST /v1/dashboard/treasury/topup/topup_xyz123/confirm
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "credited_by": "ops-team@rach.finance"
}
FieldTypeRequiredDescription
idstring (path)Topup ID
credited_bystring (body)Operator email or system label for audit trail

List Treasury Topups

Returns the history of all USDC credit events for your tenant.

GET /v1/dashboard/treasury/topups

http
GET /v1/dashboard/treasury/topups
Authorization: Bearer <jwt>

Get USDC Treasury Balance (On-Chain)

Queries the live on-chain USDC balance held by the Rach treasury wallet on Polygon.

GET /v1/dashboard/treasury/usdc

http
GET /v1/dashboard/treasury/usdc
Authorization: Bearer <jwt>

Response 200 OK

json
{
  "treasury_address": "0xRachTreasury...",
  "usdc_balance": 15420.50,
  "status": "OK"
}

Get Live Paymaster Gas Tank

Queries the Polygon EntryPoint contract for the live native token balance (MATIC) backing your business's ERC-4337 paymaster. Monitor this to ensure customers never experience failed UserOps due to insufficient gas.

GET /v1/dashboard/treasury/paymaster

http
GET /v1/dashboard/treasury/paymaster
Authorization: Bearer <jwt>

Response 200 OK

json
{
  "paymaster_address": "0xPaymaster...",
  "entrypoint_address": "0xEntrypoint...",
  "current_balance_eth": 1.25,
  "estimated_tx_runway": 4200,
  "alert_threshold_eth": 0.5,
  "critical_threshold_eth": 0.1,
  "status": "HEALTHY"
}
FieldDescription
current_balance_ethCurrent MATIC balance in the paymaster
estimated_tx_runwayEstimated number of UserOps remaining before top-up needed
statusHEALTHY, ALERT, or CRITICAL

Set up alerts when status transitions to ALERT or CRITICAL.


Dashboard — Overview

Get Dashboard Metrics

Fetches aggregated operational metrics for your tenant.

GET /v1/dashboard/metrics

http
GET /v1/dashboard/metrics
Authorization: Bearer <jwt>

Response 200 OK

json
{
  "total_active_wallets": 1247,
  "total_processing_volume_crypto": 89420.55,
  "successful_user_ops_24h": 342,
  "failed_user_ops_24h": 3
}

List Deposits

Returns paginated fiat-to-crypto deposits for your tenant.

GET /v1/dashboard/deposits?page=1&limit=20

ParameterTypeDescription
pageintegerPage number (default 1)
limitintegerPage size (default 20, max 100)

Get Deposit Detail

GET /v1/dashboard/deposits/{id}


List Asynchronous Ledger (Transfers)

Retrieves paginated ERC-4337 transfers for your business.

GET /v1/dashboard/transfers?limit=50&offset=0

ParameterTypeDefaultDescription
limitinteger50Number of records
offsetinteger0Records to skip

Response — array of ExtendedTransactionInstance:

json
[
  {
    "id": "txn_abc123",
    "masked_sender": "+225070****001",
    "recipient_address": "0xRecipient...",
    "status": "SETTLED",
    "tx_hash": "0xPolygonTxHash...",
    "created_at": "2026-06-25T12:00:00Z",
    "settled_at": "2026-06-25T12:00:08Z",
    "user_index": "blind_idx_abc",
    "financials": {
      "local_amount": 5500.00,
      "local_currency": "XOF",
      "stablecoin_settled": 9.81,
      "crypto_ticker": "USDC",
      "fx_quote_id": "fx_b3d8a1c2...",
      "applied_bps_markup": 50
    },
    "erc4337_context": {
      "user_op_hash": "0xUserOpHash...",
      "nonce": 12,
      "gas_paid_eth": "0.000021"
    }
  }
]

Get Granular Transfer Details

Fetches forensic-level details for a single transfer.

GET /v1/dashboard/transfers/{id}


List SCW User Directory

Returns all provisioned customer wallet accounts for your tenant.

GET /v1/dashboard/users

Response — array of UserAccountResponse:

json
[
  {
    "user_index": "blind_abc123",
    "wallet_address": "0xCustomer...",
    "account_status": "ACTIVE",
    "date_provisioned": "2026-01-10T08:00:00Z"
  }
]

Get User Detail

GET /v1/dashboard/users/{blind_index}

Response 200 OK

json
{
  "blind_index": "blind_abc123",
  "wallet_address": "0xCustomer...",
  "account_status": "ACTIVE",
  "date_provisioned": "2026-01-10T08:00:00Z",
  "total_transfers": 47,
  "total_volume": "844.50",
  "daily_limit": "500.00",
  "monthly_limit": "5000.00"
}

Lookup User by Wallet Address (SCW Recovery)

Finds the user record associated with an SCW address. Useful for operators recovering a user account after a phone number change.

GET /v1/dashboard/users/lookup?wallet={address}


Withdrawals

List all withdrawals for your tenant:

GET /v1/dashboard/withdrawals?page=1&limit=20

Get a single withdrawal:

GET /v1/dashboard/withdrawals/{id}

List all withdrawals awaiting local fiat payout (super admin only):

GET /v1/dashboard/withdrawals/pending-payouts

Confirm local fiat payout sent (super admin only):

POST /v1/dashboard/withdrawals/{id}/confirm-payout

The withdrawal must be in CRYPTO_RECEIVED status. Marks it COMPLETED.

Rach Payments API