Files
basedbank/docs/fahipayapi/07-contacts.md
Shihaam Abdul Rahman 83499aed35
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 5s
add fahipay contact fetch docs
2026-05-17 16:40:51 +05:00

2.9 KiB

Saved Favourites (Contacts)

Fetch the authenticated user's saved favourites for Fahipay payment services. Each service group is fetched individually by page name.


Endpoint

GET https://fahipay.mv/api/app/favs/?page={serviceName}&lang=en

Prerequisites

  • Valid authID from login or OTP
  • Valid __Secure-sess session cookie

Request

Headers

Header Value
authid xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent okhttp/4.12.0
Accept-Encoding gzip
Connection Keep-Alive
Cookie __Secure-sess=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Query Parameters

Parameter Description
page Service group name — see table below
lang Language — always en

Service Groups

Call this endpoint once per service group:

page value Service Description
ooredooraastas Ooredoo Raastas Ooredoo mobile top-up
dhiraagureload Dhiraagu Reload Dhiraagu mobile top-up
ooredoobillpay Ooredoo Bill Ooredoo bill payment
dhiraagubillpay Dhiraagu Bill Dhiraagu bill payment

curl Example

curl --request GET \
  --url 'https://fahipay.mv/api/app/favs/?page=ooredooraastas&lang=en' \
  --compressed \
  --header 'Accept-Encoding: gzip' \
  --header 'Connection: Keep-Alive' \
  --header 'Cookie: __Secure-sess=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'User-Agent: okhttp/4.12.0' \
  --header 'authid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Response

With Entries

The top-level response is a JSON object. The key matching the page query parameter contains an object of saved entries, keyed by an arbitrary server-assigned string.

{
  "ooredooraastas": {
    "1": {
      "number": "9600000001",
      "name": "Ali"
    },
    "2": {
      "number": "7600000002",
      "name": "Mohamed"
    }
  }
}

Empty Group

When the user has no saved favourites for a service, the value for the page key is an empty array (not an object):

{
  "ooredooraastas": []
}

Parse with optJSONObject(page) — this returns null for the empty-array case, so empty groups are safely skipped.


Entry Object

Field Type Description
number string The saved phone number or account number
name string User-assigned display name for this favourite

Only entries where number is a valid 7-digit Maldivian mobile number (starting with 7 or 9) are used as transfer contacts.


Usage

Fetch all four service groups in sequence. For each group:

  1. Call GET /api/app/favs/?page={serviceName}&lang=en
  2. Check that response[serviceName] is a JSON object (not an array)
  3. Iterate keys; for each entry, validate number as a phone number
  4. Build a contact entry with the service group as the bank/category label

 


← Profile Picture