add support to detect dhiraagu and ooredoo packages

This commit is contained in:
2026-05-17 00:25:48 +05:00
parent 93405aade2
commit ccc9e11d55
9 changed files with 781 additions and 3 deletions
+113
View File
@@ -0,0 +1,113 @@
# Number Validation
Validate an Ooredoo mobile number and determine its account type (prepaid, postpaid, or hybrid).
---
## Endpoint
```
GET https://www.ooredoo.mv/ooredoo-prod/QuickPayPackage/v1/numberTypeValidation
```
---
## Request
### Query Parameters
| Parameter | Value | Notes |
|---|---|---|
| `action` | `cust_details` | Always `cust_details` |
| `msisdn` | `9607654321` | Full MSISDN — country code `960` + 7-digit local number |
### curl Example
```bash
curl --request GET \
--url 'https://www.ooredoo.mv/ooredoo-prod/QuickPayPackage/v1/numberTypeValidation?action=cust_details&msisdn=9609654321'
```
---
## Responses
### Success — Prepaid
```json
{
"custType": "PRE",
"msisdn": "9609654321"
}
```
| Field | Type | Description |
|---|---|---|
| `custType` | `string` | `"PRE"` = prepaid customer |
| `msisdn` | `string` | The MSISDN that was queried |
→ Offer **Raastas** top-up only.
---
### Success — Postpaid
```json
{
"custType": "POST",
"msisdn": "9609123456"
}
```
→ Offer **Ooredoo Bill Pay** only.
---
### Success — Hybrid
```json
{
"custType": "HYBRID",
"msisdn": "9609789012"
}
```
→ Offer both **Raastas** and **Ooredoo Bill Pay**. The user must select which service to use.
---
### Failure — Number Not Found
```json
{
"custType": null,
"errorMessage": "Data Not Found",
"msisdn": "9609000000"
}
```
| Field | Type | Description |
|---|---|---|
| `custType` | `null` | Number is not an Ooredoo subscriber |
| `errorMessage` | `string` | `"Data Not Found"` |
Treat `custType: null` as unsupported — fall back to Dhiraagu lookup.
---
## Result Mapping
| `custType` | Service(s) |
|---|---|
| `"PRE"` | Raastas only |
| `"POST"` | Ooredoo Bill Pay only |
| `"HYBRID"` | Raastas + Ooredoo Bill Pay (show chip selector) |
| `null` / absent | Unsupported — fall back to Dhiraagu lookup |
---
 
---
[← README](README.md)
+85
View File
@@ -0,0 +1,85 @@
# 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
Only Ooredoo mobile numbers are returned by this API. Ooredoo numbers in the Maldives start with **9** (7-digit local format, e.g. `9654321`). The API expects the full MSISDN including country code `960`.
---
## Documents
| # | File | Description |
|---|---|---|
| 1 | [Number Validation](01-number-validation.md) | Validate an Ooredoo number and determine account type |
---
&nbsp;
---
> **Next →** [Number Validation](01-number-validation.md)