Reseller API · v1

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.

Base URLhttps://eduflextech.com/api/v1

Overview

You are the shop; we are the supplier. Your customers never deal with us directly. The flow is always the same:

  1. Fund your wallet from your EduFlexTech dashboard, using the normal Paystack top-up.
  2. Call the API from your server when your customer buys. We charge your wallet at your reseller price.
  3. 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.

Server-side only. The API sends no CORS headers, so browsers refuse to call it. Always call it from your backend and keep your key in an environment variable. A key placed in web page or mobile-app code can be extracted and used to spend your wallet.

Quickstart

  1. Create an account at eduflextech.com and open Developer API in your dashboard.
  2. 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.
  3. Create a sandbox key. It starts with est_test_. Copy it straight away, because it is shown only once.
  4. Make your first call:
    curl https://eduflextech.com/api/v1/account \
      -H "Authorization: Bearer est_test_YOUR_KEY"
  5. 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 prefixModeWhat it does
est_test_SandboxFull 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_LiveReal 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.

ScopeAllows
readAccount, products, orders, transactions, webhook settings. Always included.
checkersPOST /checkers/orders
afaPOST /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 pending and become completed 30 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_referenceResult
simulate_insufficient_balance402 INSUFFICIENT_BALANCE on checker orders and AFA registrations
simulate_out_of_stock409 OUT_OF_STOCK on checker orders
simulate_failureAFA 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
{
  "success": true,
  "data": { ... }
}
Error
{
  "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-Id header. 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.

HTTPcodeMeaning and what to do
401UNAUTHORIZEDKey missing, malformed or unknown. Check the header.
401KEY_REVOKEDThe key was revoked. Create a new one.
403ACCOUNT_NOT_ACTIVEAccount awaiting approval (live keys only), suspended, or rejected.
403FORBIDDEN_SCOPEThe key lacks the scope this endpoint needs.
403IP_NOT_ALLOWEDYour server's IP is not on the account's allowlist.
400IDEMPOTENCY_KEY_REQUIREDA paid request was sent without an Idempotency-Key header.
402INSUFFICIENT_BALANCEWallet too low. details.required and details.balance say by how much. Nothing was charged. Top up and retry, even with the same idempotency key.
404NOT_FOUNDUnknown endpoint, or no order with that reference for this key's mode.
405METHOD_NOT_ALLOWEDWrong HTTP method. The Allow header lists the right ones.
409OUT_OF_STOCKNot 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.
409REQUEST_IN_PROGRESSThe same idempotency key is still being processed. Wait for Retry-After seconds and retry.
422VALIDATION_ERRORBad input. details.fields lists every problem at once.
422IDEMPOTENCY_KEY_REUSEDThe idempotency key was already used for a different request. Use a new key per order.
429RATE_LIMITEDToo many requests. Wait for Retry-After seconds.
500INTERNAL_ERROROur 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.
503SERVICE_UNAVAILABLEA 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.
Rule of thumb: one idempotency key per customer purchase. Retry with the same key for as long as you are unsure whether it went through.

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 /products returns 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_after in 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

GET/accountread

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
  }
}
GET/productsread

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.

POST/checkers/orderscheckers

Buy result checker vouchers. PINs are returned immediately. Requires an Idempotency-Key header.

FieldTypeDescription
exam_typerequiredstringWASSCE or BECE
exam_yearrequiredintegerFor example 2026. Must be a year shown as in_stock in /products.
quantityrequiredinteger1 up to your max_vouchers_per_order (100 by default).
customer_phoneoptionalstringGhana mobile number. If sent, we also SMS the PINs to your customer at no extra cost. Formats 0241234567 or +233241234567.
client_referenceoptionalstringYour 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"
}
201 Created
{
  "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.

GET/checkers/orders/{reference}read

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"
POST/afa/registrationsafa

Submit an MTN AFA registration. Returns 202 Accepted with status pending; the outcome usually arrives within minutes. Requires an Idempotency-Key header.

FieldTypeDescription
full_namerequiredstringAs on the Ghana Card. Letters, spaces, hyphens, apostrophes and periods, up to 100 characters.
phonerequiredstringThe MTN number to register, 0241234567 or +233241234567.
id_numberrequiredstringGhana Card number, for example GHA-123456789-0.
date_of_birthrequiredstringYYYY-MM-DD, for example 2005-04-16.
townrequiredstringTown of residence, up to 60 characters.
occupationrequiredstringUp to 60 characters, for example Student.
client_referenceoptionalstringYour 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"
}
202 Accepted
{
  "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
  }
}
GET/afa/registrations/{reference}read

Current status of a registration: pending, completed or failed. Prefer webhooks; if you poll, do so no more than once a minute.

GET/transactionsread

Your wallet ledger, newest first: top-ups, API orders and dashboard purchases. Use it for reconciliation.

QueryDescription
limit1 to 100, default 20.
cursorThe 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"
  }
}
GET/webhookread

Your webhook URL and the last 20 delivery attempts with their HTTP results.

PUT/webhookread

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 }
DELETE/webhookread

Stop sending webhooks.

POST/webhook/testread

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.

EventWhen
afa.registration.completedAn AFA registration was successful.
afa.registration.failedAn AFA registration was rejected. Our team reviews the charge.
webhook.testYou 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 id to ignore events you have already processed.
  • Order is not guaranteed. Trust the status field, 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 '', 200

Full 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-Key that is saved with your order before the call.
  • You handle INSUFFICIENT_BALANCE, OUT_OF_STOCK and VALIDATION_ERROR with 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.

DateChange
November 2026v1 released: account, products, checker orders, AFA registrations, transactions, webhooks, sandbox.