receiveWithAuthorization so the token requires the transaction sender to be the authorized recipient.
Demo
Check and Capture
TypeScript backend
receiveWithAuthorization prevents an unrelated account from front-running capture because msg.sender must equal to. Capture immediately for an auto-settle checkout, or retain the signature until inventory, shipping, or service delivery is ready.
The receipt succeeds, USDC emits
Transfer(payer, merchant, value), and authorizationState(payer, nonce) becomes true.After Capture
Verify the token, payer, recipient, amount, confirmation depth, and replay state before fulfillment.Verify a Payment
Validate the canonical
Transfer log and claim the order once.See Also
Authorize a Payment
Collect and store the buyer’s EIP-3009 signature.
Void an Authorization
Close an authorization that you will not capture.