Skip to main content
GET
/
v1
/
checkout
/
transaction
Fetch checkout transaction
curl --request GET \
  --url https://api.nomba.com/v1/checkout/transaction \
  --header 'Authorization: Bearer <token>' \
  --header 'accountId: <accountid>'
import requests

url = "https://api.nomba.com/v1/checkout/transaction"

headers = {
"accountId": "<accountid>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {accountId: '<accountid>', Authorization: 'Bearer <token>'}
};

fetch('https://api.nomba.com/v1/checkout/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomba.com/v1/checkout/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"accountId: <accountid>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.nomba.com/v1/checkout/transaction"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("accountId", "<accountid>")
req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.nomba.com/v1/checkout/transaction")
.header("accountId", "<accountid>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.nomba.com/v1/checkout/transaction")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["accountId"] = '<accountid>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "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": "[email protected]",
      "amount": "10000.00",
      "currency": "NGN"
    },
    "transactionDetails": {
      "transactionDate": "2023-12-06T15:46:43.000Z",
      "paymentReference": "5844858382134",
      "paymentVendorReference": "5844858382675493",
      "tokenizedCardPayment": "true",
      "statusCode": "Payment approved"
    },
    "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"
    }
  }
}
{
"code": "400",
"description": "Request failed."
}
{
"code": "401",
"description": "Unauthorized"
}
{
"code": "403",
"description": "Forbidden"
}
{
"code": "404",
"description": "Record not found"
}
{
"code": "429",
"description": "Too many requests"
}
{
"code": "500",
"description": "Server error"
}

Authorizations

Authorization
string
header
required

Nomba authenticates API calls with OAuth2 HTTP bearer tokens. There are two methods of authentication; Client-Credentials method and PKCE (Proof Key for Code Exchange) method. In each of the methods, You will get an ACCESS_TOKEN. You need to use an "Authorization" HTTP header to provide your ACCESS_TOKEN. For example: Authorization: {ACCESS_TOKEN}.

Headers

accountId
string<uuid>
required

The parent accountId of the business.

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

Query Parameters

idType
enum<string>

Checkout id type to use for this query. Valid values are the 'ORDER_REFERENCE', to use Order reference passed in when generating the checkout link, and 'ORDER_ID' to use the uuid value returned in the checkout link path.

Available options:
ORDER_ID,
ORDER_REFERENCE
id
string

Checkout transaction id based on the value selected in the idType parameter

Response

OK - your request was successful.

code
string

Response Code

Example:

"00"

description
string

response description

Example:

"Success"

data
object