Skip to main content
Request an immediate payment with the charge operation. The payer approves the payment terms and token collection, then your operator collects, settles, and records the amount as refundable in one transaction.
This guide’s payment flow is based on the Commerce Payments Protocol.

Demo

The demo above sends real transactions on Base Vibenet, an ephemeral devnet, each time you press a step. It mints Vibenet’s existing USDV test token, not USDC, to your demo account, which acts as both payer and operator. If Vibenet is unavailable, the demo runs as a labeled offline mock and sends nothing.
These examples use the v1.1.0 AuthCaptureEscrow at 0xf96815976523E00e65Be8f34cA5e64b4f41EB19c. The same CREATE2 address is deployed on Base and Base Sepolia.

Charge and Verify the Payment

The complete fixture creates a unique PaymentInfo, derives its payer-agnostic hash, and asks the payer to sign an ERC-3009 ReceiveWithAuthorization for the deployed collector. The operator then submits charge. B20 and other ERC-20 tokens can use Permit2 or the pre-approval collector when their transfer policies allow the collector, operator token store, receiver, and fee receiver to participate.
TypeScript
The protocol sends amount - feeAmount to paymentInfo.receiver, sends the fee separately, and increases refundableAmount by the full charged amount.
Confirm PaymentCharged, match its paymentInfoHash to the order, and atomically claim the event before fulfillment.
A payer signature is not settlement. Only a successful charge receipt proves that collection and distribution completed. Keep maxFeeBps narrow and fix feeReceiver unless your operator needs to replace a denylisted recipient.

See Also

Authorize a Payment

Reserve funds in escrow and capture after fulfillment.

Verify a Payment

Confirm protocol events before you fulfill.