Skip to main content

Overview

Treasury teams at fintechs, crypto-native companies, and Web3 businesses need a reliable way to hold stablecoin reserves, distribute liquidity to subsidiaries or partners, and execute fiat off-ramps on demand. StableStack provides a programmable treasury layer — multi-wallet infrastructure, fiat payouts to any bank, and full transaction visibility.

Core Flow

1

Set up merchant-level wallets for each reserve

Create separate merchant wallets for different purposes (e.g., a USDC wallet on ERC20 for operational receipts, a USDC wallet on Polygon as a secondary reserve). No customer_id is required for merchant wallets.
POST /wallets
{
  "currency": "USDC",
  "network": "erc20",
  "description": "Primary USDC reserve (ERC20)"
}
{
  "currency": "USDC",
  "network": "polygon",
  "description": "Secondary USDC reserve (Polygon)"
}
2

View all wallets and balances

Get a consolidated view of all merchant wallets and their balances for treasury reporting.
GET /wallets
3

Distribute funds to subsidiaries or partners

When disbursing to an entity with a crypto wallet, send directly to their stablecoin address.
POST /payouts/wallets
{
  "currency": "USDC",
  "address": "RecipientWalletAddressHere",
  "amount": 50000,
  "network": "erc20",
  "recipient_name": "Partner Entity Ltd"
}
4

Off-ramp to a bank account

Convert stablecoin reserves to fiat and pay directly into a bank account — useful for covering local operating expenses or settling invoices.
POST /payouts/banks
{
  "currency": "USDC",
  "account_number": "0123456789",
  "bank_name": "Zenith Bank",
  "bank_code": "000015",
  "amount": "10000",
  "recipient_name": "Operations Account",
  "recipient_currency": "NGN",
  "recipient_country": "Nigeria"
}
5

Audit the full transaction history

Query all transactions across your merchant account for reconciliation, audits, or reporting.
GET /transactions
Filter by transaction ID or reference ID for precise lookups:
GET /customers/transactions/by_txid/{transaction_id}
GET /customers/transactions/by_ref_id/{reference_id}

Treasury Architecture Pattern

A typical StableStack treasury setup uses layered wallets:
Merchant Account
├── USDC / ERC20    → Operational reserve (inbound receipts)
├── USDC / Polygon  → Liquidity buffer (outbound payments)
└── NGN / Fiat      → Local operating expenses (bank withdrawals)
Each wallet has a dedicated on-chain address. Inbound deposits trigger wallet.transaction.inbound webhooks, giving your treasury system real-time visibility.

Key APIs Used

EndpointPurpose
POST /walletsCreate merchant wallets
GET /walletsView all wallets and balances
GET /wallets/{wallet_id}Get a specific wallet
POST /payouts/walletsSend stablecoin to an external wallet
POST /payouts/banksOff-ramp to a local bank account
GET /transactionsFull transaction history
GET /payouts/feesPre-check payout fees

Relevant Webhook Events

EventTrigger
wallet.transaction.inboundFunds received into a wallet
wallet.transaction.outboundFunds sent from a wallet
payout.completedBank or wallet payout confirmed
payout.failedPayout failed — requires retry

Next Steps