{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"7f50b1de-b114-4bc5-a967-9b2dc21e1831","name":"KiNG FLEXY GH API v2","description":"The KiNG FLEXY GH Developer API: sell Ghana digital services from your own\napp, website or bot. MTN, Telecel and AirtelTigo data bundles and Standard\nBundles, airtime, WAEC/BECE/WASSCE results checker vouchers, MTN AFA\nregistration, utility bill payments (ECG, Ghana Water, DStv, GOtv,\nStarTimes), bulk SMS, and mobile-money wallet top-ups.\n\nEvery service is provided by KiNG FLEXY GH. We fulfil each order and pay the\nbiller or network on your behalf, delivered through our network of licensed\npartners. You deal with one company: one wallet, one set of prices, one\nsupport desk.\n\n### Environment\n**Production** moves real money; a free **Sandbox** is available for testing (see Sandbox below). Every\nendpoint lives under `/api/v2` (v2 is the only version; v1 was retired).\n\n### Sandbox\nFree test keys from Dashboard > Developer API: `kf_test_...` (standard), `kf_cs_test_...` (Commission\nServices). Same base URL as production, a virtual GHS 1,000 wallet each, never move real money; swap in a\nlive key when ready, nothing else changes. Sandbox responses carry `meta.livemode: false` and header\n`X-KFT-Environment: sandbox`; sandbox webhook payloads carry `livemode: false`. `GET /sandbox/scenarios`\nreturns these rules as JSON (sandbox keys only; `403` for a live key).\n\nOutcome is decided by the recipient phone's LAST FOUR digits: `0001` succeeds (~3s, `order.completed`);\n`0002` fails and refunds (~3s, `order.refunded` — except results checker: instant `409`, no charge;\nverify-number: `allowed: false`; utilities lookup: `404`); `0003` stays pending forever (test polling and\ntimeouts); `0004` on data orders is held `blacklisted` (results checker completes instantly regardless;\nother products behave like `0003`); any other number succeeds.\n\nUtilities lookup: any account/phone returns one canned meter (example `0200000001`) except numbers ending\n`0002` (`404` \"account not found\"). Limits: 60 requests/min per key (each order in a bulk batch counts as\none); bulk data max 25 items (live: 100); Standard Bundles `pack_id` purchases unavailable; wallet top-up\nand SMS unavailable (`403`). References: 3-100 characters (Standard Bundles: letters, digits, `. _ : -`;\nutilities: optional, at most 64 characters of letters, digits, `. _ -`).\n\n### Authentication\nSend your API key RAW in the `Authorization` header (no `Bearer` prefix).\nThere are three key types, and each one only works on its own endpoints:\n- **Standard** (`kf_live_...`): account, data, wallet balance and wallet top-up, data orders, results checker, AFA.\n- **Commission Services** (`kf_cs_live_...`): airtime, Standard Bundles, utility bills.\n- **SMS** (`kf_sms_live_...`): SMS.\n\nUsing the wrong key type returns `403`. Create keys in Dashboard > Developer\nAPI. A key is shown once and goes live after admin approval.\n\n### Pricing\nKiNG FLEXY GH sets every price, and we compute it on our side. **Never send a\nprice.** Any price, fee or discount field in a request body is ignored; you\nare charged what our catalog says for your account role, and the response\ntells you what you paid.\n\n### Response envelope\nEvery endpoint returns one of two shapes:\n- Success: `{ \"success\": true, \"data\": { ... }, \"meta\": { \"timestamp\": \"...\", \"version\": \"v2\" } }`\n- Error: `{ \"success\": false, \"error\": { \"code\": 400, \"message\": \"...\" } }`\n\n### Ghana only\nThis platform serves Ghanaian mobile networks and services exclusively\n(MTN, Telecel, AirtelTigo). There is no coverage outside Ghana.\n\n### Network number validation\nWe validate a recipient/beneficiary number's network from its prefix\nbefore submitting an order. As of this writing:\n- **MTN**: 024, 025, 053, 054, 055, 059\n- **Telecel**: 020, 050\n- **AirtelTigo**: 026, 027, 056, 057\n\nThese prefix-to-network mappings are **not guaranteed to stay fixed** —\nGhanaian operators occasionally get reassigned or new ranges opened by\nthe regulator. Don't hardcode this list into your own client-side\nvalidation as a permanent source of truth; treat our API's response as\nthe final word on whether a number/network pairing is accepted, and\nre-check this document periodically for changes.\n\n### Idempotency\nEvery money-moving endpoint accepts a `reference` you choose. Repeating\nthe exact same request with the same reference returns the original\norder instead of charging again. Reusing a reference for a *different*\nrequest returns `409 Conflict` and you are never charged twice. After a\ntimeout, always retry with the SAME reference; never mint a new one for a\nretry. On some products a reference is unique across every developer (the\nendpoint says so), so make yours distinctive, for example by prefixing it\nwith your own id.\n\n### Errors\n- `400` invalid request; nothing was charged.\n- `401` missing or invalid API key.\n- `403` wrong key type for this endpoint, key pending or revoked, role not allowed, or account suspended.\n- `404` not found, or not owned by your account.\n- `409` the reference conflicts with an earlier request, or an identical request is still in progress.\n- `429` too many requests: wait the time in the message (and the `Retry-After` header where present), then slow down.\n- `502` temporarily unreachable: retry shortly. Never treat it as \"not found\".\n- `503` the product is switched off or temporarily paused; nothing was charged.\n- `500` internal error: contact support if it persists.\n\n### Webhooks\nConfigure a webhook URL per API key in your dashboard (the Standard key covers `data`, `resultschecker`\nand `afa`; the Commission key covers `airtime`, `utilities` and `bundles`). We POST a JSON body:\n`{ event_id, event, product, reference, status, timestamp, detail? }` with the headers\n`Content-Type: application/json`, `User-Agent: KiNGFLEXYGH-Webhook/1.0` and `X-KFT-Signature` — the\nHMAC-SHA256 (hex) of the exact raw request body using your webhook secret. Verify it before trusting\nthe payload and compare in constant time (guard the length first).\n\n- **URL rules:** the webhook URL must be a public `https://` URL on the standard port 443 (no custom\n  port), and its domain must not resolve to a private network address. Localhost, IP addresses and\n  internal hostnames are rejected. If the test reports \"Your webhook host points to a private network\n  address\", your domain resolves to a private/internal IP or your URL uses a port other than 443.\n- **Respond with 2xx within 5 seconds.** A redirect (3xx), any other status or a timeout is a failed\n  attempt. We never follow redirects: save the final URL.\n- **Retries:** failed deliveries are retried automatically: about 5 minutes after the first failure,\n  then 30 minutes and 2 hours after each following failure (4 attempts in total — the last one roughly\n  2½ hours after the first), then we stop. Delivery is at-least-once: deduplicate on `event_id`. Pending retries use your current URL and secret.\n- **Events:** `order.completed`, `order.failed`, and `order.refunded` (data and AFA orders). For\n  **data** orders `order.failed` is NOT final — the order is retried automatically — and\n  `order.refunded` is the only final failure. For airtime, utilities, bundles and results checker\n  `order.failed` is final (`status` is `refunded` when your wallet was refunded).\n- **Testing:** the \"Send test event\" button on each webhook card sends a signed `webhook.test` event\n  (`status: \"test\"`, `reference` starting `TEST-`, no order created) and reports the status, latency\n  and the reason for any failure. Answer 2xx without running order logic: branch on\n  `event == \"webhook.test\"` (the test carries `product` `data` for the Standard key or `airtime` for\n  the Commission key, and an `event_id` of the form `test:<uuid>`). One test per key every 30 seconds.\n- We send from changing cloud IP addresses — do not IP-allowlist; verify the signature instead.\n- **Wallet top-ups have no webhook event.** Poll `GET /wallet/topup/{reference}` instead.\n\n### Tips & recommendations (Standard Bundles)\n- **Cache the catalog.** Cache `GET /bundles/catalog` and refresh it every few minutes to an hour; do not\n  call it before every purchase. Use the `ETag` / `If-None-Match` for cheap revalidation. Excessive catalog\n  or status polling is rate limited.\n- **Prefer webhooks over polling.** Listen for `order.completed` / `order.failed` (product `bundles`; verify\n  the `X-KFT-Signature` HMAC-SHA256 hex of the raw body with your webhook secret; deduplicate on `event_id`).\n  If you poll `GET /bundles/orders/{reference}`, poll sparingly with back-off (for example 5s, 15s, 60s) and\n  stop at a terminal status (`completed`, `failed`, `refunded`).\n- **One reference per purchase, reused on retry.** Send a unique `reference` per purchase and reuse the SAME\n  reference on any retry; never generate a new reference for a retry. A repeat returns the original order\n  (`is_duplicate: true`); `409` means the first attempt is still being processed.\n- **Honour `429`.** Wait the time given in the response (the `Retry-After` header and the \"Retry in N s\"\n  message) and slow your overall request rate.\n\n\nContact Support:\n Name: KiNG FLEXY GH","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"55615613","team":16858419,"collectionId":"7f50b1de-b114-4bc5-a967-9b2dc21e1831","publishedId":"2sBYAuTBhF","public":true,"publicUrl":"https://documenter-api.postman.tech/view/55615613/2sBYAuTBhF","privateUrl":"https://go.postman.co/documentation/55615613-7f50b1de-b114-4bc5-a967-9b2dc21e1831","customColor":{"highlight":"#FF6C37","right-sidebar":"#FFFFFF","top-bar":"#FFFFFF"},"documentationLayout":"classic-single-column","customisation":{"appearance":{"default":"light","themes":[{"name":"light","logo":"https://kingflexygh.com/logo.png","colors":{"highlight":"#FF6C37","right-sidebar":"#FFFFFF","top-bar":"#FFFFFF"}},{"name":"dark","logo":"https://kingflexygh.com/logo.png","colors":{"highlight":"#FF6C37","right-sidebar":"#1A1A1A","top-bar":"#1A1A1A"}}]}},"version":"8.12.12","publishDate":"2026-11-09T13:55:58.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{"logoLight":"https://kingflexygh.com/logo.png","logoDark":"https://kingflexygh.com/logo.png"}},"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://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/92f2dd5e0d459ad23520bb452628e1748375411467266cbfd4c5bc3758ca94a2","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/2sBYAuTBhF"}