Sell result checkers and AFA registration from your own platform.
The EduFlexTech Reseller API lets your website, app or school portal buy WASSCE and BECE result checker vouchers and submit MTN AFA registrations, paid from your EduFlexTech wallet. One API key, plain JSON over HTTPS, eight resources.
Overview
You are the shop; we are the supplier. Your customers never deal with us directly. The flow is always the same:
- Fund your wallet from your EduFlexTech dashboard, using the normal Paystack top-up.
- Call the API from your server when your customer buys. We charge your wallet at your reseller price.
- Deliver to your customer. Checker PINs come back in the same response. AFA registrations finish a few minutes later, and we tell you by webhook.
Everything is versioned under /api/v1. We only make additive changes within v1: new endpoints, new optional fields, new error codes, new webhook events. Build your code to ignore fields it does not recognise. Anything that would break existing code ships as /api/v2, with notice.
Quickstart
- Create an account at eduflextech.com and open Developer API in your dashboard.
- Request API access with your business name and how you will use the API. You can build immediately; live keys unlock once we approve you.
- Create a sandbox key. It starts with
est_test_. Copy it straight away, because it is shown only once. - Make your first call:
curl https://eduflextech.com/api/v1/account \ -H "Authorization: Bearer est_test_YOUR_KEY"
- Place a sandbox order, handle the response, then switch to a live key (
est_live_) once approved. Nothing else in your code changes.curl -X POST https://eduflextech.com/api/v1/checkers/orders \ -H "Authorization: Bearer est_test_YOUR_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6f1c2a8e-5b7d-4f0e-9a3c-1d2e3f4a5b6c" \ -d '{"exam_type":"WASSCE","exam_year":2026,"quantity":2,"client_reference":"order-1001"}'
Authentication
Every request except GET /health needs your API key in the Authorization header:
Authorization: Bearer est_live_8kP2xQ7mZr4TbN9vW3cY6hJ1dF5gL0sA2eU8iO4p
| Key prefix | Mode | What it does |
|---|---|---|
est_test_ | Sandbox | Full API behaviour with fake PINs. Never charges your wallet, never touches real stock, never sends SMS. Available as soon as you request access. |
est_live_ | Live | Real vouchers, real AFA registrations, charged to your wallet. Available once your reseller account is approved. |
Scopes
Each key carries permissions, chosen when you create it. Give a server only what it needs.
| Scope | Allows |
|---|---|
read | Account, products, orders, transactions, webhook settings. Always included. |
checkers | POST /checkers/orders |
afa | POST /afa/registrations |
Keeping keys safe
- We store only a one-way hash of your key. Nobody at EduFlexTech can show it to you again, so lost keys are replaced, not recovered.
- Revoking a key in your dashboard blocks it within seconds. Use one key per server or environment so you can rotate them independently.
- Optionally restrict your account to fixed server IPs in Developer API → IP allowlist. Requests from any other address get
IP_NOT_ALLOWED. - Repeated failed authentication from one IP is temporarily blocked, and every key event is recorded in our security log.
Sandbox
Sandbox keys run the same validation, idempotency, rate limits and response shapes as live keys, so code that works in the sandbox works live. The differences:
- Checker orders return fake PINs (serials start with
TEST) and always succeed, for any exam year. - AFA registrations return
pendingand becomecompleted30 seconds later. If you have a webhook URL set, the event is sent to it. - Your sandbox balance is always GHS 10,000.00 and never goes down.
- Sandbox orders are only visible to sandbox keys, and live orders only to live keys.
To test your error handling, send one of these values as client_reference:
| client_reference | Result |
|---|---|
simulate_insufficient_balance | 402 INSUFFICIENT_BALANCE on checker orders and AFA registrations |
simulate_out_of_stock | 409 OUT_OF_STOCK on checker orders |
simulate_failure | AFA registration ends as failed instead of completed |
Responses
Every response is JSON with the same envelope. Check success first, or the HTTP status, which always agrees with it.
{
"success": true,
"data": { ... }
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "One or more fields are invalid.",
"details": { "fields": { "quantity": "must be between 1 and 100" } },
"request_id": "req_Xc81LmPq20aZt5KdW9yB"
}
}
- Amounts are numbers in Ghana cedis (GHS) with up to two decimal places, for example
15.5. - Timestamps are ISO 8601 in UTC, for example
2026-11-10T09:30:00Z. - Every response has an
X-Request-Idheader. Include it when you contact support.
Errors
Branch on error.code, not on the message text. Messages are written for humans and may be reworded; codes never change within v1.
| HTTP | code | Meaning and what to do |
|---|---|---|
| 401 | UNAUTHORIZED | Key missing, malformed or unknown. Check the header. |
| 401 | KEY_REVOKED | The key was revoked. Create a new one. |
| 403 | ACCOUNT_NOT_ACTIVE | Account awaiting approval (live keys only), suspended, or rejected. |
| 403 | FORBIDDEN_SCOPE | The key lacks the scope this endpoint needs. |
| 403 | IP_NOT_ALLOWED | Your server's IP is not on the account's allowlist. |
| 400 | IDEMPOTENCY_KEY_REQUIRED | A paid request was sent without an Idempotency-Key header. |
| 402 | INSUFFICIENT_BALANCE | Wallet too low. details.required and details.balance say by how much. Nothing was charged. Top up and retry, even with the same idempotency key. |
| 404 | NOT_FOUND | Unknown endpoint, or no order with that reference for this key's mode. |
| 405 | METHOD_NOT_ALLOWED | Wrong HTTP method. The Allow header lists the right ones. |
| 409 | OUT_OF_STOCK | Not enough vouchers for that exam and year. details.available says how many could be sold now. Nothing was charged, and orders are never partly filled. |
| 409 | REQUEST_IN_PROGRESS | The same idempotency key is still being processed. Wait for Retry-After seconds and retry. |
| 422 | VALIDATION_ERROR | Bad input. details.fields lists every problem at once. |
| 422 | IDEMPOTENCY_KEY_REUSED | The idempotency key was already used for a different request. Use a new key per order. |
| 429 | RATE_LIMITED | Too many requests. Wait for Retry-After seconds. |
| 500 | INTERNAL_ERROR | Our fault. For paid requests, retry with the same idempotency key: you will get the original result or a safe new attempt, never a double charge. If the message says “do not retry”, contact support with the reference. |
| 503 | SERVICE_UNAVAILABLE | A temporary problem. Nothing was charged. Retry with backoff. |
Idempotency
Networks fail. If your request times out, you cannot know whether we received it. Idempotency makes retrying always safe.
Every request that spends money, POST /checkers/orders and POST /afa/registrations, must include an Idempotency-Key header: 8 to 100 characters of letters, digits, _ - : .. Generate a new UUID for each new order and store it with the order before you call us.
- Same key, same body, after success: you get the original response again, with header
Idempotent-Replayed: true. No second charge. - Same key while the first request is still running:
409 REQUEST_IN_PROGRESS. Retry shortly. - Same key, different body:
422 IDEMPOTENCY_KEY_REUSED. - Request rejected before any charge (validation, balance, stock): the key is released, so you can fix the cause and retry with the same key.
- Keys are remembered for 24 hours.
Rate limits
The default is 60 requests per minute per account, shared across all your keys of the same mode. Every authenticated response tells you where you stand:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1762767060 # unix time the window resets
Over the limit you get 429 RATE_LIMITED with a Retry-After header. One order can contain up to 100 vouchers by default, so you rarely need many calls. If you need higher limits, contact us.
Money & stock
- Pricing:
GET /productsreturns your price per voucher, including bulk tiers. The price is fixed at the moment we accept your order and returned in the response. - Wallet: live orders are paid from the wallet of the account that owns the key. Top up from your dashboard.
balance_afterin each order response shows what is left. - All or nothing: a checker order is either completely filled or not charged at all. You never receive part of an order.
- AFA: the fee is charged when we accept the registration. If the registration later fails at MTN, our team reviews it and refunds your wallet where appropriate.
Endpoints
Your account, balance and limits. A good first call to check your key works.
{
"success": true,
"data": {
"business_name": "Kofi Results Hub",
"account_status": "approved",
"mode": "live",
"balance": 482.5,
"currency": "GHS",
"scopes": ["read", "checkers", "afa"],
"limits": { "requests_per_minute": 60, "max_vouchers_per_order": 100 },
"webhook_configured": true
}
}
What you can sell right now and your prices. Stock is shown as in_stock and low_stock flags per exam year. Cache this for a few minutes at most, since prices and stock change.
{
"success": true,
"data": {
"currency": "GHS",
"max_vouchers_per_order": 100,
"checkers": [
{
"exam_type": "WASSCE",
"unit_price": 16,
"pricing_tiers": [
{ "min_quantity": 1, "max_quantity": 9, "unit_price": 16 },
{ "min_quantity": 10, "max_quantity": 50, "unit_price": 15 },
{ "min_quantity": 51, "max_quantity": null, "unit_price": 14 }
],
"years": [
{ "exam_year": 2026, "in_stock": true, "low_stock": false },
{ "exam_year": 2025, "in_stock": false, "low_stock": false }
]
},
{ "exam_type": "BECE", "unit_price": 6, "pricing_tiers": [ ... ], "years": [ ... ] }
],
"afa_registration": { "fee": 18, "available": true }
}
}
The unit price is chosen by the quantity of the whole order: 20 WASSCE vouchers in one order are all priced at the 10–50 tier.
Buy result checker vouchers. PINs are returned immediately. Requires an Idempotency-Key header.
| Field | Type | Description |
|---|---|---|
exam_typerequired | string | WASSCE or BECE |
exam_yearrequired | integer | For example 2026. Must be a year shown as in_stock in /products. |
quantityrequired | integer | 1 up to your max_vouchers_per_order (100 by default). |
customer_phoneoptional | string | Ghana mobile number. If sent, we also SMS the PINs to your customer at no extra cost. Formats 0241234567 or +233241234567. |
client_referenceoptional | string | Your own order ID, up to 64 characters of letters, digits and _ - : . /. Returned on the order and in webhooks. |
POST /api/v1/checkers/orders
Authorization: Bearer est_live_...
Content-Type: application/json
Idempotency-Key: 6f1c2a8e-5b7d-4f0e-9a3c-1d2e3f4a5b6c
{
"exam_type": "WASSCE",
"exam_year": 2026,
"quantity": 2,
"customer_phone": "0241234567",
"client_reference": "order-1001"
}
{
"success": true,
"data": {
"reference": "API-CHK-MH8K2Q1Z4F2A",
"client_reference": "order-1001",
"mode": "live",
"status": "completed",
"exam_type": "WASSCE",
"exam_year": 2026,
"quantity": 2,
"unit_price": 16,
"total_amount": 32,
"currency": "GHS",
"vouchers": [
{ "serial": "WRC26019938", "pin": "438812907745" },
{ "serial": "WRC26019939", "pin": "905527613380" }
],
"customer_phone": "0241234567",
"created_at": "2026-11-10T09:30:00.000Z",
"sms": { "requested": true, "sent": true },
"balance_after": 450.5
}
}
Common errors: INSUFFICIENT_BALANCE, OUT_OF_STOCK, VALIDATION_ERROR. SMS delivery is best-effort; sms.sent: false does not affect the order, and the PINs in the response are always the source of truth.
Fetch a checker order and its PINs again, for example to re-send them to your customer. The response has the same shape as the create response, without sms and balance_after.
curl https://eduflextech.com/api/v1/checkers/orders/API-CHK-MH8K2Q1Z4F2A \ -H "Authorization: Bearer est_live_YOUR_KEY"
Submit an MTN AFA registration. Returns 202 Accepted with status pending; the outcome usually arrives within minutes. Requires an Idempotency-Key header.
| Field | Type | Description |
|---|---|---|
full_namerequired | string | As on the Ghana Card. Letters, spaces, hyphens, apostrophes and periods, up to 100 characters. |
phonerequired | string | The MTN number to register, 0241234567 or +233241234567. |
id_numberrequired | string | Ghana Card number, for example GHA-123456789-0. |
date_of_birthrequired | string | YYYY-MM-DD, for example 2005-04-16. |
townrequired | string | Town of residence, up to 60 characters. |
occupationrequired | string | Up to 60 characters, for example Student. |
client_referenceoptional | string | Your own ID for this registration. |
{
"full_name": "Ama Serwaa Mensah",
"phone": "0241234567",
"id_number": "GHA-123456789-0",
"date_of_birth": "2005-04-16",
"town": "Kumasi",
"occupation": "Student",
"client_reference": "afa-2002"
}
{
"success": true,
"data": {
"reference": "API-AFA-MH8K5R2B9C1D",
"client_reference": "afa-2002",
"mode": "live",
"status": "pending",
"phone": "0241234567",
"fee": 18,
"currency": "GHS",
"created_at": "2026-11-10T09:31:00.000Z",
"updated_at": "2026-11-10T09:31:00.000Z",
"balance_after": 432.5
}
}
Current status of a registration: pending, completed or failed. Prefer webhooks; if you poll, do so no more than once a minute.
Your wallet ledger, newest first: top-ups, API orders and dashboard purchases. Use it for reconciliation.
| Query | Description |
|---|---|
limit | 1 to 100, default 20. |
cursor | The next_cursor from the previous page. |
{
"success": true,
"data": {
"transactions": [
{ "reference": "API-CHK-MH8K2Q1Z4F2A", "type": "debit", "service": "WASSCE", "amount": 32,
"currency": "GHS", "status": "success", "channel": "api", "created_at": "2026-11-10T09:30:00+00:00" }
],
"has_more": true,
"next_cursor": "MjAyNi0xMS0xMFQwOTozMDowMCswMDowMA"
}
}
Your webhook URL and the last 20 delivery attempts with their HTTP results.
Set the URL we send events to. It must be https:// and publicly reachable. The first time, and whenever you send "rotate_secret": true, the response contains your signing secret. Store it; it is not shown again.
{ "url": "https://yourdomain.com/webhooks/eduflextech", "rotate_secret": false }
Stop sending webhooks.
Queue a webhook.test event to your URL, to check your receiver and signature code.
You can do all of this from Developer API in your dashboard too.
Webhooks
When something happens that you did not directly ask for, such as an AFA registration finishing, we send an HTTPS POST to your webhook URL within about a minute.
| Event | When |
|---|---|
afa.registration.completed | An AFA registration was successful. |
afa.registration.failed | An AFA registration was rejected. Our team reviews the charge. |
webhook.test | You asked for a test event. |
POST /webhooks/eduflextech HTTP/1.1
Content-Type: application/json
User-Agent: EduFlexTech-Webhooks/1
X-EST-Event: afa.registration.completed
X-EST-Delivery: 3f0c9a1e-2b5d-4c8e-9f7a-6d1e2c3b4a59
X-EST-Signature: t=1762767060,v1=5c1f0a...e9b2
{
"id": "evt_8f14e45fceea167a5a36dedd4bea2543",
"type": "afa.registration.completed",
"created_at": "2026-11-10T09:34:12Z",
"mode": "live",
"data": {
"reference": "API-AFA-MH8K5R2B9C1D",
"client_reference": "afa-2002",
"status": "completed",
"phone": "0241234567"
}
}
- Respond with any 2xx within 10 seconds. Do slow work after responding.
- Retries: if we don't get a 2xx, we retry after 1 min, 5 min, 15 min, 1 h, 3 h, 6 h and 12 h, then stop. You can always fall back to
GET /afa/registrations/{reference}. - Duplicates are possible. Use the event
idto ignore events you have already processed. - Order is not guaranteed. Trust the
statusfield, not the arrival order.
Verify signatures
Always verify X-EST-Signature before trusting a webhook. It contains a unix timestamp t and v1, the hex HMAC-SHA256 of "{t}.{raw request body}" using your webhook secret. Use the raw body bytes exactly as received, before any JSON parsing, and reject timestamps older than 5 minutes to stop replays.
Node.js (Express)
const crypto = require('crypto');
const express = require('express');
const app = express();
app.post('/webhooks/eduflextech', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('X-EST-Signature') || '';
const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
const expected = crypto.createHmac('sha256', process.env.EST_WEBHOOK_SECRET)
.update(`${parts.t}.${req.body}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
const valid = parts.v1 && parts.v1.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
if (!fresh || !valid) return res.status(400).send('bad signature');
const event = JSON.parse(req.body);
res.sendStatus(200); // acknowledge first
handleEvent(event); // then do your work (dedupe on event.id)
});PHP
<?php
$payload = file_get_contents('php://input');
$header = $_SERVER['HTTP_X_EST_SIGNATURE'] ?? '';
parse_str(str_replace(',', '&', $header), $parts);
$expected = hash_hmac('sha256', $parts['t'] . '.' . $payload, getenv('EST_WEBHOOK_SECRET'));
$fresh = abs(time() - (int)$parts['t']) < 300;
if (!$fresh || !hash_equals($expected, $parts['v1'] ?? '')) {
http_response_code(400);
exit('bad signature');
}
$event = json_decode($payload, true);
http_response_code(200);
// handle $event['type'] / $event['data'] (dedupe on $event['id'])Python (Flask)
import hmac, hashlib, os, time
from flask import Flask, request, abort
app = Flask(__name__)
@app.post('/webhooks/eduflextech')
def eduflextech_webhook():
payload = request.get_data() # raw bytes
parts = dict(p.split('=', 1) for p in request.headers.get('X-EST-Signature', '').split(',') if '=' in p)
expected = hmac.new(os.environ['EST_WEBHOOK_SECRET'].encode(),
f"{parts.get('t', '')}.".encode() + payload, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts.get('t', 0))) < 300
if not fresh or not hmac.compare_digest(expected, parts.get('v1', '')):
abort(400)
event = request.get_json()
# handle event['type'] / event['data'] (dedupe on event['id'])
return '', 200Full examples
Buying vouchers with safe retries. Each example stores the idempotency key with the order, retries on network errors and 5xx responses, and stops on business errors.
Node.js (18+, built-in fetch)
const crypto = require('crypto');
const BASE = 'https://eduflextech.com/api/v1';
const KEY = process.env.EST_API_KEY; // est_live_... or est_test_...
async function buyCheckers({ examType, examYear, quantity, customerPhone, orderId }) {
const idempotencyKey = crypto.randomUUID(); // save with your order before calling
for (let attempt = 1; attempt <= 4; attempt++) {
try {
const res = await fetch(`${BASE}/checkers/orders`, {
method: 'POST',
headers: {
Authorization: `Bearer ${KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': idempotencyKey,
},
body: JSON.stringify({
exam_type: examType, exam_year: examYear, quantity,
customer_phone: customerPhone, client_reference: orderId,
}),
signal: AbortSignal.timeout(30000),
});
const body = await res.json();
if (body.success) return body.data; // data.vouchers = [{ serial, pin }]
const retryable = res.status >= 500 || ['RATE_LIMITED', 'REQUEST_IN_PROGRESS'].includes(body.error.code);
if (!retryable) throw Object.assign(new Error(body.error.message), { code: body.error.code });
const wait = Number(res.headers.get('Retry-After')) || 2 ** attempt;
await new Promise(r => setTimeout(r, wait * 1000));
} catch (err) {
if (err.code) throw err; // business error: don't retry
await new Promise(r => setTimeout(r, 2 ** attempt * 1000)); // network error: retry, same key
}
}
throw new Error('EduFlexTech API unavailable, retry later with the same idempotency key');
}PHP (cURL)
<?php
function est_request(string $method, string $path, ?array $body = null, ?string $idemKey = null): array {
$headers = ['Authorization: Bearer ' . getenv('EST_API_KEY'), 'Content-Type: application/json'];
if ($idemKey) $headers[] = 'Idempotency-Key: ' . $idemKey;
$ch = curl_init('https://eduflextech.com/api/v1' . $path);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_POSTFIELDS => $body ? json_encode($body) : null,
]);
$raw = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return [$status, $raw === false ? null : json_decode($raw, true)];
}
$idemKey = bin2hex(random_bytes(16)); // save with your order first
[$status, $res] = est_request('POST', '/checkers/orders', [
'exam_type' => 'BECE', 'exam_year' => 2026, 'quantity' => 1,
'customer_phone' => '0241234567', 'client_reference' => 'order-1002',
], $idemKey);
if ($res && $res['success']) {
foreach ($res['data']['vouchers'] as $v) echo $v['serial'], ' ', $v['pin'], PHP_EOL;
} elseif ($res === null || $status >= 500) {
// network or server error: retry later with the SAME $idemKey
} else {
echo $res['error']['code'], ': ', $res['error']['message'];
}Python (requests)
import os, time, uuid, requests
BASE = 'https://eduflextech.com/api/v1'
HEADERS = {'Authorization': f"Bearer {os.environ['EST_API_KEY']}"}
def register_afa(applicant: dict, order_id: str) -> dict:
idem = str(uuid.uuid4()) # save with your order first
for attempt in range(1, 5):
try:
r = requests.post(f'{BASE}/afa/registrations', timeout=30,
headers={**HEADERS, 'Idempotency-Key': idem},
json={**applicant, 'client_reference': order_id})
body = r.json()
if body['success']:
return body['data'] # status 'pending'; result comes by webhook
if r.status_code < 500 and body['error']['code'] not in ('RATE_LIMITED', 'REQUEST_IN_PROGRESS'):
raise ValueError(f"{body['error']['code']}: {body['error']['message']}")
time.sleep(int(r.headers.get('Retry-After', 2 ** attempt)))
except requests.RequestException:
time.sleep(2 ** attempt) # network error: retry with the same key
raise RuntimeError('API unavailable, retry later with the same idempotency key')
register_afa({'full_name': 'Ama Serwaa Mensah', 'phone': '0241234567', 'id_number': 'GHA-123456789-0',
'date_of_birth': '2005-04-16', 'town': 'Kumasi', 'occupation': 'Student'}, 'afa-2002')Import openapi.json into Postman, Insomnia or any OpenAPI code generator to get a ready-made collection or client.
Go-live checklist
- Your account shows Approved in Developer API, and you have created a live key.
- The live key is stored in a server environment variable, never in front-end code or source control.
- Every paid request sends an
Idempotency-Keythat is saved with your order before the call. - You handle
INSUFFICIENT_BALANCE,OUT_OF_STOCKandVALIDATION_ERRORwith clear messages to your customers. - Your webhook receiver verifies signatures, responds 2xx quickly, and ignores duplicate event IDs.
- You keep enough wallet balance for your expected sales, and you check
balance_after. - Optional: your server IPs are on the IP allowlist.
Support & changelog
For help, contact EduFlexTech support from your dashboard or on WhatsApp, and include the request_id or order reference. Service health: GET https://eduflextech.com/api/v1/health needs no key.
| Date | Change |
|---|---|
| November 2026 | v1 released: account, products, checker orders, AFA registrations, transactions, webhooks, sandbox. |