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

# Get Request Trace

> Useful for debugging: returns a structured trace (events, webhook pushes, DB ops) for the given X-Request-Id generated by the gateway.



## OpenAPI

````yaml GET /observability/request/{request_id}
openapi: 3.1.0
info:
  title: Xerobi Payment API
  version: '2026-01-01'
  description: >-
    A developer-first REST API for a modern payment gateway. Focused on
    predictable semantics, idempotency, clear errors, and observability. Use
    `Authorization: Bearer <sk_...>` for requests. All amounts are smallest
    currency unit (e.g. paisa for BDT).
  termsOfService: https://api.hixbe.com/terms
  contact:
    name: Xerobi Developer Support
    url: https://developer.hixbe.com
    email: support@xerobi.com
  license:
    name: Proprietary
    url: https://hixbe.com/license
servers:
  - url: https://sandbox.api.hixbe.com/payment
    description: Sandbox (test)
  - url: https://api.hixbe.com/payment
    description: Production
security:
  - bearerAuth: []
tags:
  - name: PaymentIntents
    description: Orchestrate payments (recommended pattern)
  - name: PaymentMethods
    description: Create and manage payment methods / tokens
  - name: Customers
    description: Customer objects and stored methods
  - name: Refunds
    description: Issue partial/full refunds
  - name: Webhooks
    description: Register webhook endpoints and view events
  - name: Observability
    description: Request debugging and headers
externalDocs:
  description: Developer guides & examples
  url: https://developer.hixbe.com/docs
paths:
  /observability/request/{request_id}:
    get:
      tags:
        - Observability
      summary: Fetch logs/trace for a request_id
      description: >-
        Useful for debugging: returns a structured trace (events, webhook
        pushes, DB ops) for the given X-Request-Id generated by the gateway.
      operationId: getRequestTrace
      parameters:
        - $ref: '#/components/parameters/Xerobi-Version'
        - name: request_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Trace object
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                  events:
                    type: array
                    items:
                      type: object
                  logs:
                    type: array
                    items:
                      type: string
        '404':
          $ref: '#/components/responses/GenericError'
components:
  parameters:
    Xerobi-Version:
      name: Xerobi-Version
      in: header
      description: API version header. Use '2026-01-01' for the latest version.
      required: true
      schema:
        type: string
        default: '2026-01-01'
  responses:
    GenericError:
      description: Standard error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: >-
                category (invalid_request, auth_error, processing_error,
                rate_limit, internal_error)
            code:
              type: string
              description: machine-friendly error code
            message:
              type: string
              description: human-friendly message
            param:
              type: string
              nullable: true
              description: request parameter related to the error, if any
            request_id:
              type: string
              description: gateway generated request id for debugging
          required:
            - type
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Use your secret API key. Example: `Authorization: Bearer sk_test_xxx`'

````

## Related topics

- [Get usage report](https://docs.xerobi.com/sms-api/endpoint/get-usage-report.md)
- [Get Delta Notification](https://docs.xerobi.com/rpki-api/endpoint/get-delta-notify.md)
- [Get webhook details](https://docs.xerobi.com/sms-api/endpoint/get-webhook.md)
- [Get message details](https://docs.xerobi.com/sms-api/endpoint/get-message.md)
- [Get Account Balance](https://docs.xerobi.com/sms-api/endpoint/get-balance.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.