POST /settle

Verifies and settles a payment on MegaETH. Executes the USDM transfer on-chain.

Request

POST /api/facilitator/settle
Content-Type: application/json

{
  "paymentPayload": { ... },
  "paymentRequirements": { ... }
}

Same schema as /verify.

Response (Success)

{
  "success": true,
  "txHash": "0x8f3a1b2c...",
  "blockNumber": 12345678
}

Response (Failure)

{
  "success": false,
  "error": "Insufficient USDM balance"
}

Settlement Process

  1. Calls /verify internally first
  2. Submits Permit2 transaction to MegaETH
  3. Waits for block confirmation (~10ms)
  4. Records transaction in database
  5. Returns transaction hash and block number