Table of Contents
- Overview
- Authentication
- Rate Limiting
- Error Handling
- Endpoints
- Webhooks
- API Restrictions & Validations
Overview
Base URL:https://pro.chargily.net/api
Chargily Pro provides a RESTful API for managing mobile top-ups and digital voucher sales. The API supports multiple authentication methods and includes comprehensive validation middleware.
Key Features
- Mobile top-up operations (Ooredoo, Djezzy, Mobilis)
- Digital voucher/card sales
- Wallet & balance management
- Webhook notifications
- Multi-tenant support
- Sandbox mode for testing
Authentication
All API requests require authentication using an API Key. Header:Getting Your API Key
API keys are generated through your account dashboard. Each API key is unique and associated with your user account.Rate Limiting
- Limit: 2,400 requests per minute
- Applied to: All API routes
- Response on limit: HTTP 429 Too Many Requests
Error Handling
Standard Error Response
HTTP Status Codes
| Code | Meaning | Common Causes |
|---|---|---|
| 200 | OK | Successful GET request |
| 201 | Created | Successful POST request |
| 202 | Accepted | Request accepted for processing |
| 400 | Bad Request | Invalid request format |
| 401 | Unauthorized | Invalid/missing authentication |
| 402 | Payment Required | Insufficient balance |
| 403 | Forbidden | Mode inactive, permission denied |
| 404 | Not Found | Resource doesn’t exist |
| 409 | Conflict | Duplicate request |
| 410 | Gone | Subscription expired |
| 413 | Payload Too Large | Pending request exists (cooldown) |
| 422 | Unprocessable Entity | Validation failed |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
Endpoints
User Management Endpoints
Get User Balance
Returns current balance and bonus for authenticated user.balance: 150000= 1,500.00 DZDbonus: 5000= 50.00 DZD
Get All-Time User Bonus
Returns total bonus earned by user.Mobile Topup (flexy) Endpoints
Create Topup Request
Creates a new mobile top-up request.- API subscription active
- Operator valid
- Mode valid and active
- Request timestamp recent (less than 30 seconds)
- Sufficient balance
- No duplicate pending request (3-minute cooldown)
request_number: Required, unique identifier for your systemcustomer_name: Required, stringphone_number: Required, must match operator formatvalue: Required, integer, between 10 and 5000operator: Required, one of:ooredoo,djezzy,mobilismode: (Bundle) Required, valid mode for operator (e.g., “prepaid”, “postpaid”)country_code: Required (e.g., “DZ”)webhook_url: Required, valid URLcreated_at: Required, datetime, max 30 seconds old
Get Topup Request Status
Retrieves the status of a specific topup request.request_number(string): Your unique request identifier
pending: Awaiting processingsent: Successfully completedfailed: Operation failedrejected: Request rejectedexpired: Request timed out
Get All Sent Operations
Returns all successfully sent topup operations for the authenticated user.Check Existing Operations
Checks which request numbers exist in the system.Resend Webhook for Processing Requests
Triggers webhook resend for specific request numbers.Topup Configuration Endpoints
List Operators
Returns all active mobile operators.first_number: Array of valid phone number prefixesnumber_length: Array of valid phone number lengthsdiscount: Percentage discount for regular rechargesmode_discount: Percentage discount for mode-based recharges
List Modes
Returns all active recharge modes.mode: Name of the bundle (e.g., “PixX1000”, “Sama Mix”)value: Face value of the rechargeamount: Actual amount charged (including fees/discounts)discount: Percentage discount for this mode
Get Mode Details
Returns details for a specific mode.id(integer): Mode ID
Vouchers/Gift Cards Endpoints
List All Vouchers
Returns all available digital vouchers, gift and prepaid cards.value: Face value of the cardamount: Selling priceredeem: Where to redeem the cardout_of_stock: Boolean indicating availability
Get Voucher Details
Returns details for a specific voucher.id(integer): Voucher ID