API Reference
All endpoints are served from the Dexter settlement API at x402.dexter.cash.
Charge Endpoints
POST /mpp/prepare
Get a fee payer address and fresh blockhash for building a charge transaction.
Request:
Response:
POST /mpp/settle
Submit a signed transaction for fee payer co-signing, simulation, broadcast, and confirmation.
Request:
Response (success):
Response (failure):
GET /mpp/stats
Live settlement statistics.
Response:
Session Endpoints
POST /mpp/session/open
Open a payment channel between a buyer and seller.
Request:
Response:
POST /mpp/session/voucher
Sign a payment voucher for a cumulative amount within an open session.
Request:
Response:
POST /mpp/session/close
Close a session and settle on-chain. Executes a TransferChecked from the buyer's Swig wallet to the seller for the cumulative amount consumed.
Request:
Response:
Onboarding Endpoints
Onboarding endpoints are served from x402.dexter.cash/api/sessions/.
All onboarding requests require a SIGN-IN-WITH-X header containing a CAIP-122/SIWS wallet ownership proof (Ed25519 signature).
POST /api/sessions/onboard
Start the onboarding process. Creates a Swig smart wallet and initiates delegation role provisioning.
Headers:
Request:
Response:
POST /api/sessions/onboard/confirm
Confirm Swig wallet provisioning after the on-chain transaction is confirmed.
Headers:
Request:
Response:
GET /api/sessions/onboard/status
Check onboarding status for a wallet.
Headers:
Query Parameters:
wallet(required): Buyer wallet addressnetwork(optional): Solana cluster, defaults tomainnet-beta
Response:
Error Codes
| Code | Meaning |
|---|---|
simulation_failed | Transaction simulation failed on Solana |
invalid_transaction | Transaction violates security policy |
blockhash_expired | Blockhash is no longer valid |
session_not_found | Channel ID does not exist |
session_not_open | Session is not in an open state |
insufficient_balance | Buyer wallet balance below required amount |
swig_role_not_found | Buyer does not have an active Swig delegation role |
siwx_invalid | SIWx wallet ownership proof failed verification |
amount_not_monotonic | Voucher cumulative amount is not increasing |
underpayment | Voucher amount below the minimum price per unit |
signer_mismatch | Voucher signed by a different key than previous vouchers in the channel |