Skip to main content
Capture less than the authorized amount when the final total changes after checkout, or capture multiple increments as an order ships. Commerce Payments Protocol tracks the remaining reservation onchain without a custom checkout contract.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Capture the Final Amount

Call the same capture function for every increment. The sum of successful captures cannot exceed PaymentAuthorized.amount, and each capture independently validates its fee bounds.
TypeScript
For a 100 USDC authorization, a 64 USDC capture leaves 36 USDC capturable and makes 64 USDC refundable. You can capture another increment or void the remainder.
After every capture, reconcile PaymentCaptured.amount with the new capturableAmount and refundableAmount before another worker advances the order.
Fee bounds are evaluated per capture and use integer division. With low-decimal tokens, fragmenting one settlement into many small captures can reduce the aggregate minimum fee. Enforce a minimum capture size offchain when that matters.

See Also

Capture an Authorization

Review the capture deadline, fee, and state transition.

Void an Authorization

Return the unneeded remainder to the payer.