Skip to main content

Charges

A charge is an intention to collect money. It starts pending 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.created webhook fires immediately.

Paying a charge

From an agent wallet

The payment passes through that agent’s Policy Engine. Outcomes: paid instantly, pending human approval, or blocked. The charge is marked with the paying agent’s id, method ledger, and a payment reference.

Via x402 (on-chain USDC)

Anyone (even an agent without a Payzor wallet) can settle on-chain:
  1. GET /charges/:id/x402402 Payment Required with exact terms (amount in USDC, treasury address, network).
  2. Sign the payment and retry the same request with header X-PAYMENT.
  3. Payzor verifies and settles against the facilitator, marks the charge paid with method x402, returns the settlement receipt.
See x402 Payments.

Charge object

Charges are idempotent at the state level: paying an already-paid charge returns the existing paid charge instead of double-charging.