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

# Verify Transactions

> Learn how to verify checkout transactions using the Nomba API

<CardGroup cols={2}>
  <Card title="Verify by Order Reference" icon="magnifying-glass" href="/nomba-api-reference/requery/fetch-a-single-transaction-on-the-parent-account">
    Look up a transaction using your order reference or the Nomba transaction ID.
  </Card>

  <Card title="Fetch Checkout Transaction (Production)" icon="file-invoice-dollar" href="/nomba-api-reference/online-checkout/fetch-checkout-transaction">
    Retrieve full checkout order details including card and transfer info.
  </Card>
</CardGroup>

## Which endpoint should I use?

There are two ways to verify a checkout transaction. Choose based on your environment and what you need:

| Endpoint | Method | Environment | Use when |
| - | - | - | - |
| `/v1/transactions/accounts/single` | GET | Sandbox + Production | You want to confirm `status: SUCCESS` before delivering value. Works with `orderReference`, `orderId`, `transactionRef`, or `merchantTxRef` as query params. |
| `/v1/checkout/transaction` | GET | **Production only** | You need full checkout order details (card info, transfer details, order metadata). |

<Tip>
  Always verify transactions before providing goods or services to your customer — even if you received a webhook.
</Tip>

<Warning>
  **Verify with credentials from the region that took the payment.** Nigeria and DRC transactions are
  held in separate systems. If you hold both a Nigerian and a DRC account, a payment collected in CDF
  or USD on your DRC account must be looked up with your DRC credentials — a Nigerian token will
  return `Transaction not found` for it, whichever reference you pass.
</Warning>

## Option 1: Verify via `/v1/transactions/accounts/single`

This endpoint works in both sandbox and production. Pass the `orderReference` (the reference you supplied on the order), the `orderId` (the value returned as `orderReference` in the create-order response), or the `transactionRef` (the Nomba transaction ID from the webhook) as a query parameter.

The key field to check in the response is `data.status`. A successful payment returns `"status": "SUCCESS"`.

<CodeGroup>
  ```bash Verify by orderReference theme={null}
    curl --request GET \
      --url 'https://api.nomba.com/v1/transactions/accounts/single?orderReference=90e81e8a-bc14-4ebf-89c0-57da801cca68' \
      --header 'Authorization: Bearer <token>' \
      --header 'accountId: <accountid>'
  ```

  ```bash Verify by transactionRef theme={null}
    curl --request GET \
      --url 'https://api.nomba.com/v1/transactions/accounts/single?transactionRef=WEB-ONLINE_C-69923-ae0f2688-12b1-45b6-9972-06261aa65ef1' \
      --header 'Authorization: Bearer <token>' \
      --header 'accountId: <accountid>'
  ```

  ```javascript Node.js theme={null}
  // Verify by orderReference
  const orderReference = '90e81e8a-bc14-4ebf-89c0-57da801cca68';
  const url = new URL('https://api.nomba.com/v1/transactions/accounts/single');
  url.searchParams.set('orderReference', orderReference);

  const response = await fetch(url.toString(), {
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'accountId': accountId,
    },
  });

  const { code, data } = await response.json();
  if (code !== '00') throw new Error('Transaction not found');

  if (data.status === 'SUCCESS') {
    // Payment confirmed — deliver goods/services
  }
  ```

  ```python Python theme={null}
  import requests

  order_reference = '90e81e8a-bc14-4ebf-89c0-57da801cca68'

  response = requests.get(
      'https://api.nomba.com/v1/transactions/accounts/single',
      headers={
          'Authorization': f'Bearer {access_token}',
          'accountId': account_id,
      },
      params={'orderReference': order_reference},
  )

  result = response.json()
  if result['code'] != '00':
      raise Exception('Transaction not found')

  if result['data']['status'] == 'SUCCESS':
      pass  # Payment confirmed — deliver goods/services
  ```

  ```json expandable Response (Success) theme={null}
  {
    "code": "00",
    "description": "SUCCESS",
    "data": {
        "id": "WEB-ONLINE_C-69923-ae0f2688-12b1-45b6-9972-06261aa65ef1",
        "status": "SUCCESS",
        "amount": "202.8",
        "fixedCharge": "2.8",
        "source": "web",
        "type": "online_checkout",
        "gatewayMessage": "PAYMENT SUCCESSFUL",
        "customerBillerId": "7373019705",
        "timeCreated": "2025-09-26T01:07:02.729Z",
        "timeUpdated": "2025-09-26T01:07:02.989Z",
        "walletCurrency": "NGN",
        "walletBalance": "478.97",
        "billingVendorReference": "68d5e736e414b032b3******",
        "paymentVendorReference": "09064525092601065923059812******",
        "userId": "69923f4d-963f-4a2b-b0f5-4da074d0a461",
        "onlineCheckoutOrderId": "9adcbf44-8cca-4fc6-b3a7-ac2758******",
        "onlineCheckoutOrderReference": "90e81e8a-bc14-4ebf-89c0-57da801c******",
        "onlineCheckoutCurrency": "NGN",
        "onlineCheckoutCustomerEmail": "make@gmail.com",
        "currency": "NGN",
        "onlineCheckoutAmount": "202.8",
        "onlineCheckoutPaymentMethod": "bank_transfer",
        "entryType": "CREDIT"
    }
  }
  ```

  ```json Response (Failed / Not Found) theme={null}
  {
    "code": "01",
    "description": "Transaction not found",
    "data": null
  }
  ```
</CodeGroup>

<Note>
  For sandbox transactions, use the sandbox base URL: `https://sandbox.nomba.com/v1/transactions/accounts/single`. See [Sandbox Testing](/docs/products/accept-payment/sandbox-testing) for details on looking up sandbox transactions.
</Note>

## Option 2: Get Checkout Transaction (Production only)

This endpoint returns full checkout order details including card information, transfer details, and order metadata. It is useful when you need richer data than the basic transaction lookup provides — for example, to display order details on a receipt page.

<Warning>
  This endpoint is only available in the **production** environment. For sandbox verification, use `POST /v1/transactions/accounts` with the transaction reference — see [Sandbox Testing](/docs/products/accept-payment/sandbox-testing).
</Warning>

To fetch a checkout transaction, send a [GET request](/nomba-api-reference/online-checkout/fetch-checkout-transaction) to this endpoint `/v1/checkout/transaction`.

Read `transactionDetails.status` to confirm the payment. `PAYMENT SUCCESSFUL` means the payment
completed; `PENDING` means it is still in progress and `FAILED PAYMENT` means it did not complete.

<Note>
  `transactionDetails.statusCode` is the **card processor** response code, not the payment status. It
  is empty on rails that do not go through a card processor, such as mobile money, so it cannot be
  used to confirm a payment. Use `transactionDetails.status`.
</Note>

<CodeGroup>
  ```bash Request theme={null}
    curl --request GET \
      --url 'https://api.nomba.com/v1/checkout/transaction?idType=ORDER_REFERENCE&id=68da39e0-2ce4-4ea6-9def-5*********' \
      --header 'Authorization: Bearer <token>' \
      --header 'accountId: <accountid>'
  ```

  ```json Response theme={null}
    {
      "code": "00",
      "description": "Success",
      "data": {
        "success": "true",
        "message": "success",
        "order": {
          "orderId": "56e03654-0c32-4d3e-bbd6-a9df22994a12",
          "orderReference": "90e81e8a-bc14-4ebf-89c0-57da752cca58",
          "customerId": "762878332454",
          "accountId": "56e03654-0c32-4d3e-bbd6-a9df22994a12",
          "callbackUrl": "https://ip:port/merchant.com/callback",
          "customerEmail": "abcde@gmail.com",
          "amount": "10000.00",
          "currency": "NGN"
        },
        "transactionDetails": {
          "transactionDate": "2023-12-06T15:46:43.000Z",
          "paymentReference": "5844858382134",
          "paymentVendorReference": "5844858382675493",
          "tokenizedCardPayment": "true",
          "statusCode": "Payment approved",
          "status": "PAYMENT SUCCESSFUL"
        },
        "transferDetails": {
          "sessionId": "67584432178569543",
          "beneficiaryAccountName": "Tope Fade",
          "beneficiaryAccountNumber": "5844858382",
          "originatorAccountName": "Femi Fash",
          "originatorAccountNumber": "3409082834",
          "narration": "Checkout payment",
          "destinationInstitutionCode": "true",
          "paymentReference": "44384586756"
        },
        "cardDetails": {
          "cardPan": "515123 **** **** 6667",
          "cardType": "Verve",
          "cardCurrency": "NGN",
          "cardBank": "057"
        }
      }
    }
  ```
</CodeGroup>


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