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

# Fetch PG Payments

> Fetch all payments for a subscription directly from the payment gateway.

Fetch all payments for a subscription directly from the payment gateway.

<Warning>This endpoint is not available in production.</Warning>

### Path Parameters

<ParamField path="subscription_id" type="string" required>
  The unique identifier (uid) of the subscription.
</ParamField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "message": "PG payments fetched successfully",
    "data": [
      {
        "payment_id": "pay_abc123",
        "status": "SUCCESS"
      }
    ]
  }
  ```

  ```json 403 - Production environment theme={null}
  {
    "success": false,
    "error": {
      "code": "PAYMENT_GATEWAY_ERROR",
      "message": "This endpoint is not available in production",
      "details": {
        "error": "This endpoint is not available in production"
      }
    }
  }
  ```

  ```json 503 - PG API error theme={null}
  {
    "success": false,
    "error": {
      "code": "PAYMENT_GATEWAY_API_ERROR",
      "message": "Payment gateway API error",
      "details": {
        "error": "..."
      }
    }
  }
  ```
</ResponseExample>
