x402 Agent Pay x402 Core API

Core x402 payment verification and settlement

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

POST /x402/verify Verify an x402 payment grant #
POST /x402/settle Settle an x402 payment on-chain #
POST /pay Submit x402 payment (alias) #
GET /status/{payment_id} Check payment status #
POST /facilitator/mcp Streamable HTTP MCP endpoint for facilitator verify/settle tools #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/x402-agent-pay-com:x402-agent-pay-com-x402-core-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

x402-agent-pay-com-x402-core-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AgentPay x402 Facilitator x402 Core API
  description: 'AgentPay is a production x402 payment facilitator on Base L2. Verify EIP-712 grants, settle USDC micropayments, create escrows, and register as a provider — all over standard HTTP. Built for autonomous AI agents. No API keys, no accounts, just USDC on Base.


    **Treasury:** `0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03`

    **Network:** Base Mainnet (eip155:8453)

    **Fee:** 0.5% of each netted payout batch (50 bps), minimum $0.005 per batch ($0.001 under $0.01 gross, $0.01 from $1.00), never charged per settlement

    **Settlement time:** <2 seconds average'
  version: 2.1.1
  contact:
    name: AgentPay Team
    url: https://x402-agent-pay.com
    email: support@x402-agent-pay.com
  license:
    name: MIT
  x-logo:
    url: https://x402-agent-pay.com/logo.png
  x-guidance: 'AgentPay is an x402 payment facilitator on Base L2. To settle a payment: POST /x402/settle with an EIP-712 signed payment header. To create escrow: POST /escrow. To register as a provider or agent: POST /api/agentpay/register — returns api_key instantly, no email needed. Free endpoints: /health, /x402/stats, /x402/info, /x402/verify, /.well-known/x402, /api/agentpay/ecosystem. All settlements are USDC on Base Mainnet (eip155:8453). Fee: 0.5% of each netted payout batch, minimum $0.005 per batch, never per settlement. Live MCP Streamable HTTP is POST https://x402-agent-pay.com/facilitator/mcp (tools: x402_facilitator_verify, x402_facilitator_settle). GET /.well-known/mcp.json is discovery only, not a live MCP session. GET /mcp remains the OpenAPI-derived discovery document.'
servers:
- url: https://x402-agent-pay.com
  description: Production — Base L2 Mainnet
tags:
- name: x402 Core
  description: Core x402 payment verification and settlement
paths:
  /x402/verify:
    post:
      tags:
      - x402 Core
      summary: Verify an x402 payment grant
      description: Verify an incoming EIP-712 signed x402 payment grant. Returns whether the payment is valid and sufficient for the requested resource. Free to call.
      operationId: verifyPayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyRequest'
            example:
              payment_header: eyJ0eXAiOiJ4NDAyIiwiYWxnIjoiRUlQNzEyIn0...
              resource: https://api.example.com/data
              required_amount: '1000'
      responses:
        '200':
          description: Payment is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyResponse'
        '400':
          description: Invalid or insufficient payment
  /x402/settle:
    post:
      tags:
      - x402 Core
      summary: Settle an x402 payment on-chain
      description: 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.
      operationId: settlePayment
      x-payment-required:
        scheme: exact
        network: eip155:8453
        maxAmountRequired: '20000'
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettleRequest'
      responses:
        '200':
          description: Settlement confirmed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettleResponse'
        '402':
          description: Payment Required — attach X-PAYMENT header with EIP-712 signed USDC grant
        '400':
          description: Invalid payment data
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.020000'
        protocols:
        - x402: {}
  /pay:
    post:
      tags:
      - x402 Core
      summary: Submit x402 payment (alias)
      description: Alias for /x402/settle. Accepts a signed x402 payment header and settles USDC on Base L2.
      operationId: submitPayment
      x-payment-required:
        scheme: exact
        network: eip155:8453
        maxAmountRequired: '20000'
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayRequest'
      responses:
        '200':
          description: Payment settled
        '402':
          description: Payment Required — attach X-PAYMENT header with EIP-712 signed USDC grant
        '400':
          description: Invalid payment
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.020000'
        protocols:
        - x402: {}
  /status/{payment_id}:
    get:
      tags:
      - x402 Core
      summary: Check payment status
      description: Look up the on-chain settlement status of any payment by ID.
      operationId: getPaymentStatus
      parameters:
      - name: payment_id
        in: path
        required: true
        schema:
          type: string
        description: Payment ID returned by /pay or /x402/settle
      responses:
        '200':
          description: Payment status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatus'
        '404':
          description: Payment not found
        '402':
          description: Payment Required — attach X-PAYMENT header with EIP-712 signed USDC grant
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.020000'
        protocols:
        - x402: {}
  /facilitator/mcp:
    post:
      tags:
      - x402 Core
      summary: Streamable HTTP MCP endpoint for facilitator verify/settle tools
      description: Live MCP transport (FastMCP Streamable HTTP, JSON responses, stateless). Call MCP initialize, notifications/initialized, tools/list and tools/call here. Tools x402_facilitator_verify and x402_facilitator_settle forward to the existing localhost /verify and /settle implementation. This is not GET /mcp (OpenAPI discovery JSON) and not /.well-known/mcp.json (static discovery document).
      operationId: facilitatorMcp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: MCP JSON-RPC message
      responses:
        '200':
          description: MCP JSON-RPC response or SSE stream
        '400':
          description: Malformed MCP request
        '403':
          description: Forbidden Origin
        '421':
          description: Misdirected Request (Host header rejected)
components:
  schemas:
    PayRequest:
      type: object
      properties:
        payment_header:
          type: string
        resource:
          type: string
        partner_id:
          type: string
      required:
      - payment_header
    SettleResponse:
      type: object
      properties:
        payment_id:
          type: string
        tx_hash:
          type: string
          description: Base L2 transaction hash
        amount_usdc:
          type: number
        settled_at:
          type: string
          format: date-time
    VerifyResponse:
      type: object
      properties:
        valid:
          type: boolean
        amount:
          type: string
        payer:
          type: string
        message:
          type: string
    VerifyRequest:
      type: object
      properties:
        payment_header:
          type: string
          description: Base64-encoded x402 payment header (EIP-712 signed)
        resource:
          type: string
          description: URL of the resource being paid for
        required_amount:
          type: string
          description: Required amount in USDC atomic units (6 decimals)
      required:
      - payment_header
      - resource
    PaymentStatus:
      type: object
      properties:
        payment_id:
          type: string
        status:
          type: string
          enum:
          - pending
          - confirmed
          - failed
        tx_hash:
          type: string
        amount_usdc:
          type: number
        settled_at:
          type: string
          format: date-time
    SettleRequest:
      type: object
      properties:
        payment_header:
          type: string
          description: Base64-encoded EIP-712 signed grant
        resource:
          type: string
        partner_id:
          type: string
          description: Optional — routes revenue share to a provider
      required:
      - payment_header
x-agentpay:
  facilitator: https://x402-agent-pay.com
  network: eip155:8453
  asset: USDC
  asset_contract: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
  treasury: '0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03'
  fee_per_settlement: '0.00'
  fee_bps: 50
  fee_min_per_batch_usdc: '0.005'
  fee_assessed: per netted payout batch
  fee_min_per_batch_tiers:
    batch_under_0_01_usdc: '0.001'
    batch_0_01_to_1_usdc: '0.005'
    batch_from_1_usdc: '0.01'
  settlement_time_avg: 1.8s
  github: https://github.com/shawnhvac/x402
  discovery: https://x402-agent-pay.com/.well-known/x402
x-discovery:
  ownershipProofs:
  - '0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03'
  facilitatorUrl: https://x402-agent-pay.com
  network: eip155:8453