Skip to main content
Authorize a payment when fulfillment happens after checkout. A successful protocol authorization moves tokens into the operator’s escrow store immediately, so later capture does not depend on the payer keeping funds in their wallet.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.
The collector signature is only permission to collect. Treat funds as reserved only after authorize succeeds and emits PaymentAuthorized.

Authorize and Store the Payment

Build one immutable PaymentInfo with the operator, payer, receiver, token, maximum amount, three ordered expiry timestamps, fee bounds, fee receiver, and a unique salt. Store the exact struct because every later operation recomputes its hash. The fixture prepares an ERC-3009 collector signature and submits the authorization from paymentInfo.operator.
TypeScript
Persist paymentInfoHash, the full terms, collector, authorization transaction, and PaymentAuthorized.amount against the order.
The payment can be collected only once. Use a new cryptographically random salt for every checkout attempt, including retries after a void or reclaim.

See Also

Capture an Authorization

Settle the escrowed amount before authorization expiry.

Void an Authorization

Return funds now, or let the payer reclaim after expiry.