Menu
Introduction Getting started SMS Promotional - Large campaigns Transactional - Basic Transactional (Alerts) - Virtual Number Route Transactional (Alerts) - Priority Routing Transactional (OTPs & Alerts) - Special route International route to Nigeria International route to Other Countries SMS DLR SMS DLR Webhooks Voice Voice OTP Voice Broadcasts Voice DLR Units Transfer Units to Sub-Account Transfer Units to Other Account Check Units Balance Sender IDs Register Sender IDs Check Sender ID status Categories Add Customer Remove Customer Virtual Number Inbox webhook Carrier Billing Run USSD Query Run Shortcode Query Query Status Tools Create Sub-Account Check DND Status Check Service Status 3rd-party integrations ZOHO
Query status The API is used when you want to programatically fetch the status of the query / transaction you ran on your virtual number using the carrier billing service.
POST
https://api.textng.xyz/carrier_transaction_status/
PHP code
<?php
  // using cURL POST
  $key="YOUR-ACCOUNT-KEY";
  $ref_id="REFERENCE-ID";
  $response = httpPost("https://api.textng.xyz/carrier_transaction_status/",array("key"=>"$key","ref_id"=>"$ref_id"));
  // using php curl
  function httpPost($url, $data) {
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($curl);
    curl_close($curl);
    echo $response;
  }
?>
Parameters
Parameters Example Description
Key XXXXX-XXXX-XXXXX This can be found in the Developers page of your dashboard. The key authorizes the transaction.
ref_id * XXXXXXXXXX This is the "ref_id" parameter returned on each query / transaction you pushed
Responses
Your transaction response will appear in JSON format as shown below.
Succesful query (JSON)
{
    "D": {
        "details":[{
            "status":"QUERY STATUS",
            "ref_id":"XXXXXXXXXXXXXXX",
            "query":"*XXX#",
            "query_response":"THE RESPONSE FROM THE NETWORK",
            "type":"XXXX",
            "bypasscode":"23490XXXXXXXXX",
            "amount_paid":"0" 
        }]
    }
}
Error - Invalid key (JSON)
{
    "D":{
        "details":[
            {
            "status":"error-key-invalid"
            }
        ]
    }
}