Skip to main content
Request an immediate payment with the Commerce Payments Protocol 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.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.
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.