Settle x402 payment
x402 Payments
Settle x402 Payment
Settle an x402 payment with organization-specific authentication
POST
Settle x402 payment
Settle an x402 payment on-chain after verification. This endpoint executes the actual blockchain transaction to transfer funds according to the x402 payment authorization.Documentation Index
Fetch the complete documentation index at: https://docs.mrdn.finance/llms.txt
Use this file to discover all available pages before exploring further.
When
paymentRequirements.extra.name === "GatewayWalletBatched", this
endpoint forwards the request to Circle’s Gateway API instead of settling
on-chain. See Circle Gateway
(Batched) for the batched
payment type and Payment Types for an
overview of all routing paths.Authentication
Requires API key authentication with organization context.Recipient
The recipient wallet that receives settled funds is configured in your organization settings and tied to your API key. You do not need to specify the recipient in the request body.Request Body
authorization.to and payTo must be set to the facilitator contract address for the network.
For MegaETH, the recommended flow is now Permit2, not the forwarder. New
integrations should keep
payTo pointed at the facilitator, set
paymentRequirements.asset to the ERC-20 token address, approve Permit2
0x000000000022D473030F116dDEE9F6B43aC78BA3, and sign with
x402ExactPermit2Proxy 0x402085c248EeA27D92E8b30b2C58ed07f9E20001. Your
backend should still call Meridian POST /v1/settle. The USDm forwarder is
deprecated and should be kept only for legacy EIP-3009 clients.On BSC, Meridian supports USDC through the same EIP3009Forwarder adapter
pattern used by the legacy MegaETH USDm path. Buyers approve the BSC forwarder
0x2c2d8EF0664432BA243deF0b8f60aF7aB43a60B4 once, sign against the forwarder
domain, and keep authorization.to and payTo pointed at the facilitator.
Your backend still calls Meridian POST /v1/settle.| Network | Facilitator Contract |
|---|---|
arc-testnet | 0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A |
base | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
bsc | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
base-sepolia | 0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A |
avalanche | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
optimism | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
optimism-sepolia | 0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A |
polygon | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
unichain | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
ink | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
worldchain | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
sei | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
hyperevm | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
megaeth | 0x8E7769D440b3460b92159Dd9C6D17302b036e2d6 |
Response
Success Response
Error Response
Error Codes
invalid_payload- Payment payload format is invalidinvalid_payment_requirements- Payment requirements format is invalidinsufficient_funds- Insufficient balance for settlementunexpected_settle_error- Unhandled exception during settlementinvalid_transaction_state- On-chain transaction failed