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

# Settle an x402 payment on-chain

> Called after the server has completed its work following a successful
POST /payments/verify. Submits the ERC-3009 authorization to chain.
Moving funds from the agent wallet to the receiving wallet.

Only used for x402. MPP is settled at verification time.




## OpenAPI

````yaml post /payments/settle
openapi: 3.0.0
info:
  title: Prudra API
  version: 1.0.0
  description: |-
    The Infrastructure Layer for Enterprise AI Agents.

    **Base URL:** `https://api.prudra.dev`

    **Authentication:** All endpoints require a Bearer token.
    Pass your API key in the `Authorization` header:
    `Authorization: Bearer prv_live_sk_...`

    Use `prv_test_sk_...` keys for development.
    Test keys accept `PAYMENT_STUB_MODE` payments.
  contact:
    name: Prudra Support
    email: support@prudra.com
    url: https://prudra.com
servers:
  - url: https://api.prudra.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Payments
    description: Payment verification and challenge generation
  - name: Sessions
    description: Multi-step session payment management
  - name: Vaults
    description: Persistent agent workspace storage
  - name: Wallets
    description: Managed wallet provisioning and BYO wallet registration
  - name: Transfers
    description: Token transfers between addresses
  - name: Withdrawals
    description: Fund withdrawals to bank accounts
  - name: Webhooks
    description: Outbound event delivery
  - name: Billing
    description: Usage monitoring and plan management
  - name: Organisation
    description: API key and organisation management
  - name: Account
    description: Account profile and organisation payment logs
  - name: Registry
    description: Pay-walled route registry snapshots
  - name: Chains
    description: Supported chain and token metadata
  - name: Organisation wallet
    description: Legacy Tempo receiving wallet (single wallet per org)
paths:
  /payments/settle:
    post:
      tags:
        - Payments
      summary: Settle an x402 payment on-chain
      description: |
        Called after the server has completed its work following a successful
        POST /payments/verify. Submits the ERC-3009 authorization to chain.
        Moving funds from the agent wallet to the receiving wallet.

        Only used for x402. MPP is settled at verification time.
      operationId: settlePayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - paymentId
                - settlementToken
              properties:
                paymentId:
                  type: string
                  example: pay_abc123
                settlementToken:
                  type: string
                  description: Base64 token returned from POST /payments/verify
      responses:
        '200':
          description: Payment settled on-chain
          content:
            application/json:
              schema:
                type: object
                properties:
                  txHash:
                    type: string
                    example: 0xabc...
                  settledAt:
                    type: string
                    format: date-time
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: Prudra API Key
      description: Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

````