All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 3s
92 lines
2.7 KiB
Markdown
92 lines
2.7 KiB
Markdown
# Ooredoo API Documentation
|
|
|
|
Reverse-engineered from traffic captures of the Ooredoo Quick Pay web service (`ooredoo.mv`).
|
|
|
|
---
|
|
|
|
## Overview
|
|
|
|
Ooredoo exposes a number-validation API used by their Quick Pay service to check mobile numbers before payment. It is a single unauthenticated GET request that returns the customer type for a given MSISDN.
|
|
|
|
The response determines which payment service to offer:
|
|
|
|
- **PRE** (prepaid) → Raastas top-up only
|
|
- **POST** (postpaid) → Ooredoo Bill Pay only
|
|
- **HYBRID** → both Raastas and Ooredoo Bill Pay (user must choose)
|
|
- No match → number is not an Ooredoo number
|
|
|
|
---
|
|
|
|
## Base URL
|
|
|
|
```
|
|
https://www.ooredoo.mv
|
|
```
|
|
|
|
---
|
|
|
|
## Authentication Model
|
|
|
|
No authentication required. The endpoint is publicly accessible.
|
|
|
|
---
|
|
|
|
## Common Request Headers
|
|
|
|
No special headers are required. Standard HTTP/HTTPS headers apply.
|
|
|
|
---
|
|
|
|
## Number Lookup Flow
|
|
|
|
```
|
|
Client Server
|
|
| |
|
|
| GET /ooredoo-prod/QuickPayPackage/v1/ |
|
|
| numberTypeValidation |
|
|
| ?action=cust_details |
|
|
| &msisdn=9607654321 |
|
|
|------------------------------------------->|
|
|
| { custType: "PRE" } |
|
|
|<-------------------------------------------|
|
|
```
|
|
|
|
---
|
|
|
|
## Result Interpretation
|
|
|
|
| `custType` | Meaning |
|
|
|---|---|
|
|
| `"PRE"` | Prepaid — offer **Raastas** top-up |
|
|
| `"POST"` | Postpaid — offer **Ooredoo Bill Pay** |
|
|
| `"HYBRID"` | Both prepaid and postpaid — offer both (user selects) |
|
|
| `null` / absent | Not an Ooredoo number |
|
|
|
|
---
|
|
|
|
## Applicable Numbers
|
|
|
|
Ooredoo numbers in the Maldives typically start with **9**, but due to **mobile number portability (MNP)**, a subscriber may have ported their number from Dhiraagu (originally a 7xxx number) to Ooredoo — or vice versa. The number prefix alone does not reliably identify the current provider.
|
|
|
|
For this reason, both providers should be tried when looking up an unknown number:
|
|
- If the number starts with **9**, try Ooredoo first; fall back to Dhiraagu if Ooredoo returns `custType: null`.
|
|
- If the number starts with **7**, try Dhiraagu first; fall back to Ooredoo if Dhiraagu returns a failed status.
|
|
|
|
The API expects the full MSISDN including country code `960` (e.g. `9609654321`). It only returns a valid `custType` for numbers currently on the Ooredoo network, regardless of what prefix they carry.
|
|
|
|
---
|
|
|
|
## Documents
|
|
|
|
| # | File | Description |
|
|
|---|---|---|
|
|
| 1 | [Number Validation](01-number-validation.md) | Validate an Ooredoo number and determine account type |
|
|
|
|
---
|
|
|
|
|
|
|
|
---
|
|
|
|
> **Next →** [Number Validation](01-number-validation.md)
|