VICKYCONNECT DEVELOPERS

Developer API

Integrate airtime, data, cable TV, electricity, betting, examination PINs and recharge PINs into your own application using one authenticated API.

1. API overview

All requests use the same base URL and JSON response format. Your API key determines whether a request runs in Sandbox or Live mode. You do not need a separate sandbox domain.

https://peru-tiger-484375.hostingersite.com/api/v1
Sandbox key

Starts with vt_test_. Purchases and account verifications are simulated. No live provider request is made, no real wallet is debited, and generated PINs or tokens are test values.

Live key

Starts with vt_live_. Purchases use your QuickTopUp wallet and the active upstream provider. Real products are delivered when the provider confirms success.

Important: Sandbox and Live keys are separate credentials. Use the matching key and secret pair together. Never use a Live key while testing.

2. Authentication

Send both headers with every request. Keep both values on your backend server. Do not place them in HTML, frontend JavaScript, mobile application source, or a public repository.

Authorization: Bearer YOUR_API_KEY
X-API-Secret: YOUR_API_SECRET
Accept: application/json
Content-Type: application/json

API access requires a verified QuickTopUp account. Live keys can also be restricted to approved server IP addresses from the Developer dashboard. The API limit is 120 requests per minute per credential.

The API secret is displayed only when generated or reset. Store it securely. If it is lost, reset the secret from the dashboard and update your application.

3. Quick start with PHP

Set VICKY_API_KEY and VICKY_API_SECRET as server environment variables. Replace the base URL with your QuickTopUp domain.

PHP cURL helper, health check, balance and service catalogue
<?php
// Run this on your backend server. Never expose the secret in browser JavaScript.
$apiKey = getenv('VICKY_API_KEY');
$apiSecret = getenv('VICKY_API_SECRET');
$baseUrl = 'https://peru-tiger-484375.hostingersite.com/api/v1';

function vickyRequest(string $method, string $path, ?array $body = null): array {
    global $apiKey, $apiSecret, $baseUrl;
    $url = rtrim($baseUrl, '/') . $path;
    if ($method === 'GET' && $body) {
        $url .= '?' . http_build_query($body);
    }
    $headers = [
        'Authorization: Bearer ' . $apiKey,
        'X-API-Secret: ' . $apiSecret,
        'Accept: application/json',
    ];
    if ($method === 'POST') $headers[] = 'Content-Type: application/json';
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CUSTOMREQUEST => $method,
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 45,
    ]);
    if ($method === 'POST') curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body ?? []));
    $raw = curl_exec($ch);
    if ($raw === false) throw new RuntimeException(curl_error($ch));
    $http = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
    curl_close($ch);
    $json = json_decode($raw, true);
    if (!is_array($json)) throw new RuntimeException('QuickTopUp returned invalid JSON. HTTP ' . $http);
    return ['http_code' => $http, 'response' => $json];
}

// 1. Confirm that the credentials work.
$result = vickyRequest('GET', '/health');
print_r($result);

// 2. Check the wallet balance.
$balance = vickyRequest('GET', '/balance');
print_r($balance);

// 3. Retrieve all enabled services and their service_id values.
$services = vickyRequest('GET', '/services');
print_r($services);

Start by calling GET /health, then GET /balance, and then GET /services. Use the returned service_id for product-based purchases.

4. Sandbox and Live behaviour

OperationSandbox keyLive key
Health checkAuthenticates and reports sandbox modeAuthenticates and reports live mode
BalanceReturns a simulated balance of ₦0.00Returns your actual QuickTopUp wallet balance
Service catalogueLists enabled, non-maintenance catalogue items and test pricesLists services currently available for live transactions
Account verificationReturns a sample customer nameChecks the account with the configured provider
PurchaseReturns a stored simulated result and test PINs where applicableDebits your wallet and submits the purchase to the configured provider
Transaction lookupLooks up stored sandbox transactions onlyLooks up your live API transactions only
WebhookNot sentSigned transaction events are sent to your saved webhook URL

Sandbox references are saved separately from live transactions. Reusing the same client reference with the same request returns the original sandbox result. Reusing it with different request details returns HTTP 409. Sandbox activity never changes the live wallet or calls the upstream provider.

5. Endpoint reference

All paths below are appended to the base URL. Send JSON request bodies for POST endpoints. GET parameters belong in the query string.

MethodEndpointPurposeParameters
GET/healthConfirm authentication and identify the key mode.No body.
GET/balanceCheck your QuickTopUp wallet balance.No body.
GET/servicesRetrieve every enabled service and product available to your account. Optional query: category.No body. Optional query: ?category=data
POST/airtimePurchase airtime.network, amount, phone, reference
POST/dataPurchase a data plan using a service_id from the catalogue.service_id, phone, reference
POST/cable/verifyValidate a cable smartcard or IUC number.service_id, smartcard
POST/cablePurchase a cable TV package.service_id, smartcard, reference
POST/electricity/verifyValidate a prepaid or postpaid meter.service_id, meter_number, meter_type
POST/electricityPurchase electricity units.service_id, meter_number, meter_type, amount, reference
POST/betting/verifyValidate a betting customer account.service_id, customer_id
POST/bettingFund a betting wallet.service_id, customer_id, amount, reference
POST/exam-pinsPurchase examination PINs.service_id, quantity, reference
POST/recharge-pinsPurchase recharge card PINs.service_id, quantity, reference
GET/transactionRetrieve an order by reference or client_reference.Query: ?reference=... or ?client_reference=...

6. Service catalogue

Call GET /services to retrieve the catalogue. To filter it, use a category query parameter, for example GET /services?category=data.

Category names returned by the catalogue are:

airtime, data, tv, electricity, bet, education, and epin.

Each product includes a QuickTopUp service_id. Use that ID for data, cable, electricity, betting, examination PIN and recharge PIN requests. Do not send an upstream provider ID. Airtime uses the network code returned in the airtime catalogue.

Prices and discounts are calculated from your QuickTopUp account tier and the administrator's current pricing rules. Do not calculate or submit your own selling price. For airtime, send the face value in amount. The response reports the amount actually charged.

GET https://peru-tiger-484375.hostingersite.com/api/v1/services
GET https://peru-tiger-484375.hostingersite.com/api/v1/services?category=data

7. Purchase examples

Airtime
POST https://peru-tiger-484375.hostingersite.com/api/v1/airtime
{
  "network": "mtn",
  "amount": 100,
  "phone": "08012345678",
  "reference": "airtime-000001"
}
Data
POST https://peru-tiger-484375.hostingersite.com/api/v1/data
{
  "service_id": 123,
  "phone": "08012345678",
  "reference": "data-000001"
}

Use a real service_id returned by /services?category=data.

Cable TV
POST https://peru-tiger-484375.hostingersite.com/api/v1/cable/verify
{
  "service_id": 210,
  "smartcard": "12345678901"
}

POST https://peru-tiger-484375.hostingersite.com/api/v1/cable
{
  "service_id": 210,
  "smartcard": "12345678901",
  "reference": "cable-000001"
}
Electricity
POST https://peru-tiger-484375.hostingersite.com/api/v1/electricity/verify
{
  "service_id": 310,
  "meter_number": "1234567890123",
  "meter_type": "prepaid"
}

POST https://peru-tiger-484375.hostingersite.com/api/v1/electricity
{
  "service_id": 310,
  "meter_number": "1234567890123",
  "meter_type": "prepaid",
  "amount": 2000,
  "reference": "power-000001"
}

meter_type accepts prepaid, postpaid, 1, or 2.

Betting wallet
POST https://peru-tiger-484375.hostingersite.com/api/v1/betting/verify
{
  "service_id": 410,
  "customer_id": "CUSTOMER123"
}

POST https://peru-tiger-484375.hostingersite.com/api/v1/betting
{
  "service_id": 410,
  "customer_id": "CUSTOMER123",
  "amount": 2000,
  "reference": "bet-000001"
}
Examination PINs
POST https://peru-tiger-484375.hostingersite.com/api/v1/exam-pins
{
  "service_id": 510,
  "quantity": 1,
  "reference": "exam-000001"
}
Recharge card PINs
POST https://peru-tiger-484375.hostingersite.com/api/v1/recharge-pins
{
  "service_id": 610,
  "quantity": 2,
  "reference": "epin-000001"
}

The numeric service IDs above are examples only. Always retrieve the current IDs from your own service catalogue before making a purchase.

8. Response format and transaction status

Every API response is JSON with status, message, and data.

{
  "status": "success",
  "message": "Successful",
  "data": {
    "reference": "VTU260101120000AB12CD34",
    "client_reference": "airtime-000001",
    "service": "airtime",
    "product": "MTN airtime ₦100.00",
    "recipient": "08012345678",
    "amount": "98.60",
    "status": "successful",
    "created_at": "2026-01-01 12:00:00"
  }
}

Transaction status values are successful, pending, and failed. If a request returns pending, do not submit another purchase with a new reference. Check its status using:

GET https://peru-tiger-484375.hostingersite.com/api/v1/transaction?reference=YOUR_VICKYCONNECT_REFERENCE
GET https://peru-tiger-484375.hostingersite.com/api/v1/transaction?client_reference=YOUR_REFERENCE

Successful PIN purchases include a pins array in the transaction response. Failed live purchases are refunded automatically when the provider confirms failure. If the provider result is uncertain, the order may remain pending or require review.

9. References and duplicate protection

Every purchase must include a unique client reference containing 8 to 64 letters, numbers, underscores, or hyphens. Generate it on your server and save it before sending the purchase request.

Live requests use the client reference to prevent duplicate wallet deductions. Sandbox requests save the first simulated result and return it again when the same reference and request details are repeated. If the request details differ, sandbox returns HTTP 409.

On a network timeout, check the transaction using the original client reference before trying again. Never create a new reference just because your server did not receive the first response.

10. Webhooks for Live mode

Set a public HTTPS webhook URL in the Developer dashboard and create a webhook signing secret. QuickTopUp sends these events for Live API orders: transaction.successful, transaction.failed, and transaction.pending. Sandbox events are not sent.

Headers include X-QuickTopUp-Event, X-QuickTopUp-Event-Id, X-QuickTopUp-Timestamp, and X-QuickTopUp-Signature. The signature is HMAC-SHA256 of timestamp + "." + raw_request_body using your webhook signing secret.

<?php
$raw = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_VICKYCONNECT_TIMESTAMP'] ?? '';
$signature = $_SERVER['HTTP_X_VICKYCONNECT_SIGNATURE'] ?? '';
$secret = getenv('VICKY_WEBHOOK_SECRET');
$expected = hash_hmac('sha256', $timestamp . '.' . $raw, $secret);

if (!ctype_digit((string)$timestamp)
    || abs(time() - (int)$timestamp) > 300
    || !hash_equals($expected, $signature)) {
    http_response_code(401);
    exit;
}

$event = json_decode($raw, true);
// Store event_id and process it once. Return HTTP 2xx after safe acceptance.
http_response_code(200);

Use the raw request body for signature verification. Store each event_id and process it once because webhook deliveries may be repeated. PINs and tokens are not included in webhook payloads. Retrieve them through the transaction endpoint after confirming success. Failed deliveries are retried up to five times with increasing delays.

11. HTTP errors

HTTP codeMeaningWhat to do
400Malformed request or invalid JSON.Check the request body and content type.
401Missing or invalid API key or secret.Check that the key and secret belong to the same mode.
403IP restriction or account verification requirement.Check the allowed IP list and account verification status.
404Unknown endpoint or transaction.Check the path and transaction reference.
405Wrong HTTP method.Use the method shown in the endpoint reference.
409Sandbox reference reused with different request details.Use a new unique reference for a new test request.
422Invalid input, unavailable product, or insufficient live wallet balance.Read the response message and correct the request or fund the wallet.
429Rate limit reached.Wait before retrying.
503API or service is disabled or under maintenance.Retry after the administrator restores service.
500Unexpected server error.Check the transaction by the original reference before retrying.

12. Security checklist

  • Keep API keys and secrets on your backend only.
  • Use Sandbox credentials during development and Live credentials only after testing.
  • Restrict Live keys to your server IP addresses where possible.
  • Use HTTPS for all API and webhook traffic.
  • Generate a unique reference for every new purchase and keep it for reconciliation.
  • Verify webhook signatures and deduplicate event IDs.
  • Do not log API secrets, webhook secrets, PINs, tokens, or customer identity data.
  • Do not treat a timeout as a failed purchase. Check the original reference first.

For access to keys, the interactive sandbox tester, request logs, webhook delivery history, and IP restrictions, open your Developer dashboard.