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

# Requery transaction

> Return one transaction and its current `status` by Mongo `_id` or by `tranxId`. Use to requery after a purchase or for polling. Typical `status` values include `SUCCESS`, `FAILED`, `PROCESSING`, `PENDING`, `CANCELLED`.



## OpenAPI

````yaml GET /api/v1/transactions/{transactionId}
openapi: 3.1.0
info:
  title: Dancity API
  description: >-
    Paths below match the server base URL + global prefix `api`. Merchant:
    `Authorization: Bearer dcy_live_...` and `channel: API`. App: JWT. See
    Guides for flows.
  version: 1.0.0
servers:
  - url: https://api.dancity.app
    description: Production
  - url: http://localhost:6565
    description: Local development
security: []
tags:
  - name: VAS
    description: >-
      Merchant API (`/api/v1`): catalog GETs (wallet, services, products, plans)
      and purchase routes; `channel: API` on POST buys; app education & betting
      where listed
  - name: Products & services
    description: 'Catalog GETs: all services; products and plans with optional query filters'
  - name: Wallet
    description: Get wallet by id (JWT)
  - name: Transactions
    description: Fetch your transactions and requery one by id for current status
  - name: Betting
    description: Betting funding
  - name: Education
    description: Education pins
  - name: eSIM
    description: eSIM catalog and purchase
  - name: Webhook
    description: Outbound events Dancity POSTs to your configured HTTPS URL
paths:
  /api/v1/transactions/{transactionId}:
    get:
      tags:
        - Transactions
      summary: Requery transaction
      description: >-
        Return one transaction and its current `status`. Pass Mongo `_id`,
        `tranxId` (e.g. `DNTY8374056F678V`), or `customerRef` (e.g.
        `DATA-REF-001`) as the path segment. When several rows share the same
        `customerRef`, the most recent is returned.
      parameters:
        - name: transactionId
          in: path
          required: true
          description: Mongo `_id`, `tranxId`, or `customerRef`.
          schema:
            type: string
            example: DNTY8374056F678V
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                success: true
                message: Transaction fetched
                data:
                  _id: 6a1c3e3de285680cc3b7d2ba
                  tranxId: DNTY8374056F678V
                  service: DATA
                  product: MTN GIFTING
                  tranxType: DEBIT
                  status: FAILED
                  currency: NGN
                  remarks: MTN GIFTING 40MB for 1 Day
                  amount: 50
                  fee: 0
                  amountPaid: 50
                  balanceBefore: 5276
                  balanceAfter: 5226
                  number: '09037346247'
                  customerRef: DATA-REF-001
                  channel: API
                  paymentMedium: MAIN WALLET
                  tranxDate: '2026-05-31T13:57:17.405Z'
                  apiResponse: >-
                    Sorry, you are not allowed to migrate to Betamix Bundle Mini
                    Plan. Thank you! — Oh dear! It seems xxxxxxxxxxx is not
                    eligible for this bundle. Please select a new bundle and try
                    again
                  isReversal: false
                  quantity: 0
                  createdAt: '2026-05-31T13:57:17.407Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                success: false
                message: Invalid API key or IP not allowlisted
                statusCode: 401
        '404':
          description: Not found
          content:
            application/json:
              example:
                success: false
                message: Transaction not found
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                success: false
                message: Sorry, something went wrong. Please try again later
                statusCode: 500
      security:
        - DancityApiKey: []
components:
  securitySchemes:
    DancityApiKey:
      type: http
      scheme: bearer
      bearerFormat: dcy_live_...
      description: Merchant API key from the Dancity dashboard.

````

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