Service options
Operators, plans, and variants : the selectable catalogues behind a service.
Three endpoints resolve the options behind a service's select-* steps. All
are scoped by service country and re-check the customer's eligibility for that
country.
Operators
GET /v1/services/{serviceCode}/operators?country=NG
The operators behind a service: mobile networks for airtime/data,
distribution companies for electricity, TV providers for tv, exam bodies
for education, insurers for insurance. The catalogue is normalized across
fulfilment rails: one code + title per operator.
curl "https://api.ouipay.africa/v1/services/airtime/operators?country=NG" \
-H "Authorization: Bearer sk_test_..."{
"data": {
"service_code": "airtime",
"country_code": "NG",
"items": [
{
"code": "mtn",
"title": "MTN",
"service_code": "airtime",
"country": "NG"
},
{
"code": "airtel",
"title": "Airtel",
"service_code": "airtime",
"country": "NG"
}
]
}
}Pass the selected code as operator_code on plan listing, validation,
quote, and order calls. For the networks each market carries today, see
Supported networks.
Plans
GET /v1/services/{serviceCode}/plans?country=NG&operator=mtn
Fixed-price products for a service and operator: data bundles, TV bouquets, coverage tiers, exam PIN packages.
| Param | Type | Required | Notes |
|---|---|---|---|
country | query | yes | Service country |
operator | query | no | Operator code; required by most catalogues |
kind | query | no | plans (default), packages, or rates |
phone | query | no | Destination MSISDN when the catalogue prices per number |
account_ref | query | no | Customer reference when the catalogue prices per account |
curl "https://api.ouipay.africa/v1/services/data/plans?country=NG&operator=mtn" \
-H "Authorization: Bearer sk_test_..."{
"data": {
"service_code": "data",
"country_code": "NG",
"operator_code": "mtn",
"kind": "plans",
"presentation": {
"picker": "tabs",
"categories": ["daily", "weekly", "monthly"]
},
"items": [
{
"code": "mtn-1gb-daily",
"title": "1GB - 1 day",
"operator_code": "mtn",
"service_code": "data",
"country": "NG",
"amount_minor": 35000,
"currency": "NGN",
"validity": "1 day",
"category": "daily",
"pricing": "fixed"
}
]
}
}| Field | Type | Notes |
|---|---|---|
code | string | Pass as product_code on quote/order |
amount_minor | int | Fixed price; null when pricing is open |
validity | string | Normalized validity ("30 days") when the plan carries one |
category | string | daily, weekly, monthly, or others for tab grouping |
pricing | string | fixed (buy this plan) or open (collect an amount) |
presentation.picker is the server-owned render verdict: tabs for large
categorized catalogues, select otherwise. Render presentation.categories
as the tab order.
Open-amount services
Services with no plan step (airtime, and open-amount billers) return a
single synthetic plan: code: "open_amount", pricing: "open",
amount_minor: null. Treat it as a signal to collect provider_cost_minor
from the customer instead of choosing a fixed price.
Some catalogues price per destination (the same operator can return different
bundles per phone number). When a definition's plan step appears before the
recipient input, pass phone or account_ref once collected to refresh the
list.
Variants
GET /v1/services/{serviceCode}/variants?country=NG
Country-configured variants for a service, most commonly meter type on
electricity (prepaid, postpaid). Variants are platform configuration,
not a vendor catalogue: a country whose rail has no metered billing returns an
empty list, and the definition drops its select-variant step.
{
"data": {
"service_code": "electricity",
"country_code": "NG",
"items": [
{ "code": "prepaid", "title": "Prepaid" },
{ "code": "postpaid", "title": "Postpaid" }
]
}
}Pass the selected code as meter_type on validate, quote, and order calls.
Errors
| HTTP | error.code | Cause |
|---|---|---|
| 400 | VALIDATION | Missing country or required operator |
| 403 | SERVICE_COUNTRY_NOT_ELIGIBLE | Country not eligible for this account |
| 422 | SERVICE_UNAVAILABLE | Service not offered in the requested country |
| 502 | PROVIDER_FAILURE | Live catalogue could not be retrieved; retry |