> ## 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.

# Settle an x402 payment

> Settles an x402 payment by submitting the EIP-3009 authorization.
The authorization will be verified, the sender's balance locked, and
the transaction queued for batch processing.




## OpenAPI

````yaml openapi/gateway.yaml post /v1/x402/settle
openapi: 3.0.3
info:
  title: Circle Gateway
  version: 1.0.0
  description: >
    Circle Gateway allows you to create a chain-abstracted USDC balance and
    transfer it instantly to any supported destination chain.
servers:
  - url: https://gateway-api-testnet.circle.com
  - url: https://gateway-api.circle.com
security: []
tags:
  - name: Gateway
    description: >-
      Endpoints for getting a unified USDC balance and creating attestations for
      transfer
  - name: Gateway Batch
    description: Endpoints for batch processing of EIP-3009 authorizations
  - name: Gateway x402
    description: Endpoints for x402 payment protocol integration
  - name: Webhook Subscriptions
    description: Manage webhook subscriptions for Gateway event notifications.
paths:
  /v1/x402/settle:
    post:
      tags:
        - Gateway x402
      summary: Settle an x402 payment
      description: |
        Settles an x402 payment by submitting the EIP-3009 authorization.
        The authorization will be verified, the sender's balance locked, and
        the transaction queued for batch processing.
      operationId: SettleX402Payment
      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: Settlement result. Check the success field for outcome.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - transaction
                  - network
                properties:
                  success:
                    type: boolean
                    description: Whether the settlement was successful.
                  errorReason:
                    type: string
                    description: Error code. Present when success is false.
                    enum:
                      - unsupported_scheme
                      - unsupported_network
                      - unsupported_asset
                      - invalid_payload
                      - address_mismatch
                      - amount_mismatch
                      - invalid_signature
                      - authorization_not_yet_valid
                      - authorization_expired
                      - authorization_validity_too_short
                      - self_transfer
                      - insufficient_balance
                      - nonce_already_used
                      - unsupported_domain
                      - wallet_not_found
                  payer:
                    type: string
                    description: >-
                      The sender address (present on success or when
                      identifiable).
                  transaction:
                    type: string
                    description: Transaction UUID on success, empty string on failure.
                  network:
                    type: string
                    description: CAIP-2 network identifier.
        '400':
          description: Invalid or malformed request body
        '500':
          description: Unexpected infrastructure error
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - errorReason
                  - transaction
                  - network
                properties:
                  success:
                    type: boolean
                    example: false
                  errorReason:
                    type: string
                    example: unexpected_error
                  transaction:
                    type: string
                    example: ''
                  network:
                    type: string
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

````