Check Status

Request
Here are examples of how to send a status request to the OpenAPI system.

Sample Status request

curl --location --request POST '{base-url}/api/v2/bill/status' \
--header 'accept: application/json' \
--header 'KEY: api-key' \
--header 'TOKEN: token' \
--header 'VERSION: 2.0' \
--header 'Content-Type: application/json'
package main
import (
    "fmt"
    "net/http"
    "io/ioutil"
)
func main() {
    url := "{base-url}/api/v1/bill/status"
    req, _ := http.NewRequest("POST", url, nil)
    req.Header.Add("accept", "application/json")
    req.Header.Add("KEY", "API Key")
    req.Header.Add("TOKEN", "token")
    req.Header.Add("VERSION", "1.0")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Cache-Control", "no-cache")
    req.Header.Add("Accept-Encoding", "gzip, deflate")
    req.Header.Add("Content-Length", "")
    req.Header.Add("Connection", "keep-alive")
    req.Header.Add("cache-control", "no-cache")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(res)
    fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "{base-url}/api/v1/bill/status",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "Accept-Encoding: gzip, deflate",
    "Cache-Control: no-cache",
    "Connection: keep-alive",
    "Content-Length: ",
    "Content-Type: application/json",
    "KEY: API Key",
    "TOKEN: token",
    "VERSION: 1.0",
    "accept: application/json",
    "cache-control: no-cache"
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var settings = {
  async: true,
  crossDomain: true,
  url: "{base-url}/api/v1/bill/status",
  method: "POST",
  headers: {
    accept: "application/json",
    KEY: "API Key",
    TOKEN:"token",
    VERSION: "1.0",
    Content-Type: "application/json",
    Cache-Control: "no-cache",
    Accept-Encoding: "gzip, deflate",
    Content-Length: "",
    Connection: "keep-alive",
    cache-control: "no-cache"
  }
};
$.ajax(settings).done(function(response) {
  console.log(response);
});

Sample body payload

{
  "partnerId": "partner_api_key",
  "refNumber": "1122FS64443478"
}

**Status API follows the same response structure that Payment API does