POST /api/x402/settle executes the on-chain USDC transfer after your handler has served the response. The withPayment() middleware calls this automatically in the background.
When it’s called
Settle runs after your handler returns, so the client receives your data immediately without waiting for blockchain confirmation.What it does
- Decodes the payment payload
- Calls
transferWithAuthorizationon the Arc USDC contract - Waits for confirmation
- Returns the transaction hash
Response
The settle call is fire-and-forget from your API’s perspective. If it fails, the payload is still valid and can be retried. Nonces prevent double-spending.

