The home location register (HLR) is a central database that contains details of each mobile phone subscriber connected to the global mobile network. You can use this API to validate that a mobile number is live and registered on a mobile network in real-time.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Look up the mobile operator and available circle information for a mobile number.
Endpoint
POST https://pay2new.in/apis/offer/v1/hlr
Headers
| Header | Required | Value / description |
|---|---|---|
secret | Yes | Your Pay2New API secret. Keep it on your server. |
Content-Type | Yes for JSON requests | application/json |
Accept | Optional | application/json |
Authentication
Use an active Pay2New partner account with verified KYC, an active wallet and API access. Send requests from your registered IP address. Enable the relevant service where applicable; offer services may also require an active plan.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
number | string | Yes | Mobile, subscriber or bill account number for the selected product. |
request_id | string | Yes | Unique client reference for this request. Store it for reconciliation and support. Minimum 8 characters. |
Request example
Illustrative values
All identifiers, identity data, amounts and IP addresses in these examples are synthetic. Replace the secret, product/customer references and sample inputs with the values for your integration before sending a request.
curl --request POST \
--url 'https://pay2new.in/apis/offer/v1/hlr' \
--header 'secret: <YOUR_PAY2NEW_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
"number": "9999999999",
"request_id": "EXAMPLE202609260001"
}'
Response fields
| Field | Type | Description |
|---|---|---|
status | integer | 1: successful operation; 2: failed/rejected operation; 3: pending or indeterminate where returned. |
message | string | Human-readable result or error message. |
data | object | product_code and product_name; circle_code and circle_name when available. |
Response example
{
"status": 1,
"message": "Transaction Successful!",
"data": {
"product_code": "1",
"product_name": "Example operator",
"circle_code": "1",
"circle_name": "Example circle"
}
}
Integration notes
Circle information may be unavailable for some numbers. Results may be served from previously obtained operator information; do not treat this lookup as an account-ownership verification.
Errors
Application failures return status: 2 and a message. Invalid fields can also be identified in an errors object. Authentication, IP registration, service access and product availability can prevent processing. Other response fields may be absent when processing fails before a transaction is created. Evaluate the JSON result even when the HTTP request completes successfully. Preserve your request and order references when an outcome is pending or indeterminate.
{
"status": 2,
"message": "Invalid Parameters",
"errors": {
"number": "Illustrative field validation message"
}
}
