---
title: "Settle an x402 payment on-chain"
method: POST
path: "/x402/settle"
tags: ["x402 Core"]
---

# Settle an x402 payment on-chain

`POST /x402/settle`

## Request

- Base URL: `https://x402-agent-pay.com`
- URL: `https://x402-agent-pay.com/x402/settle`
- Auth: none declared

Submit and settle a USDC payment via EIP-3009 transferWithAuthorization on Base L2. This is the full settlement call — verifies the grant and executes on-chain in one step.

## Request body

- SettleRequest
  - `payment_header` string, required: Base64-encoded EIP-712 signed grant
  - `resource` string
  - `partner_id` string: Optional — routes revenue share to a provider

## Response `200`

Settlement confirmed

- SettleResponse
  - `payment_id` string
  - `tx_hash` string: Base L2 transaction hash
  - `amount_usdc` number
  - `settled_at` string, date-time

## Other responses

- `400`: Invalid payment data
- `402`: Payment Required — attach X-PAYMENT header with EIP-712 signed USDC grant

---

[API](https://skmtc.dev/x402-agent-pay/apis/agentpay-x402-facilitator-api.md) · [All operations](https://skmtc.dev/x402-agent-pay/apis/agentpay-x402-facilitator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/x402-agent-pay/apis/agentpay-x402-facilitator-api/revisions/33ece6814ac9?raw)
