Wallets

Adding funds

Credit a wallet with funds using the Wallets API.

Add funds to a wallet by issuing a credit via the API. The credit is applied to the wallet's balance immediately.

All amounts use Universal Monetary Notation — USD/2 means US dollars with 2 decimal places, so 100 = $1.00.

Credit a wallet#

The simplest credit — add $1.00 (100 in USD/2) from the default world source:

fctl wallets credit 100 USD/2 --name my-wallet --source account=world
POST/api/wallets/wallets/<WALLET_ID>/credit

Funding from a specific account#

You can fund a wallet from any ledger account — not just world. Set the sources field to reference the account:

fctl wallets credit 100 USD/2 --name my-wallet --source account=orders:1234
POST/api/wallets/wallets/<WALLET_ID>/credit

The source account must have sufficient funds. If it doesn't, the credit will fail with an INSUFFICIENT_FUND error.

Funding from another wallet#

You can also fund a wallet from another wallet by using the wallet source type:

fctl wallets credit 100 USD/2 --name my-wallet --source wallet=<source-wallet-id>
POST/api/wallets/wallets/<WALLET_ID>/credit

Funding a specific balance#

By default, credits go to the main balance. To credit a named balance (e.g. a voucher or seasonal balance), include the balance field:

fctl wallets credit 50 COIN --name my-wallet --balance season-2024 --source account=world
POST/api/wallets/wallets/<WALLET_ID>/credit