afpay CLI reference

A payment tool for AI agents — send and receive across five networks through one interface, with spending limits you control.

afpay is compiled from a closed cli-spec-v1 registry: one source for argv parsing, typed invocation values, which parameter combinations are legal, output contracts, and help. An invocation runs only when it matches exactly one registered combination.

Global arguments

AFDATA registers these itself, so the syntax in Commands leaves them out.

ArgumentWhereWhat it does
--helpevery commandEvery legal shape of that command, complete, plus its subcommands. JSON by default; --output plain for a terminal.
--versionafpay onlyName, version, and build identity as one protocol result.
--docsafpay onlyThis document, rendered from the registry.
--output <FORMAT>per output contractRender as json, yaml, plain (default json).
--output-to <DESTINATION>per output contractRoute results and diagnostics to split, stdout, stderr (default split).
--stdout-file <PATH>, --stderr-file <PATH>per output contractAppend that stream to a file instead.

Success output is protocol events, on those terms, unless a command’s own Output line says otherwise.

A shape is one legal set of arguments that may appear together, under a stable id. Where a command has more than one, each id is a heading below. --help returns them all at once, so discovering a command costs one call; there is no recursive mode across commands, and this document is that view.

Commands

afpay

Run a long-lived afpay session instead of a single command

session-pipe — Read JSONL requests on stdin and answer on stdout

afpay --mode pipe [--data-dir <DIR>] [--log <FILTER>...] [--public-listen]

session-interactive — Human REPL with completion and QR helpers

afpay --mode interactive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>]

session-tui — Full-screen terminal workflow over the same command interface

afpay --mode tui [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>]

session-rest — HTTP API server; only this shape accepts –rest-listen

afpay --mode rest [--data-dir <DIR>] [--log <FILTER>...] [--public-listen] [--rest-listen <HOST:PORT>] [--rest-api-key-secret <SOURCE>]

Arguments across every shape above:

ArgumentMeaning
--modeLong-lived session to run instead of a single command
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlDrive another afpay node from this session
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--public-listenAllow binding to a non-loopback address; use only behind TLS or a firewall
--rest-listenListen address for the REST server
--rest-api-key-secretBearer API key the REST server requires (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay api export

Write the OpenAPI document and standalone JSON Schemas to a directory

afpay api export [--directory <DIR>] [--force]
ArgumentMeaning
--directoryDestination directory
--forceReplace generated files that are already there

afpay balance

Balance across every network

afpay balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--cashu-check]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every wallet)
--networkRestrict to one network
--cashu-checkVerify Cashu proofs against the mint; slower but authoritative

afpay btc backup

Back up Bitcoin wallet data to a .tar.zst archive

afpay btc backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-btc-.tar.zst)
--walletWallet ID (omit to back up every Bitcoin wallet)

afpay btc balance

Bitcoin balance

afpay btc balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every Bitcoin wallet)

afpay btc config set

Update one Bitcoin wallet’s settings

afpay btc config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--labelNew wallet label

afpay btc config show

Show one Bitcoin wallet’s configuration

afpay btc config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay btc limit add

Add a Bitcoin network or wallet spend limit

afpay btc limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID; omit for a limit covering the whole network
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in base units

afpay btc receive

Show the wallet’s receive address

btc-receive — Return the receive address or invoice and exit

afpay btc receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>]

btc-receive-wait — Block until a matching payment settles; only this shape describes the wait

afpay btc receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--wait-sync-limit <N>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (auto-selected if omitted)
--waitBlock until a matching payment settles
--wait-timeout-sGive up waiting after N seconds
--wait-poll-interval-msPoll interval while waiting
--qr-svg-fileWrite the receive QR payload to an SVG file
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice
--wait-sync-limitMax history records scanned per poll while resolving the tx id

afpay btc restore

Restore Bitcoin wallet data from a .tar.zst archive

afpay btc restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay btc send

Send BTC on-chain

afpay btc send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount-sats <SATS> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--toRecipient Bitcoin address (bc1… / tb1…)
--amount-satsAmount in satoshis
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay btc wallet close

Close a Bitcoin wallet

afpay btc wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--dangerously-skip-balance-check-and-may-lose-moneyClose even if the wallet still holds funds

afpay btc wallet create

Create a Bitcoin wallet

btc-wallet-create-esplora — Esplora chain source; only this shape accepts –btc-esplora-url

afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] [--btc-backend esplora] [--btc-esplora-url <URL>] [--mnemonic-secret <SOURCE>] [--label <LABEL>]

btc-wallet-create-core-rpc — Bitcoin Core RPC chain source; requires –btc-core-url

afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] --btc-backend core-rpc --btc-core-url <URL> [--btc-core-auth-secret <SOURCE>] [--mnemonic-secret <SOURCE>] [--label <LABEL>]

btc-wallet-create-electrum — Electrum chain source; requires –btc-electrum-url

afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] --btc-backend electrum --btc-electrum-url <URL> [--mnemonic-secret <SOURCE>] [--label <LABEL>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key
--btc-networkBitcoin sub-network
--btc-address-typeAddress type
--btc-backendChain-source backend
--btc-esplora-urlCustom Esplora API URL
--btc-core-urlBitcoin Core RPC URL
--btc-core-auth-secretBitcoin Core RPC credentials as USER:PASS (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--btc-electrum-urlElectrum server URL
--mnemonic-secretExisting BIP39 mnemonic to restore this wallet from (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--labelOptional wallet label

afpay btc wallet dangerously-show-seed

Reveal the Bitcoin wallet seed; output is deliberately unredacted

afpay btc wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay btc wallet list

List Bitcoin wallets

afpay btc wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay cashu backup

Back up Cashu wallet data to a .tar.zst archive

afpay cashu backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-cashu-.tar.zst)
--walletWallet ID (omit to back up every Cashu wallet)

afpay cashu balance

Cashu balance

afpay cashu balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--check]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every Cashu wallet)
--checkVerify proofs against the mint; slower but authoritative

afpay cashu config set

Update one Cashu wallet’s settings

afpay cashu config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--labelNew wallet label

afpay cashu config show

Show one Cashu wallet’s configuration

afpay cashu config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay cashu limit add

Add a Cashu network or wallet spend limit

afpay cashu limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID; omit for a limit covering the whole network
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in base units

afpay cashu receive

Redeem a Cashu token into a wallet

afpay cashu receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] <TOKEN> [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
TOKENCashu token string
--walletWallet ID (auto-matched from the token if omitted)

afpay cashu receive-from-ln

Create a Lightning invoice that mints Cashu proofs when paid

cashu-receive — Return the receive address or invoice and exit

afpay cashu receive-from-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]

cashu-receive-wait — Block until a matching payment settles; only this shape describes the wait

afpay cashu receive-from-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (auto-selected if omitted)
--waitBlock until a matching payment settles
--wait-timeout-sGive up waiting after N seconds
--wait-poll-interval-msPoll interval while waiting
--qr-svg-fileWrite the receive QR payload to an SVG file
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice
--amount-satsAmount in sats
--onchain-memoInvoice description

afpay cashu receive-from-ln-claim

Claim the proofs minted by a settled receive-from-ln quote

afpay cashu receive-from-ln-claim [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --ln-quote-id <QUOTE_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--ln-quote-idQuote ID or payment hash from the deposit

afpay cashu restore

Restore Cashu wallet data from a .tar.zst archive

afpay cashu restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay cashu send

Mint a P2P Cashu token; to pay a Lightning invoice use cashu send-to-ln

afpay cashu send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --amount-sats <SATS> [--cashu-mint <URL>...] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--amount-satsAmount in sats
--cashu-mintRestrict to wallets on these mints, tried in order
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay cashu send-to-ln

Melt Cashu proofs to pay a Lightning invoice

afpay cashu send-to-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <BOLT11> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--toLightning invoice to pay
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay cashu wallet close

Close a Cashu wallet

afpay cashu wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--dangerously-skip-balance-check-and-may-lose-moneyClose even if the wallet still holds funds

afpay cashu wallet create

Create a Cashu wallet on one mint

afpay cashu wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --cashu-mint <URL> [--label <LABEL>] [--mnemonic-secret <SOURCE>] [--idempotency-key <KEY>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--cashu-mintCashu mint URL
--labelOptional wallet label
--mnemonic-secretExisting BIP39 mnemonic to restore this wallet from (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key

afpay cashu wallet dangerously-show-seed

Reveal the Cashu wallet seed; output is deliberately unredacted

afpay cashu wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay cashu wallet list

List Cashu wallets

afpay cashu wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay cashu wallet restore

Restore lost proofs from the mint, repairing counter or proof drift

afpay cashu wallet restore [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay container install

Build the image if missing, run the daemon, and print the client command

container-install-release — Download the prebuilt release image pinned to this binary

afpay container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--with <phoenixd|bitcoind>...] [--allow <CATEGORY=URL>...] [--btc-network <mainnet|signet>] [--btc-rpc-port <PORT>] [--btc-prune-mb <MB>] [--rebuild] [--reveal-daemon-secret]

container-install-from-source — Compile from a checkout; only this shape accepts –features and –context

afpay container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--with <phoenixd|bitcoind>...] [--allow <CATEGORY=URL>...] [--btc-network <mainnet|signet>] [--btc-rpc-port <PORT>] [--btc-prune-mb <MB>] --from-source [--features <FEATURES>] [--context <DIR>] [--reveal-daemon-secret]

Arguments across every shape above:

ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted
--nameContainer name
--portDaemon port, published on 127.0.0.1
--withBundled daemon to install and enable
--allowOperator allowlist entry; a public listener refuses to start without one. Categories: mint, esplora, sol-rpc, evm-rpc, btc-core, btc-electrum, ln
--btc-networkBitcoin network when –with bitcoind
--btc-rpc-portbitcoind RPC port when –with bitcoind
--btc-prune-mbbitcoind prune target when –with bitcoind
--rebuildRebuild the image even when it already exists
--from-sourceCompile the image from a source checkout instead of the prebuilt release
--featuresCargo feature set for the source build
--contextSource checkout to build from
--reveal-daemon-secretPrint the generated daemon credential and the credential-bearing client command

afpay container logs

Stream the container logs, unchanged

afpay container logs [--runtime <docker|podman|apple>] [--name <NAME>] [--follow]

Output: raw bytes on success; rejects --output and --output-to; redirect with --stdout-file or --stderr-file. Failures are still strict JSON on stderr.

ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted
--nameContainer name
--followKeep streaming as new lines arrive

afpay container status

Report whether the daemon is running, with its endpoint and client command

afpay container status [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--reveal-daemon-secret]
ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted
--nameContainer name
--portDaemon port, published on 127.0.0.1
--reveal-daemon-secretPrint the generated daemon credential and the credential-bearing client command

afpay container uninstall

Stop and remove the container; –purge also drops the image and cache

afpay container uninstall [--runtime <docker|podman|apple>] [--name <NAME>] [--purge]
ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted
--nameContainer name
--purgeAlso remove the built image and the cached context

afpay evm backup

Back up EVM wallet data to a .tar.zst archive

afpay evm backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-evm-.tar.zst)
--walletWallet ID (omit to back up every EVM wallet)

afpay evm balance

EVM balance

afpay evm balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every EVM wallet)

afpay evm config set

Update one EVM wallet’s settings

afpay evm config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>] [--evm-rpc-endpoint <URL>...] [--chain-id <ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--labelNew wallet label
--evm-rpc-endpointReplace the EVM JSON-RPC endpoints, in failover order
--chain-idEVM chain ID

afpay evm config show

Show one EVM wallet’s configuration

afpay evm config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay evm config token-add

Register a custom EVM token for balance tracking

afpay evm config token-add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL> --address <ADDRESS> [--decimals <N>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--symbolToken symbol, e.g. dai
--addressToken contract or mint address
--decimalsToken decimals

afpay evm config token-remove

Unregister a custom EVM token

afpay evm config token-remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--symbolToken symbol to remove

afpay evm limit add

Add a EVM network or wallet spend limit

afpay evm limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT> [--token <TOKEN>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID; omit for a limit covering the whole network
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in base units
--tokenToken the limit applies to

afpay evm receive

Show the wallet’s receive address

afpay evm receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (auto-selected if omitted)
--onchain-memoMemo recorded with the request

afpay evm restore

Restore EVM wallet data from a .tar.zst archive

afpay evm restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay evm send

Send the chain’s native token or an ERC-20

afpay evm send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount <BASE_UNITS> --token <TOKEN> [--chain-id <ID>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--toRecipient address (0x…)
--amountAmount in base units (wei for ETH)
--tokennative, or a registered token symbol
--chain-idPin the chain; a mismatched wallet returns wrong_chain
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay evm wallet close

Close a EVM wallet

afpay evm wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--dangerously-skip-balance-check-and-may-lose-moneyClose even if the wallet still holds funds

afpay evm wallet create

Create an EVM chain wallet

afpay evm wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --evm-rpc-endpoint <URL>... [--chain-id <ID>] [--label <LABEL>] [--idempotency-key <KEY>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--evm-rpc-endpointEVM JSON-RPC endpoint; repeat to set the failover order
--chain-idEVM chain ID
--labelOptional wallet label
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key

afpay evm wallet dangerously-show-seed

Reveal the EVM wallet seed; output is deliberately unredacted

afpay evm wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay evm wallet list

List EVM wallets

afpay evm wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay global backup

Back up every network’s data to a .tar.zst archive

afpay global backup [--data-dir <DIR>] [--archive-out <PATH>] [--extra-dir <LABEL=/path>...]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-global-.tar.zst)
--extra-dirAlso archive this directory under LABEL

afpay global config get

Read the runtime configuration, or one value by dot-path

afpay global config get [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [<KEY>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
KEYDot-path key, e.g. log or exchange_rate.ttl_s; omit to show everything

afpay global config set

Set one runtime configuration value

afpay global config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] <KEY> [<VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
KEYDot-path key
VALUEValue, or repeated values for a list-valued key

afpay global limit add

Add a global spend limit, in USD cents

afpay global limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --window <DURATION> --max-spend <CENTS>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in USD cents

afpay global restore

Restore every network’s data from a .tar.zst archive

afpay global restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>] [--extra-dir <LABEL=/path>...]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--extra-dirAlso restore this directory from LABEL

afpay history list

List history records from the local store

afpay history list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--onchain-memo <TEXT>] [--limit <N>] [--offset <N>] [--since-epoch-s <EPOCH>] [--until-epoch-s <EPOCH>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletFilter by wallet ID
--networkRestrict to one network
--onchain-memoFilter by exact on-chain memo
--limitMaximum records returned
--offsetRecords to skip
--since-epoch-sOnly records created at or after this epoch second
--until-epoch-sOnly records created before this epoch second

afpay history status

Report one transaction’s current status

afpay history status [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --transaction-id <TX_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--transaction-idTransaction ID

afpay history update

Incrementally sync backend history into the local store

afpay history update [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--limit <N>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletSync one wallet (default: every wallet in scope)
--networkRestrict to one network
--limitMaximum records scanned per wallet

afpay limit list

Show every spend-limit rule and its usage

afpay limit list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay limit reconcile

Force a stuck spend-ledger reservation to a terminal state (operator-only)

limit-reconcile-confirm — Record the spend: the payment actually succeeded

afpay limit reconcile [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --reservation-id <ID> --confirm --reason <TEXT>

limit-reconcile-cancel — Release the reservation: the payment did not happen

afpay limit reconcile [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --reservation-id <ID> --cancel --reason <TEXT>

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--reservation-idReservation ID
--confirmThe payment did settle
--cancelThe payment did not settle
--reasonAudit note (1..=512 chars) explaining the forced outcome

afpay limit remove

Remove a spend-limit rule by ID

afpay limit remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --rule-id <RULE_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--rule-idRule ID, e.g. r_1a2b3c4d

afpay ln backup

Back up Lightning wallet data to a .tar.zst archive

afpay ln backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-ln-.tar.zst)
--walletWallet ID (omit to back up every Lightning wallet)

afpay ln balance

Lightning balance

afpay ln balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every Lightning wallet)

afpay ln config set

Update one Lightning wallet’s settings

afpay ln config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--labelNew wallet label

afpay ln config show

Show one Lightning wallet’s configuration

afpay ln config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay ln limit add

Add a Lightning network or wallet spend limit

afpay ln limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID; omit for a limit covering the whole network
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in base units

afpay ln receive

Create a BOLT11 invoice, or return the reusable BOLT12 offer

ln-receive — Return the receive address or invoice and exit

afpay ln receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>]

ln-receive-wait — Block until a matching payment settles; only this shape describes the wait

afpay ln receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (auto-selected if omitted)
--waitBlock until a matching payment settles
--wait-timeout-sGive up waiting after N seconds
--wait-poll-interval-msPoll interval while waiting
--qr-svg-fileWrite the receive QR payload to an SVG file
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice
--amount-satsAmount in sats; omit for a BOLT12 offer

afpay ln restore

Restore Lightning wallet data from a .tar.zst archive

afpay ln restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay ln send

Pay a BOLT11 invoice or a BOLT12 offer. Lightning carries no on-chain memo, so annotate with –local-memo

afpay ln send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <INVOICE> [--amount-sats <SATS>] [--wallet <WALLET_ID>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--toBOLT11 invoice or BOLT12 offer (lno1…)
--amount-satsAmount in sats; required for a BOLT12 offer, rejected for BOLT11
--walletSource wallet ID (auto-selected if omitted)
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay ln wallet close

Close a Lightning wallet

afpay ln wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--dangerously-skip-balance-check-and-may-lose-moneyClose even if the wallet still holds funds

afpay ln wallet create

Create a Lightning wallet

ln-wallet-create-nwc — Nostr Wallet Connect; authenticates with a connection URI

afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend nwc --nwc-uri-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]

ln-wallet-create-phoenixd — phoenixd; authenticates with an endpoint and HTTP password

afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend phoenixd --endpoint-url <URL> --password-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]

ln-wallet-create-lnbits — LNbits; authenticates with an endpoint and admin API key

afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend lnbits --endpoint-url <URL> --admin-key-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--backendLightning backend this wallet talks to
--nwc-uri-secretNWC connection URI (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--endpoint-urlBackend HTTP endpoint
--password-secretphoenixd HTTP password (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--admin-key-secretLNbits admin API key (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--labelOptional wallet label
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key

afpay ln wallet dangerously-show-seed

Reveal the Lightning wallet seed; output is deliberately unredacted

afpay ln wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay ln wallet list

List Lightning wallets

afpay ln wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay pay confirm

Pay by confirming a plan a send resolved — the only command that moves money

afpay pay confirm [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --plan-id <PLAN_ID> [--idempotency-key <KEY>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--plan-idThe plan_id a send returned. Single-use, and refused once it expires or the terms it was resolved against change
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and plan replays the first response instead of paying twice

afpay skill install

Install or refresh the Agent-First Pay skill

skill-install-every-agent — Target every agent that supports the scope

afpay skill install [--agent all] [--scope <personal|workspace>] [--force]

skill-install-one-agent — Target one named agent; only this shape accepts –skills-dir

afpay skill install --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders
--forceOverwrite or remove an Agent-First Pay skill this tool did not manage

afpay skill status

Show whether the Agent-First Pay skill is installed, valid, and up to date

skill-status-every-agent — Target every agent that supports the scope

afpay skill status [--agent all] [--scope <personal|workspace>]

skill-status-one-agent — Target one named agent; only this shape accepts –skills-dir

afpay skill status --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders

afpay skill uninstall

Remove an afpay-managed Agent-First Pay skill

skill-uninstall-every-agent — Target every agent that supports the scope

afpay skill uninstall [--agent all] [--scope <personal|workspace>] [--force]

skill-uninstall-one-agent — Target one named agent; only this shape accepts –skills-dir

afpay skill uninstall --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders
--forceOverwrite or remove an Agent-First Pay skill this tool did not manage

afpay sol backup

Back up Solana wallet data to a .tar.zst archive

afpay sol backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--archive-outArchive path (default: ./afpay-sol-.tar.zst)
--walletWallet ID (omit to back up every Solana wallet)

afpay sol balance

Solana balance

afpay sol balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (omit to show every Solana wallet)

afpay sol config set

Update one Solana wallet’s settings

afpay sol config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>] [--sol-rpc-endpoint <URL>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--labelNew wallet label
--sol-rpc-endpointReplace the Solana JSON-RPC endpoints, in failover order

afpay sol config show

Show one Solana wallet’s configuration

afpay sol config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay sol config token-add

Register a custom Solana token for balance tracking

afpay sol config token-add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL> --address <ADDRESS> [--decimals <N>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--symbolToken symbol, e.g. dai
--addressToken contract or mint address
--decimalsToken decimals

afpay sol config token-remove

Unregister a custom Solana token

afpay sol config token-remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--symbolToken symbol to remove

afpay sol limit add

Add a Solana network or wallet spend limit

afpay sol limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT> [--token <TOKEN>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID; omit for a limit covering the whole network
--windowRolling window, e.g. 30m, 1h, 24h, 7d
--max-spendMaximum spend in base units
--tokenToken the limit applies to

afpay sol receive

Show the wallet’s receive address

sol-receive — Return the receive address or invoice and exit

afpay sol receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>]

sol-receive-wait — Block until a matching payment settles; only this shape describes the wait

afpay sol receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--onchain-memo <TEXT>] [--min-confirmations <N>] [--reference <KEY>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID (auto-selected if omitted)
--waitBlock until a matching payment settles
--wait-timeout-sGive up waiting after N seconds
--wait-poll-interval-msPoll interval while waiting
--qr-svg-fileWrite the receive QR payload to an SVG file
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice
--onchain-memoOn-chain memo to watch for
--min-confirmationsConfirmation depth before the payment counts as settled
--referenceReference key to watch for (base58)

afpay sol restore

Restore Solana wallet data from a .tar.zst archive

afpay sol restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
ArgumentMeaning
ARCHIVEPath to the backup archive
--data-dirWallet and data directory
--dangerously-overwriteClear existing data before restoring instead of merging
--pg-url-secretOverride the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)

afpay sol send

Send SOL or an SPL token

afpay sol send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount <BASE_UNITS> --token <TOKEN> [--reference <KEY>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--toRecipient Solana address (base58)
--amountAmount in base units (lamports for SOL)
--tokennative for SOL, or a registered token symbol
--referenceReference key for order binding (base58-encoded 32 bytes)
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay sol wallet close

Close a Solana wallet

afpay sol wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID
--dangerously-skip-balance-check-and-may-lose-moneyClose even if the wallet still holds funds

afpay sol wallet create

Create a Solana wallet

afpay sol wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --sol-rpc-endpoint <URL>... [--label <LABEL>] [--sol-cluster <mainnet-beta|devnet|testnet>] [--idempotency-key <KEY>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--sol-rpc-endpointSolana JSON-RPC endpoint; repeat to set the failover order
--labelOptional wallet label
--sol-clusterIntended cluster; plans warn when RPC hostname evidence differs
--idempotency-keyOpaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key

afpay sol wallet dangerously-show-seed

Reveal the Solana wallet seed; output is deliberately unredacted

afpay sol wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--walletWallet ID

afpay sol wallet list

List Solana wallets

afpay sol wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it

afpay ui receive

Open a panel showing the receive address or invoice as a code to scan

ui-receive-cashu — A Lightning invoice that mints Cashu proofs when paid

afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network cashu [--mode <window|link|session>] [--wallet <WALLET_ID>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]

ui-receive-ln — A BOLT11 invoice, or the reusable BOLT12 offer

afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network ln [--mode <window|link|session>] [--wallet <WALLET_ID>] [--amount-sats <SATS>]

ui-receive-sol — The wallet’s Solana receive address

afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network sol [--mode <window|link|session>] [--wallet <WALLET_ID>]

ui-receive-evm — The wallet’s EVM receive address

afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network evm [--mode <window|link|session>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>]

ui-receive-btc — The wallet’s Bitcoin receive address

afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network btc [--mode <window|link|session>] [--wallet <WALLET_ID>]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--networkNetwork to be paid on
--modeHow this reaches the person: window a browser window is open on this machine; link the page is reachable from this machine’s network at the link URL; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window
--walletWallet ID (auto-selected if omitted)
--amount-satsAmount in sats
--onchain-memoMemo recorded with the request

afpay ui send

Open a panel showing a resolved payment and wait for a person to approve it

ui-send-cashu — Melt Cashu proofs to pay a Lightning invoice

afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network cashu [--mode <window|session>] --to <DESTINATION> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]

ui-send-ln — Pay a BOLT11 invoice or a BOLT12 offer

afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network ln [--mode <window|session>] --to <DESTINATION> [--amount-sats <SATS>] [--wallet <WALLET_ID>] [--local-memo <KEY=VALUE>...]

ui-send-sol — Send SOL or an SPL token

afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network sol [--mode <window|session>] --to <DESTINATION> --amount <BASE_UNITS> --token <TOKEN> [--reference <KEY>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]

ui-send-evm — Send the chain’s native token or an ERC-20

afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network evm [--mode <window|session>] --to <DESTINATION> --amount <BASE_UNITS> --token <TOKEN> [--chain-id <ID>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]

ui-send-btc — Send BTC on-chain

afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network btc [--mode <window|session>] --to <DESTINATION> --amount-sats <SATS> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]

Arguments across every shape above:

ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--networkNetwork the payment leaves on
--modeHow this reaches the person: window a browser window is open on this machine; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window
--toRecipient address, BOLT11 invoice, or BOLT12 offer
--amountAmount in base units (lamports for SOL, wei for ETH)
--amount-satsAmount in satoshis
--tokennative, or a registered token symbol
--referenceReference key for order binding (base58-encoded 32 bytes)
--chain-idPin the chain; a mismatched wallet returns wrong_chain
--walletSource wallet ID (auto-selected if omitted)
--onchain-memoOn-chain memo, sent with the transaction
--local-memoLocal bookkeeping annotation; bare text is stored as note=

afpay ui wallet

Open a panel showing every wallet and its balance

afpay ui wallet [--data-dir <DIR>] [--log <FILTER>...] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--cashu-check] [--mode <window|link|session>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--walletWallet ID (omit to show every wallet)
--networkRestrict to one network
--cashu-checkVerify Cashu proofs against the mint; slower but authoritative
--modeHow this reaches the person: window a browser window is open on this machine; link the page is reachable from this machine’s network at the link URL; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window

afpay wallet list

List wallets across every network

afpay wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--network <cashu|ln|sol|evm|btc>]
ArgumentMeaning
--data-dirWallet and data directory
--logLog filter to enable; repeat, or pass a comma-separated list
--peer-urlRun this command on another afpay node instead of locally
--peer-api-key-secretThe peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE)
--dry-runPreview the command without executing it
--networkRestrict to one network

Exit codes

CodeMeaning
0The command ran and succeeded.
1The command ran and failed. The event carries a domain error.code.
2The invocation was rejected before anything ran. error.code is one of the cli_* codes below.

The split is the useful one for a caller: exit 2 means the call was never made, so retrying it unchanged cannot help, while exit 1 means it was.

CLI errors

Every structural failure emits one strict JSON kind:"error" event on stderr, leaves stdout empty, and exits 2. The code names the failure — cli_unknown_argument for an unknown spelling, cli_unregistered_combination for registered arguments in a mixture that is not, and one each for cli_unknown_command, cli_missing_argument_value, cli_invalid_argument_value, cli_duplicate_argument, cli_unexpected_positional, and cli_invalid_utf8. message identifies a safe argument spelling or the failure category and hint gives the command to run next; neither ever quotes a raw value, including secrets. These are decided before any config, secret source, filesystem, network, or domain I/O.

Two exit-1 codes describe the tool itself rather than the call: cli_invocation_invalid means the program misread its own resolved invocation — an unknown action id, or an argument id the selected combination cannot produce — and output_setup_failed means an output sink (--stdout-file, --stderr-file, stream redirection) could not be established. Both are defects to report, not inputs to correct; retrying the same command cannot help.

Domain failures (exit 1) carry their own stable error.code instead, drawn from whatever this tool defines rather than from the cli_* set. Error events are routinely logged, so a message never quotes a value that came from an argument able to carry a credential — a header, a cookie, a token, a password, a proxy URL, an environment value, a form field. Such an error names the argument and the shape that was wrong, and stops there. A value that cannot be a secret — a path, a dot-path, a session name — is quoted, because an error that cannot say which one it means is not worth logging either.