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

# Get async operation status

> Poll the status of an asynchronous operation. The webhook ID is returned
in the `X-HTTPayer-Webhook` header of the original response.

Two contexts produce webhook IDs:

**Proxy — payment confirmation**
When `/proxy` returns 502 (upstream refused payment), a webhook is created
to track whether the payment eventually confirmed on-chain. On success,
`status` is `success` and `txHash` is the on-chain payment proof.

**Relay — refund tracking**
When a relay payment cannot be settled or the target API never charges,
a webhook tracks the refund. Terminal statuses are `refund_confirmed`,
`success_refunded`, or `no_refund_needed`.

Poll until you receive HTTP 200 or 500. HTTP 202 means still in progress.




## OpenAPI

````yaml get /webhooks/{id}
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:
  /webhooks/{id}:
    get:
      tags:
        - Webhooks
      summary: Get async operation status
      description: >
        Poll the status of an asynchronous operation. The webhook ID is returned

        in the `X-HTTPayer-Webhook` header of the original response.


        Two contexts produce webhook IDs:


        **Proxy — payment confirmation**

        When `/proxy` returns 502 (upstream refused payment), a webhook is
        created

        to track whether the payment eventually confirmed on-chain. On success,

        `status` is `success` and `txHash` is the on-chain payment proof.


        **Relay — refund tracking**

        When a relay payment cannot be settled or the target API never charges,

        a webhook tracks the refund. Terminal statuses are `refund_confirmed`,

        `success_refunded`, or `no_refund_needed`.


        Poll until you receive HTTP 200 or 500. HTTP 202 means still in
        progress.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: Webhook ID (UUID from X-HTTPayer-Webhook header)
          example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - success
                      - refund_confirmed
                      - success_refunded
                      - no_refund_needed
                    description: >
                      `success` — proxy payment confirmed on-chain (payment
                      proof in txHash).

                      `refund_confirmed` — refund transaction confirmed
                      on-chain.

                      `success_refunded` — relay succeeded but target did not
                      charge; refund issued.

                      `no_refund_needed` — target charged HTTPayer within the
                      auth window.
                  txHash:
                    type: string
                    description: >
                      Proxy: on-chain payment transaction hash (proof of
                      payment).

                      Relay: on-chain refund transaction hash.
                  network:
                    type: string
                    description: Network the transaction was confirmed on.
                  method:
                    type: string
                    description: >-
                      Relay only — how the refund was executed: facilitator or
                      direct.
                  relayTxId:
                    type: number
                    description: Relay only — internal relay transaction ID.
                  facilitatorUrl:
                    type: string
                    description: >-
                      Relay only — facilitator used for the refund, if
                      applicable.
                  message:
                    type: string
                    description: Human-readable description of the outcome.
        '202':
          description: Operation still in progress — continue polling
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    example: pending
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  status:
                    type: string
                    example: failed
                  error:
                    type: string
                  errorType:
                    type: string
                  relayTxId:
                    type: number
                    description: Relay only — relay transaction ID for manual support.
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          type: string
          description: Additional error details

````