How external wallet payments work
- The buyer approves the router to spend the checkout’s USDC amount.
- The buyer calls
pay()with the session ID, seller address, and amount. - The router transfers USDC and emits
CheckoutPayment. - Locus marks the session as paid and sends the merchant a webhook.
Contract addresses
The router is not deployed on Base Sepolia. USDC on Base Sepolia uses
0x036CbD53842c5426634e7929541eC2318f3dCF7e (chain 84532).
Verify on BaseScan
Open the Payment Router on BaseScan.- Events shows
CheckoutPaymentrecords with the session, buyer, seller, and amount. - Read Contract lets you call
sessionPaid(bytes32)to check a specific session. - Contract contains the verified source and ABI for direct integrations.
Contract interface
Usepay(bytes32 sessionId, address recipient, uint256 amount) for the standard payment flow. payWithPermit supports an EIP-2612 permit to combine approval and payment.
The contract exposes sessionPaid(bytes32) and usdc() for verification. Read the verified contract for the complete interface.
Session ID encoding
Remove the UUID’s dashes, left-align its hex value, and zero-pad it to 32 bytes:USDC amounts
USDC uses six decimals. A payment of 25.00 USDC is25000000 base units.