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

# Settle a verified payment



## OpenAPI

````yaml /openapi.json post /settle
openapi: 3.1.0
info:
  title: openx402 Facilitator API
  version: 0.1.0
  description: >-
    HTTP, Bazaar discovery, analytics, and facilitator endpoints for openx402 on
    Stellar. This production API playground targets the public hosted testnet
    facilitator. Self-hosted operators can copy this specification and replace
    the server URL.
servers:
  - url: https://facilitator-production-8430.up.railway.app
    description: Hosted Stellar testnet preview
security: []
tags:
  - name: Health
    description: Liveness and readiness checks.
  - name: Facilitator
    description: x402 verification, settlement, and supported capabilities.
  - name: Bazaar discovery
    description: Public catalog browsing and ranked search.
  - name: Analytics
    description: Operator analytics. Fields and access depend on deployment configuration.
paths:
  /settle:
    post:
      tags:
        - Facilitator
      summary: Settle a verified payment
      operationId: settlePayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentEnvelope'
      responses:
        '200':
          description: Settlement result with transaction hash on success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettleResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Conflicting payment identifier.
      security:
        - bearerAuth: []
        - {}
components:
  schemas:
    PaymentEnvelope:
      type: object
      required:
        - x402Version
        - paymentPayload
        - paymentRequirements
      properties:
        x402Version:
          type: integer
          example: 2
        paymentPayload:
          $ref: '#/components/schemas/FreeformObject'
        paymentRequirements:
          $ref: '#/components/schemas/FreeformObject'
    SettleResponse:
      type: object
      required:
        - success
        - transaction
        - network
      properties:
        success:
          type: boolean
        transaction:
          type: string
        network:
          type: string
        payer:
          type: string
        amount:
          type: string
        errorReason:
          type:
            - string
            - 'null'
      additionalProperties: true
    FreeformObject:
      type: object
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: string
      additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request or filter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: A configured bearer key was missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Optional on keyless testnet profiles. Required when the operator
        configures FACILITATOR_API_KEYS and on pubnet.

````