Charge Mode
Charge mode settles each payment individually on-chain. The seller's server interacts with two Dexter endpoints. Dexter handles fee payer co-signing, transaction simulation, broadcast, and confirmation. Buyers need zero SOL.
How It Works
Server Setup
Server Options
| Parameter | Type | Default | Description |
|---|---|---|---|
recipient | string | required | Solana wallet address to receive payments |
apiUrl | string | https://x402.dexter.cash | Settlement API base URL |
network | string | mainnet-beta | Solana cluster |
splToken | string | USDC mainnet mint | SPL token mint address |
decimals | number | 6 | Token decimal places |
verifyRpcUrl | string | none | Optional RPC URL for independent on-chain verification |
Client Setup
Client Options
| Parameter | Type | Default | Description |
|---|---|---|---|
signer | TransactionSigner | required | Solana Kit transaction signer |
computeUnitPrice | number | none | Priority fee in micro-lamports |
computeUnitLimit | number | none | Compute unit limit for the transaction |
onProgress | function | none | Callback for settlement progress events |
Prerequisites
- Recipient wallet must have a USDC token account (any wallet that has held USDC has one)
- Buyers need USDC, not SOL. Dexter sponsors all transaction fees.
- Supported networks:
mainnet-betaanddevnet - USDC mint:
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v(mainnet),4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU(devnet)
When to Use Charge vs Sessions
Use charge mode when:
- Requests are infrequent or unpredictable
- Each API call is independent
- Simplest integration is the priority
Use sessions when:
- Requests are frequent or continuous
- You want to minimize on-chain transactions
- The buyer is an agent running many sequential calls