Skip to content

Payment Commands

Commands for managing USDC blockchain payments on the Base L2 network. Payment must be enabled in configuration (payment.enabled = true). See the Payments section for detailed documentation.

lango payment <subcommand>

Experimental Feature

The payment system is experimental. Use with caution and always verify transaction details before sending.


lango payment balance

Show the current USDC wallet balance, address, and network information. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture balance output directly.

lango payment balance [--output table|json]
Flag Type Default Description
--output string table Output format (table or json)

Example:

$ lango payment balance
Wallet Balance
  Balance:   25.50 USDC
  Address:   0x1234...abcd
  Network:   Base Sepolia (chain 84532)

lango payment history

Show payment transaction history. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture payment history output directly.

lango payment history [--output table|json] [--limit N]
Flag Type Default Description
--output string table Output format (table or json)
--limit int 20 Maximum number of transactions to show

Example:

$ lango payment history
STATUS     AMOUNT     TO            METHOD   PURPOSE                  TX HASH       CREATED
confirmed  1.50 USDC  0x5678...     direct   API access fee           0xaabb...     2026-02-20 14:30
confirmed  0.50 USDC  0x9abc...     x402     Weather data query       0xccdd...     2026-02-20 13:15
pending    2.00 USDC  0xdef0...     direct   Document translation     0xeeff...     2026-02-20 12:00

$ lango payment history --limit 5 --output json

lango payment limits

Show configured spending limits and current daily usage. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture spending-limit output directly.

lango payment limits [--output table|json]
Flag Type Default Description
--output string table Output format (table or json)

Example:

$ lango payment limits
Spending Limits
  Max Per Transaction:  1.00 USDC
  Max Daily:            10.00 USDC
  Spent Today:          3.50 USDC
  Remaining Today:      6.50 USDC

lango payment info

Show wallet and payment system configuration details, including X402 protocol status. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture payment info output directly.

lango payment info [--output table|json]
Flag Type Default Description
--output string table Output format (table or json)

Example:

$ lango payment info
Payment System Info
  Wallet Address:      0x1234...abcd
  Network:             Base Sepolia (chain 84532)
  Wallet Provider:     local
  USDC Contract:       0x036CbD53842c5426634e7929541eC2318f3dCF7e
  RPC URL:             https://sepolia.base.org
  X402 Auto-Intercept: disabled
  X402 Max Auto-Pay:   unlimited USDC

lango payment send

Send a USDC payment to a recipient address. Requires --to, --amount, and --purpose flags. Prompts for confirmation unless --force is specified. The confirmation prompt, success output, and JSON output all use the Cobra command streams so wrappers and test harnesses can capture the full interaction.

lango payment send --to <address> --amount <amount> --purpose <text> [--force] [--output table|json]
Flag Type Default Description
--to string required Recipient wallet address (0x...)
--amount string required Amount in USDC (e.g., "1.50")
--purpose string required Human-readable purpose of the payment
--force bool false Skip confirmation prompt
--output string table Output format (table or json)

Example:

$ lango payment send \
    --to 0x5678abcd1234ef567890abcdef1234567890abcd \
    --amount "1.50" \
    --purpose "API access fee"
Send 1.50 USDC to 0x5678abcd... on Base Sepolia?
Purpose: API access fee
Confirm [y/N]: y

Payment Submitted
  Status:    pending
  Tx Hash:   0xaabb1234...
  Amount:    1.50 USDC
  From:      0x1234abcd...
  To:        0x5678abcd...
  Network:   Base Sepolia (chain 84532)

Irreversible

Blockchain transactions cannot be reversed. Always verify the recipient address and amount before confirming.

Tip

Use --force for non-interactive environments. Without it, the command requires confirmation and fails in non-interactive terminals.


lango payment x402

Show X402 auto-pay protocol configuration and status. The X402 protocol enables automatic payment for HTTP 402 (Payment Required) responses using the Coinbase SDK and EIP-3009 signing. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture X402 inspection output directly.

lango payment x402 [--output table|json]
Flag Type Default Description
--output string table Output format (table or json)

Example:

$ lango payment x402
X402 Auto-Pay Configuration
  Auto-Intercept:    enabled
  Max Auto-Pay:      1.00 USDC
  Network:           Base Sepolia (chain 84532)
  Wallet Address:    0x1234...abcd

When X402 is disabled:

$ lango payment x402
X402 Auto-Pay Configuration
  Auto-Intercept:    disabled

See the X402 Protocol documentation for details on the payment protocol.