{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"7390bb15-c227-48cb-a5b0-a08a23c2dd39","name":"VeraciousPay API Documentation","description":"<img src=\"https://veraciouspay.com/template/images/logo.png\" width=\"431\" height=\"446\">\n\n# Overview\n\nWelcome to the VeraciousPay Developer API Documentation. This comprehensive guide will empower you to seamlessly integrate our advanced payment gateway into your website, enhancing your customers’ payment experience and enabling efficient transaction processing. The VeraciousPay Developer API is designed for  \ndevelopers and entrepreneurs who seek simplicity, security, and reliability in their payment processing solutions.\n\nVeraciousPay provides RESTFUL API based on simple HTTP GET/POST requests. Whatever it is you want to build we have made it easy as possible with our APIs and SDKs, documentation as well as other resouces to make you setup in less than 5 minutes.\n\n## Authentication\n\n- An account must be registered to use the endpoints and resources provided here.\n    \n- This Access token must be included as a custom header, **Authorization Bearer,** when making requests.\n    \n- To get a access token for your app, get in touch with [VeraciousPay](https://veraciouspay.com/).\n    \n\n## Headers\n\nBy default, except stated otherwise, you must include the following headers in each request:\n\n- **Content-Type**: application/json\n    \n- **Accept**: application/json\n    \n- **Authorization Bearer** : {{access_token}}\n    \n\n## HTTP Methods\n\nThe API support standard HTTP methods as detailed below:\n\n- `GET` - For retrieve records\n    \n- `POST` - For creating new records\n    \n\n| **Environment** | **Base URL** |\n| --- | --- |\n| Production (live mode) | [https://veraciouspay.com/api/v1/](https://veraciouspay.com/api/v1/) |\n\n**Remember** access tokens are long-lived that expire after 5 years.\n\n**Note**: you can get your access token via API Settings \\[available to agent and super agent only, for now.\\].\n\n## Transaction Response\n\n| **Status Code** | **Meaning** | **What happened** |\n| --- | --- | --- |\n| 200 | Ok | Everything is fine. You're cleared for take off. |\n| 401 | Unauthorized | You didn't provide a valid Access Token. |\n| 424 | Failed | Ouch! We couldn't accept this request, you omitted a required parameter or it's an outright failure from us. Don't break a sweat, reconfirm, again. |\n| 429 | Too Many Request | You're hitting our API too quickly. Pump your breaks, captain. |\n\n## Transaction Response Format\n\n| **Response Code** | **Meaning** | **Note** |\n| --- | --- | --- |\n| Processing | Transaction has been on processing | Transaction has been on processing. This may happen transaction been on processing and has not be confirmed by the provider |\n| Completed | Transaction has been completed | Transaction is completed and service is confirmed as delivered. |\n| pending | Transaction is pending. | Transaction is pending. This may happen when service provider has not concluded the transaction. This status will be updated. Please requery to get a final status. |\n| Refunded | Transaction is refund | Transaction is refunded. This may happened when transaction was not completed and not delivered to the recipient |\n| Failed | Transaction is failed | Transaction is failed. This may happen when the transaction was unable to completed |\n\n## **VeraciousPay WEBHOOK**\n\nThe VeraciousPay REST APIs use webhooks for transactions notification. Webhooks are HTTP callbacks that contains notification messages for transactions. When you generate an api token, you can create add a webhook url on which you will receive the transactions update notifications.\n\n**SAMPLE PHP CODE TO VERIFY WEBHOOK SIGNATURE**\n\n``` php\nif (!function_exists('getallheaders')) {\n    function getallheaders() {\n        $headers = [];\n        foreach ($_SERVER as $name => $value) {\n            if (substr($name, 0, 5) == 'HTTP_') {\n                $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] =   $value;\n            }\n        }\n        return $headers;\n    }\n}\n//\n$access_token = \"your veraciouspay access token\"; // api token\n$payload = file_get_contents(\"php://input\"); // payload\n$local_signature = hash_hmac('sha256', $payload, $access_token); // local signature\n//\n// Remote signature\n$headers = getallheaders();\n@$remote_signature = isset($headers['Remote_Signature']) ? $headers['Remote_Signature']:$headers['remote_signature'];\n//\nif ($local_signature === $remote_signature) {\n//verified , continue your code logic\n//\n$data = json_decode($payload, true);\n$api_mode = $data['api_mode']; // api_live;\n$status = $data['status']; // true\n$method = $data['method']; // transaction / data coupon / data storage\n//\n// return transaction data\nif($status == true){\n    $transaction_data = $data['data']['transaction_data'];\n    $our_reference = $transaction_data['reference'];\n    $your_ref = $transaction_data['your_ref'];\n    $status = $transaction_data['status'];\n    $amount_paid = $transaction_data['amount_paid'];\n    $recipient = $transaction_data['recipient'];\n    $package = $transaction_data['package'];\n    $provider = $transaction_data['provider'];\n    $server_response = $transaction_data['server_response'];\n    \n    //meter_token and meter_unit key are null if provider IS NOT meter token\n    $meter_token = $transaction_data['meter_token'];\n    $meter_unit = $transaction_data['meter_unit'];\n  }\n}\n\n ```\n\n## **Sample Webhook JSON Response**\n\n``` json\n{\n  \"status\": true,\n  \"api_mode\": \"{{api_mode}}\",\n  \"method\": \"transaction\",\n  \"data\": {\n    \"transaction_data\": {\n      \"package\": \"{{package}}\",\n      \"provider\": \"{{provider}}\",\n      \"reference\": \"{{reference}}\",\n      \"your_ref\": \"{{your_ref}}\",\n      \"status\": \"{{status}}\",\n      \"recipient\": \"0806*******\",\n      \"amount_paid\": \"{{amount_paid}}\",\n      \"meter_token\": \"{{meter_token}}\",\n      \"meter_unit\": \"{{meter_unit}}\",\n      \"server_response\": \"{{server_response}}\"\n    }\n  }\n}\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"9698276","team":1219218,"collectionId":"7390bb15-c227-48cb-a5b0-a08a23c2dd39","publishedId":"2s93eU2Dqk","public":true,"publicUrl":"https://documenter-api.postman.tech/view/9698276/2s93eU2Dqk","privateUrl":"https://go.postman.co/documentation/9698276-7390bb15-c227-48cb-a5b0-a08a23c2dd39","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Cheap data, data bundle, MTN SME data, MTN data, MTN data bundle, Virtual Top Up Business veraciouspay, VTU Business, Airtime Business veraciouspay, Recharge card business veraciouspay, Data share business veraciouspay, GOtv recharge business veraciouspay, Startimes recharge business veraciouspay, DStv recharge busines"},{"name":"title","value":"Pay Bills, Buy Internet Data and Airtime Recharge Using Whatsapp, Buy SME Data Cheap From Whatsapp, Buy Data BundlePay B"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2023-05-01T18:01:04.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Pay Bills, Buy Internet Data and Airtime Recharge Using Whatsapp, Buy SME Data Cheap From Whatsapp, Buy Data BundlePay B","description":"Cheap data, data bundle, MTN SME data, MTN data, MTN data bundle, Virtual Top Up Business veraciouspay, VTU Business, Airtime Business veraciouspay, Recharge card business veraciouspay, Data share business veraciouspay, GOtv recharge business veraciouspay, Startimes recharge business veraciouspay, DStv recharge busines"},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/9fc800e816fc2835dcb894a91a5f98426d30546d2443ab7bc513da676314ceae","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93eU2Dqk"}