Skip to main content

HandCash wallets (Gateway)

The Gateway uses HandCash for USD-denominated settlements: one wallet holds customer deposits and sends payouts; a second wallet receives the platform fee share.

Current model (consolidated treasury)​

RolePaymailPurpose
Treasury (sender)admin_asg@handcash.ioDeveloper / app-owner account that also acts as the treasury: holds deposits, sends pay() settlements, and is what HANDCASH_ACCESS_TOKEN authenticates as.
Revenue (recipient)revenue@handcash.ioReceive-only wallet for the 25% platform fee on each settlement (passive recipient).

The legacy separate treasury identity treasury_asg@handcash.io is retired for new deployments; operations use admin_asg@handcash.io as both app ownership and treasury.

Configuration​

Set via environment variables on asg-gateway (no code changes required to switch wallets):

  • HANDCASH_TREASURY_PAYMAIL — treasury paymail shown in /v1/health and admin treasury status; must match the wallet your access token controls.
  • HANDCASH_REVENUE_PAYMAIL — revenue fee recipient; must differ from the treasury paymail (validation rejects identical values).

HANDCASH_ACCESS_TOKEN must be issued for the same HandCash account as the treasury paymail you configure, or balance checks and settlements will not match expectations.

Reverting or splitting wallets​

Wallet layout is entirely config-driven. To use a dedicated treasury account again, set HANDCASH_TREASURY_PAYMAIL (and a matching access token) to that account’s paymail, and keep HANDCASH_REVENUE_PAYMAIL as revenue@handcash.io or another distinct recipient.

  • Gateway health: GET /v1/health — handcash.treasury / handcash.revenue_wallet when HandCash is configured.
  • Admin: GET /v1/admin/treasury/status — treasury and revenue paymails plus balance snapshot.

See also Settlement for on-chain task settlement concepts.