Validate Phone Number
Internet Top-Ups
Validate Phone Number
Validate phone numbers before processing internet top-up
GET
Validate Phone Number
Overview
Validates phone numbers for ADSL or 4G services before submission. Helps prevent errors and reduces refund issues.Query Parameters
string
required
Service type:
ADSL or 4Gstring
required
Phone number to validate - ADSL:
0[0-9]{8} (e.g., 036362608) - 4G:
213[0-9]{9} (e.g., 213472731602)Response
Valid ADSL Number
Valid 4G Number
Invalid Number
The
message is written for the end user and can be shown as-is. ERR_PHONE covers all three cases: the number doesn’t exist at Algérie Télécom, it doesn’t match the type you sent, or AT is temporarily unreachable.Sandbox
With a sandbox key this endpoint answers from fixtures: no line is contacted at Algérie Télécom, no captcha is solved, and the response is instant. The number decides the answer:Sandbox: valid number
030000000 to exercise your ERR_PHONE path, and any other valid-format number for the success path. The same numbers carry over to Send Top-Up, where they also decide how the order’s status evolves.
Examples
Phone Number Formats
- ADSL
- 4G
Format:
0[0-9]{8} Valid Examples: - ✅ 036362608 - ✅
031417237 - ✅ 021123456 Invalid Examples: - ❌ 36362608 (missing
leading 0) - ❌ 0363626081 (too long) - ❌ 213636362608 (wrong format)Integration Example
Why Validate?
Reduce Errors
Catch invalid numbers before submission
Better UX
Show immediate feedback to users
Fewer Refunds
Minimize failed transactions and refunds
Verify Format
Ensure number matches service type
Best Practices
Client-Side Validation
Client-Side Validation
Validate format client-side first, then confirm with API:
Show Helpful Messages
Show Helpful Messages
Display clear messages when validation fails: - “Please enter a valid ADSL
number (e.g., 036362608)” - “4G numbers should start with 213 (e.g.,
213665983439)” - “Number format: 9 digits starting with 0”
Cache Validation Results
Cache Validation Results
Cache successful validations for a short period:
Related Endpoints
List Products
Get available cards
Send Top-Up
Purchase internet card

