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

# Verify a payment credential

> Verifies an x402 or MPP payment credential in the request body.
Creates a Payment record on success. For x402, returns a settlementToken for use
with POST /payments/settle after work is completed.




## OpenAPI

````yaml post /payments/verify
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/verify:
    post:
      tags:
        - Payments
      summary: Verify a payment credential
      description: >
        Verifies an x402 or MPP payment credential in the request body.

        Creates a Payment record on success. For x402, returns a settlementToken
        for use

        with POST /payments/settle after work is completed.
      operationId: verifyPayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - protocol
                - credential
                - price
                - walletId
                - resource
              properties:
                protocol:
                  type: string
                  enum:
                    - x402
                    - mpp
                credential:
                  type: string
                  description: Raw payment credential (x402 X-PAYMENT payload or MPP proof)
                price:
                  type: string
                  example: '0.01'
                currency:
                  type: string
                  default: USD
                walletId:
                  type: string
                  example: byw_abc123
                resource:
                  type: string
                  example: /analyse
                description:
                  type: string
                network:
                  type: string
                  example: eip155:8453
      responses:
        '200':
          description: Payment verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentVerifyResponse'
        '402':
          description: Payment verification failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '409':
          description: Replay detected (duplicate transaction)
        '422':
          description: Wallet not found
        '429':
          description: Payment plan limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitError'
components:
  schemas:
    PaymentVerifyResponse:
      type: object
      properties:
        valid:
          type: boolean
        paymentId:
          type: string
          example: pay_abc123
        txHash:
          type: string
          example: 0xabc...
        amount:
          type: string
          example: '0.01'
        coin:
          type: string
          example: USDC
        protocol:
          type: string
          enum:
            - x402
            - mpp
        settledAt:
          type: string
          format: date-time
        settlementPending:
          type: boolean
        settlementToken:
          type: string
          nullable: true
      required:
        - valid
    ProblemDetail:
      type: object
      description: RFC 9457 problem detail response
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
      required:
        - type
        - title
        - status
        - detail
    LimitError:
      type: object
      properties:
        type:
          type: string
          example: https://api.prudra.dev/problems/payment-limit-reached
        title:
          type: string
          example: Plan Limit Reached
        status:
          type: integer
          example: 429
        detail:
          type: string
          example: Your plan includes 100 payments per month. You have used 100.
        limit:
          type: integer
          example: 100
        current:
          type: integer
          example: 100
        upgradeUrl:
          type: string
          example: https://dashboard.prudra.com/settings/billing
      required:
        - type
        - title
        - status
        - detail
        - limit
        - current
        - upgradeUrl
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: Prudra API Key
      description: Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

````