List Providers by Type

LIVE
Endpoint

Send a GET request with the desired service type in the URL path.

Production URL
https://pairgate.com/api/v1/providers/{type}
Method GET
Test Endpoint
https://pairgate.com/api/v1/test/providers/{type}
Authentication

This request requires a valid Bearer token.

Header Value Description
Authorization
Bearer {token}
Your unique API authorization token
Path Parameters

Replace {type} in the URL with one of the supported service types.

Parameter Type Required Description
type string Yes One of: data, airtime, tv, electricity, education, bet
Code Examples

Choose your preferred language below. Example shows fetching airtime providers. Replace {type} and YOUR_API_KEY with your actual values.

PHP (Laravel)
// Get Providers by Type
$type = 'airtime'; // data, airtime, tv, electricity, education, bet

$response = Http::withHeaders([
    'Authorization' => 'Bearer YOUR_API_KEY',
    'Cache-Control' => 'no-cache',
])->get('https://pairgate.com/api/v1/providers/' . $type);

$result = $response->json();

dd($result);
cURL
curl -X GET "https://pairgate.com/api/v1/providers/airtime" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Cache-Control: no-cache"
Node.js
const axios = require('axios');

const getProvidersByType = async (type) => {
    try {
        const response = await axios.get(
            `https://pairgate.com/api/v1/providers/${type}`,
            {
                headers: {
                    'Authorization': 'Bearer YOUR_API_KEY',
                    'Cache-Control': 'no-cache'
                }
            }
        );
        
        console.log(response.data);
    } catch (error) {
        console.error(error.response?.data || error.message);
    }
};

// Example: get airtime providers
getProvidersByType('airtime');
Python
import requests

def get_providers_by_type(provider_type):
    url = f"https://pairgate.com/api/v1/providers/{provider_type}"
    
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Cache-Control": "no-cache"
    }
    
    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()
        data = response.json()
        print(data)
        return data
    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")

# Example: get airtime providers
get_providers_by_type("airtime")
Java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ProvidersByType {
    public static void main(String[] args) {
        String type = "airtime"; // data, airtime, tv, electricity, education, bet
        
        HttpClient client = HttpClient.newHttpClient();
        
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://pairgate.com/api/v1/providers/" + type))
            .header("Authorization", "Bearer YOUR_API_KEY")
            .header("Cache-Control", "no-cache")
            .GET()
            .build();
        
        try {
            HttpResponse response = client.send(request, 
                HttpResponse.BodyHandlers.ofString());
            
            System.out.println(response.body());
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}
Valid Provider Types
data

Data bundle providers

airtime

Airtime top-up providers

tv

Cable TV providers

electricity

Electricity distribution companies

education

Exam bodies

bet

Betting platforms

Response Format

A successful request returns a 200 status. Response fields vary slightly by provider type.

Success Response — data, airtime, tv
{
  "code": 200,
  "status": "success",
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "MTN"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "name": "Airtel"
    }
  ]
}
Success Response — electricity, education, bet
{
  "code": 200,
  "status": "success",
  "data": [
    {
      "id": "231fd51d-4e06-11f1-b9ca-98e8d4b7dfa9",
      "name": "Ikeja Electricity - IKEDC (PHCN)",
      "slug": "ikedc"
    }
  ]
}
Response Fields
Field Type Description
id string Provider UUID
name string Provider display name
slug string Short identifier for purchase requests (electricity, education, bet only)
Error Responses

The following errors may occur when calling this endpoint.

Status Code Description
422 Invalid provider type The type provided does not match any available category
401 Missing API key No Bearer token provided
401 Invalid API key Token does not match any active key
403 Suspended API key or account has been suspended
429 Rate limited Too many requests