> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circle.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Before reading these docs, install the relevant Circle Skill to get pre-loaded context — skills are LLM-optimized and cover architecture decisions, correct flows, and common pitfalls. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills. Available skills: use-usdc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md (balances, transfers, approvals on EVM and Solana); EURC has no skill — see https://developers.circle.com/stablecoins/what-is-eurc.md; bridge-stablecoin https://github.com/circlefin/skills/blob/master/plugins/circle/skills/bridge-stablecoin/SKILL.md (crosschain transfers via CCTP, USDC, EURC, and third-party assets); use-arc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md (Arc chain config, contract deployment, USDC bridging — Arc docs: https://docs.arc.io/llms.txt); use-circle-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md (choose wallet type); use-developer-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md (custodial wallets for payouts and treasury); use-user-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md (embedded wallets with Web2 login); use-modular-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md (smart contract wallets with passkeys and ERC-4337); use-gateway https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md (unified USDC balance, nanopayments); use-smart-contract-platform https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md (deploy, interact, monitor contracts). Pair any skill with the Circle MCP server for live SDK signatures, contract addresses, and chain IDs: {"mcpServers":{"circle":{"url":"https://api.circle.com/v1/codegen/mcp"}}}.
> Read the product overview first. Each product has an overview explaining when and why to use it. Read it before quickstarts.
> Pick the right wallet type. Developer-controlled (you hold keys), user-controlled (end user holds keys via PIN/social login), or modular (smart contract wallets with passkeys). See https://developers.circle.com/wallets.md.
> Use CCTP V2 for crosschain transfers. CCTP natively transfers USDC and EURC via burn-and-mint, and supports permissionless wrapping of third-party assets via lock-and-mint. V1 is legacy; always use V2 unless V1 is specified or the chain requires it (Noble, Sui, and Aptos still require V1). Migration guide: https://developers.circle.com/cctp/migration-from-v1-to-v2.md.
> Use Bridge Kit for frontend bridging. Wraps CCTP with a simpler SDK for user-facing apps. Use CCTP directly for backend transfers.
> Gas Station vs Paymaster. Gas Station sponsors gas for Circle Wallet transactions. Paymaster lets users pay gas in USDC. Different use cases — read both overviews.
> Gateway Nanopayments for sub-cent payments. Gasless USDC micropayments down to $0.000001 via x402 and batched settlement. For pay-per-request APIs, AI agent payments, streaming.
> Look up USDC addresses per chain. Never hardcode — use https://developers.circle.com/stablecoins/usdc-contract-addresses.md.
> Prefer SDKs over raw API calls. Node.js and Python SDKs handle auth, retries, and errors.
> API key required. Bearer token in Authorization header. Testnet and mainnet use separate keys and may use different base URLs depending on the product.
> Set up webhooks when available. Most operations are async. Webhooks deliver transaction confirmations and state changes.
> When calling list endpoints, paginate using pageSize and pageAfter until no nextPageAfter cursor is returned—stopping at the first page silently misses records.
> Building an AI agent? Start with the Agent Stack—Circle CLI, agent wallets, and nanopayments built for autonomous use cases: https://developers.circle.com/agent-stack.md.

# Verify an x402 payment payload

> Verifies that an x402 payment payload can be processed by running
all read-only validation checks (scheme, network, token, signature,
temporal constraints, address/amount matching). A valid result does
not guarantee settlement — balance and nonce checks only happen at
settle time.




## OpenAPI

````yaml openapi/gateway-nanopayments.yaml post /v1/x402/verify
openapi: 3.0.3
info:
  title: Gateway Nanopayments
  version: 1.0.0
  description: >
    Gateway Nanopayments settles gasless USDC payments for the x402 protocol
    using Circle Gateway's batched settlement infrastructure. Sellers verify
    buyer authorizations and settle net positions in bulk onchain.
servers:
  - url: https://gateway-api-testnet.circle.com
  - url: https://gateway-api.circle.com
security: []
tags:
  - name: Settlement
    description: >-
      Verify buyer-signed x402 authorizations and submit them for batched
      settlement through Circle Gateway.
  - name: Batched transfers
    description: >-
      Query the batched USDC transfers Gateway settles from accepted x402
      authorizations.
  - name: Supported payment kinds
    description: Discover the x402 payment schemes and networks this facilitator supports.
paths:
  /v1/x402/verify:
    post:
      tags:
        - Settlement
      summary: Verify an x402 payment payload
      description: |
        Verifies that an x402 payment payload can be processed by running
        all read-only validation checks (scheme, network, token, signature,
        temporal constraints, address/amount matching). A valid result does
        not guarantee settlement — balance and nonce checks only happen at
        settle time.
      operationId: VerifyX402Payment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentPayload:
                  $ref: '#/components/schemas/PaymentPayload'
                paymentRequirements:
                  $ref: '#/components/schemas/PaymentRequirements'
              required:
                - paymentPayload
                - paymentRequirements
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                type: object
                properties:
                  isValid:
                    type: boolean
                    description: Whether the payment payload passed all validation checks.
                  invalidReason:
                    type: string
                    description: >-
                      Reason for validation failure. Present when isValid is
                      false.
                  payer:
                    type: string
                    description: The payer address extracted from the payment payload.
        '400':
          description: Invalid or malformed request body
components:
  schemas:
    PaymentPayload:
      type: object
      description: x402 payment payload containing the payment authorization and metadata.
      properties:
        x402Version:
          type: integer
          description: Version of the x402 protocol.
          example: 1
        resource:
          $ref: '#/components/schemas/ResourceInfo'
          description: Information about the resource being paid for.
        accepted:
          $ref: '#/components/schemas/PaymentRequirements'
          description: The payment requirements that were accepted by the client.
        payload:
          type: object
          description: Scheme-specific payment data (e.g., EIP-3009 authorization).
          additionalProperties: true
        extensions:
          type: object
          description: Optional protocol extensions.
          additionalProperties: true
      required:
        - x402Version
        - accepted
        - payload
    PaymentRequirements:
      type: object
      description: Defines an acceptable way to pay for a resource using the x402 protocol.
      properties:
        scheme:
          type: string
          description: Payment scheme identifier (e.g., "exact").
          example: exact
        network:
          type: string
          description: Network identifier (e.g., "base-sepolia", "base").
          example: base-sepolia
        asset:
          type: string
          description: Token contract address or symbol.
          example: '0x036CbD53842c5426634e7929541eC2318f3dCF7e'
        amount:
          type: string
          description: >-
            Payment amount in atomic units (e.g., wei). For USDC, 1000000 = 1
            USDC.
          example: '1000000'
        payTo:
          type: string
          description: Address to receive the payment.
          example: '0x1234567890abcdef1234567890abcdef12345678'
        maxTimeoutSeconds:
          type: integer
          description: Maximum time in seconds for the payment to be valid.
          example: 3600
        extra:
          type: object
          description: Scheme-specific additional parameters.
          additionalProperties: true
      required:
        - scheme
        - network
        - asset
        - amount
        - payTo
        - maxTimeoutSeconds
    ResourceInfo:
      type: object
      description: Information about the resource being paid for in an x402 payment.
      properties:
        url:
          type: string
          description: URL of the resource.
        description:
          type: string
          description: Human-readable description of the resource.
        mimeType:
          type: string
          description: Expected MIME type of the response.
      required:
        - url

````