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

# Requery Transaction

> Confirm the final status of a pending vending transaction

## Overview

Customers can requery vending transactions from the public API. Use this endpoint when an airtime, data, electricity, or cable TV purchase returns a pending response.

The `orderId` path value is the `requestReference` returned by the original purchase request.

## Request

<RequestExample>
  ```bash theme={null}
  curl --location 'https://api.bleeprs.com/api/requeryTransaction/bpr_req_a1b2c3d4e5f6' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

## Path Parameters

<RequestField name="orderId" type="string" required>
  `requestReference` returned by the original purchase response.
</RequestField>

## Response Fields

<ResponseField name="gatewayStatus" type="string">
  `"00"` indicates the requery request was processed successfully.
</ResponseField>

<ResponseField name="gatewayMessage" type="string">
  Human-readable requery result message.
</ResponseField>

<ResponseField name="requestReference" type="string">
  Unique reference for the requery request.
</ResponseField>

<ResponseField name="data" type="object">
  Current transaction details.
</ResponseField>

<ResponseField name="status" type="string">
  Current transaction status, such as `SUCCESS`, `FAILED`, or `PENDING`.
</ResponseField>

<ResponseField name="reference" type="string">
  Transaction reference being checked.
</ResponseField>

<ResponseField name="token" type="string">
  Electricity token for successful prepaid electricity purchases, when available.
</ResponseField>

<ResponseField name="units" type="number">
  Electricity units for successful electricity purchases, when available.
</ResponseField>

## Status Codes

| Code  | Meaning                                                                                                                             |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `200` | Requery completed. Use `data.status` to determine the final outcome (`SUCCESS`, `FAILED`, or still `PENDING`).                      |
| `404` | No transaction was found for the supplied `orderId`. Double-check the `requestReference` from the original purchase response.       |
| `425` | Too early. Requery is only available at least 2 minutes and 1 second after the original purchase.                                   |
| `429` | The maximum number of requery attempts for this transaction has been reached. Contact support to have the status resolved manually. |
| `502` | The provider could not be reached to confirm the status. Retry after a short delay.                                                 |

## Notes

* Use the `requestReference` from the original purchase response as `orderId`.
* Wait at least 2 minutes after the original purchase before requerying a pending transaction.
* Store both the original purchase response and the requery result for reconciliation and support.
* For successful electricity purchases, the response can include token and units details.
* If the transaction is still `PENDING`, do not submit a duplicate purchase for the same customer request.
* In the Mintlify playground, the `orderId` value you type is preserved as you move between endpoints — paste the `requestReference` from a real purchase response to test end-to-end.


## OpenAPI

````yaml GET /requeryTransaction/{orderId}
openapi: 3.0.3
info:
  title: Bleeprs API Specification 0.1
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.bleeprs.com/api
security:
  - bearerAuth: []
paths:
  /requeryTransaction/{orderId}:
    get:
      tags:
        - Vending
      summary: Requery Transaction
      description: >-
        Confirm the final status of a pending airtime, data, electricity, or
        cable TV purchase.
      operationId: requeryVendingTransaction
      parameters:
        - name: orderId
          in: path
          required: true
          description: >-
            The `requestReference` returned by the original purchase response.
            The value you type here is preserved across the playground — paste
            your real reference to test against a live transaction.
          schema:
            type: string
          example: your-request-reference-here
      responses:
        '200':
          description: Requery completed. Use `data.status` to determine the final outcome.
          content:
            application/json:
              schema:
                type: object
                properties:
                  gatewayStatus:
                    type: string
                    example: '00'
                  gatewayMessage:
                    type: string
                    example: Successfully Processed
                  requestReference:
                    type: string
                    example: bpr_req_a1b2c3d4e5f6
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - SUCCESS
                          - FAILED
                          - PENDING
                        example: SUCCESS
                      reference:
                        type: string
                        example: bpr_req_a1b2c3d4e5f6
                      token:
                        type: string
                        description: >-
                          Returned for successful electricity purchases when
                          available
                        example: 1234 5678 9101 1121 3141
                      units:
                        type: number
                        description: >-
                          Returned for successful electricity purchases when
                          available
                        example: 24.5
        '404':
          description: >-
            No transaction was found for the supplied orderId. Double-check the
            requestReference from the original purchase response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  gatewayStatus:
                    type: string
                    example: '88'
                  gatewayMessage:
                    type: string
                    example: Unsucessfull
                  requestReference:
                    type: string
                    example: bpr_req_a1b2c3d4e5f6
                  data:
                    type: string
                    example: Transaction not found
        '425':
          description: >-
            Requery is only available at least 2 minutes and 1 second after the
            original purchase.
          content:
            application/json:
              schema:
                type: object
                properties:
                  gatewayStatus:
                    type: string
                    example: '88'
                  gatewayMessage:
                    type: string
                    example: Unsucessfull
                  requestReference:
                    type: string
                    example: bpr_req_a1b2c3d4e5f6
                  data:
                    type: string
                    example: >-
                      Please wait at least 2 minutes and 1 second after the
                      transaction before attempting a requery.
        '429':
          description: >-
            The maximum number of requery attempts for this transaction has been
            reached. Contact support to have the status resolved manually.
          content:
            application/json:
              schema:
                type: object
                properties:
                  gatewayStatus:
                    type: string
                    example: '88'
                  gatewayMessage:
                    type: string
                    example: Unsucessfull
                  requestReference:
                    type: string
                    example: bpr_req_a1b2c3d4e5f6
                  data:
                    type: string
                    example: >-
                      Max requery attempts reached. Please contact support for
                      manual verification.
        '502':
          description: >-
            The provider could not be reached to confirm the status. Retry after
            a short delay.
          content:
            application/json:
              schema:
                type: object
                properties:
                  gatewayStatus:
                    type: string
                    example: '88'
                  gatewayMessage:
                    type: string
                    example: Unsucessfull
                  requestReference:
                    type: string
                    example: bpr_req_a1b2c3d4e5f6
                  data:
                    type: string
                    example: >-
                      Unable to verify transaction status with the provider at
                      this time. Please try again later.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````