Getting started
TreasuryWire is a double-entry ledger with an HTTP API. Create wallets for your customers, move money between them, pay out to bank accounts and charge for your own services. Every movement is recorded as balanced debits and credits.
Base URL
All requests go to:
https://usetreasurywire.com/api/v1The API speaks JSON over HTTPS. Send Content-Type: application/json on requests with a body.
1. Get an API key
- Create a business account, or sign in to your back office.
- Open Settings › API keys and generate a key. It is shown once, so copy it straight away.
- Businesses on the shared platform account don't have API keys. Move to your own provider account first.
- Keep it in an environment variable, such as
TREASURYWIRE_KEY. Never put it in browser or mobile code.
2. Make your first request
List the balances held by a customer. A customer you haven't created yet simply returns an empty list.
curl -X GET "https://usetreasurywire.com/api/v1/ledger/account/by-owner/cust_1001" \
-H "Authorization: Bearer $TREASURYWIRE_KEY"Response
{
"message": "Balances retrieved",
"status": "OK",
"accounts": []
}3. Create a wallet
curl -X POST "https://usetreasurywire.com/api/v1/ledger/account" \
-H "Authorization: Bearer $TREASURYWIRE_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "wallet",
"ownerRef": "cust_1001",
"currency": "NGN",
"email": "ada@example.com",
"firstName": "Ada",
"lastName": "Obi"
}'The response includes the wallet and the bank account number your customer can pay into. See Accounts & balances.
What you can build
- Wallets that receive deposits through virtual bank accounts.
- Instant transfers between wallets, with no provider involved.
- Payouts from a wallet to any Nigerian bank account.
- Service charges that bill a customer's wallet from your own system.
- BVN verification that raises a customer's KYC tier.