Skip to main content

Overview

The first step in integrating mobile top-ups is to fetch the list of available plans from the API. Plans include all operators (Mobilis, Djezzy, Ooredoo, Pixx) with both dynamic and fixed amount options.
Plans are stable and rarely change. Cache them in your database to reduce API calls and improve performance.

API Reference

View complete API documentation for the GET /v3/mobile/plans endpoint

Understanding Plan Types

Dynamic Plans

Dynamic plans allow variable amounts within a min/max range:
Use cases:
  • Prepaid top-ups (credit)
  • Postpaid bill payments (facture)
  • International calling credit

Fixed Plans

Fixed plans have predetermined amounts:
Use cases:
  • Special promotional offers
  • Data packs
  • Service activations

GetMenu Plans

Special plans that retrieve available offers for a specific number:
Returns: Array of suggested_offers with all available plans for that specific number.

Fetching Plans from API

Basic Request

Response Structure

Understanding the Cost Field

The cost field represents your wholesale price multiplier:
Example: cost = 0.98For a 1000 DZD top-up:
  • Face value: 1000 DZD (what user receives)
  • Your cost: 1000 × 0.98 = 980 DZD (what you pay)
  • Your margin: 1000 - 980 = 20 DZD (2%)

Caching Plans in Database

Since plans rarely change, cache them locally with your pricing:

Database Schema

Sync Function

Serving Plans to Users

When users request plans, serve from your database with your pricing:

Filtering Plans

By Operator

By Phone Number

Best Practices

Always cache plans in your database. Plans rarely change, and caching dramatically improves performance.
Never expose the cost field to end users. Only show your retail pricing.
Set up a daily cron job to sync plans. This ensures you have the latest offerings and availability.
Always verify isEnabled before displaying plans. Disabled plans may be temporarily unavailable due to operator issues.
Calculate your selling price by adding a reasonable profit margin (typically 3-10%) to the wholesale cost.
Create indexes on frequently queried fields (operator, code, isEnabled) for fast lookups.

Next Steps

Step 2: Validation

Learn how to validate phone numbers and user inputs

Plans API Reference

Complete API documentation for GET /v3/mobile/plans

Account Balance API

Learn how to check your account balance

Pricing Guide

Understand API pricing and cost structure

Response Format

Learn about API response structures

Models Reference

View all data models and schemas