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

# Simulate proxy payment request

> Dry-run simulation endpoint that returns payment requirements and fee breakdown without executing payment.

**Fee Model:**
- 3% proxy fee (covers credits charged from account)




## OpenAPI

````yaml post /proxy/sim
openapi: 3.0.0
info:
  title: HTTPayer Proxy API
  version: 1.0.0
  description: >-
    HTTPayer is a payment router for 402 response codes and the x402 Protocol.
    Users can access APIs that use the x402 standard through the HTTPayer proxy.
  contact:
    name: HTTPayer Team
    url: https://httpayer.com
servers:
  - url: https://api.httpayer.com
    description: Production server
security: []
tags:
  - name: Relay
    description: Cross-chain payment relay endpoints
  - name: Account
    description: Account balance and limits endpoints
  - name: Webhooks
    description: Async task status and webhooks
  - name: LLM
    description: OpenAI-powered endpoints for translation and chat
  - name: Health
    description: Health check endpoints
paths:
  /proxy/sim:
    post:
      tags:
        - Proxy
      summary: Simulate proxy payment request
      description: >
        Dry-run simulation endpoint that returns payment requirements and fee
        breakdown without executing payment.


        **Fee Model:**

        - 3% proxy fee (covers credits charged from account)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelayRequest'
      responses:
        '200':
          description: Simulation completed successfully
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: No payment required
                    properties:
                      requiresPayment:
                        type: boolean
                        example: false
                      status:
                        type: number
                        example: 200
                      response:
                        type: object
                  - type: object
                    description: Payment required with fee breakdown
                    properties:
                      requiresPayment:
                        type: boolean
                        example: true
                      targetPaymentRequirements:
                        $ref: '#/components/schemas/PaymentRequirements'
                      proxyFeeBreakdown:
                        type: object
                        properties:
                          targetAmount:
                            type: number
                            description: Amount required by target API in USDC
                            example: 0.01
                          proxyFee:
                            type: number
                            description: HTTPayer proxy fee in USDC
                            example: 0.0003
                          totalCreditsCharged:
                            type: number
                            description: >-
                              Total credits that will be charged from account (1
                              credit = 0.001 USDC)
                            example: 10.3
                          proxyFeePercentage:
                            type: number
                            description: Proxy fee percentage
                            example: 3
                          proxyFeeMinUSDC:
                            type: number
                            description: Minimum proxy fee in USDC
                            example: 0
                          feeModel:
                            type: string
                            description: Human-readable fee model description
                            example: 3% with $0 minimum
                          creditsPerUsdc:
                            type: number
                            description: Conversion rate from USDC to credits
                            example: 1000
                      message:
                        type: string
                        example: >-
                          Payment required - this is a dry-run simulation, no
                          payment will be executed and no credits will be
                          charged
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid API key
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RelayRequest:
      type: object
      properties:
        api_url:
          type: string
          description: The target API URL to call via the relay
          example: https://demo.httpayer.com/base-weather
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
          description: HTTP method for the target API
          example: GET
        json:
          type: object
          description: >-
            JSON body — serialized with Content-Type: application/json. Mirrors
            Python requests(json=...).
        data:
          description: >-
            Form-encoded body (object) or raw string body (string). Mirrors
            Python requests(data=...).
          oneOf:
            - type: object
            - type: string
        body:
          type: string
          description: >-
            Pre-serialized body string passed through unchanged — Content-Type
            is NOT set automatically. If you pass an object it will be
            JSON-stringified, but you must set Content-Type: application/json
            via headers yourself. Use json instead for automatic Content-Type
            handling.
        payload:
          type: object
          description: Deprecated alias for json. Use json instead.
        params:
          type: object
          description: Query parameters appended to the target URL
        headers:
          type: object
          description: Custom headers forwarded to the target API
          example:
            X-API-KEY: your-target-api-key
            Authorization: Bearer token123
        auth:
          type: object
          description: >-
            Basic auth shorthand — converted to Authorization: Basic <base64>.
            Mirrors Python requests(auth=(...)).
          properties:
            username:
              type: string
            password:
              type: string
        cookies:
          type: object
          description: >-
            Cookie shorthand — merged into the Cookie header. Mirrors Python
            requests(cookies={...}).
          example:
            session: abc123
        network:
          type: string
          enum:
            - base
            - base-sepolia
            - skale-base
            - skale-base-sepolia
            - solana
            - solana-mainnet-beta
            - solana-devnet
          description: Blockchain network to use for payment
          example: base
      required:
        - api_url
        - method
    PaymentRequirements:
      type: object
      properties:
        scheme:
          type: string
          example: exact
        network:
          type: string
          example: base
        payTo:
          type: string
          description: Recipient address
        asset:
          type: string
          description: Token contract address
        maxAmountRequired:
          type: string
          description: Amount in microUSDC
        resource:
          type: string
          description: Resource URL
        description:
          type: string
        mimeType:
          type: string
          example: application/json
        maxTimeoutSeconds:
          type: number
          example: 180
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          type: string
          description: Additional error details
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````