Charges
A charge is an intention to collect money. It startspending and becomes paid when someone settles it.
Creating a charge
amountUsdCents: integer, always cents.200= $2.00.externalId: your own order/invoice id, echoed back so you can reconcile.- A
charge.createdwebhook fires immediately.
Paying a charge
From an agent wallet
ledger, and a payment reference.
Via x402 (on-chain USDC)
Anyone (even an agent without a Payzor wallet) can settle on-chain:GET /charges/:id/x402→402 Payment Requiredwith exact terms (amount in USDC, treasury address, network).- Sign the payment and retry the same request with header
X-PAYMENT. - Payzor verifies and settles against the facilitator, marks the charge paid with method
x402, returns the settlement receipt.
Charge object
Charges are idempotent at the state level: paying an already-paid charge returns the existing paid charge instead of double-charging.