Check Number
API to check a prepaid phone number: which operator it belongs to, whether it is a registered subscriber of that operator, and (optionally) how many packages the subscriber can buy. This helps verify a customer's number before a transaction and reduces fail rates from wrong destination numbers.
Supported operators: Telkomsel (Simpati/Halo) and Smartfren. Both endpoints are served for isolated (IDSL-only) accounts — non-isolated accounts receive HTTP 404.
Path
| Method | Path |
|---|---|
| POST | api/check-number |
Package catalog
api/check-number answers whether the number has packages (has_package, package_count) but not
which ones. To list the packages themselves, use:
| Method | Path |
|---|---|
| POST | api/check-number-packages |
Request Body
| Attributes | Type | Description | Mandatory |
|---|---|---|---|
| customer_id | String | Subscriber number: 08… or 62… format | Yes |
| operator | String | Operator hint: telkomsel or smartfren | No |
| username | String | Your registered username | Yes |
| sign | String | Signature. Value: md5(username+api_key+cnp) | Yes |
Test Case
Use below test case in development environment only.
| customer_id | Response Status | Description |
|---|---|---|
| 081200000001 | 1 | Telkomsel subscriber with two packages |
| 088100000001 | 1 | Non-Smartfren number (not a Smartfren subscriber) |
| Other numbers | 1 | Default valid response |
Request Body
| Attributes | Type | Description | Mandatory |
|---|---|---|---|
| customer_id | String | Subscriber number, 08… or 62… format (digits only, max 20 characters) | Yes |
| operator | String | Operator hint: telkomsel or smartfren. A supplied hint wins over the prefix-based detection | No |
| username | String | Your registered username (alphanumeric, dots, underscores, hyphens only) | Yes |
| sign | String | Signature. Value: md5(username+api_key+cnp) | Yes |
{
"customer_id": "081200000001",
"operator": "telkomsel",
"username": "your_username",
"sign": "your_signature"
}
Response
Valid subscriber
| Attributes | Type | Description | Mandatory |
|---|---|---|---|
| customer_id | String | The checked number (normalised) | Yes |
| operator | String | Detected operator, lowercase: telkomsel or smartfren | Yes |
| is_subscriber | Boolean | true = registered subscriber of the operator. null is reserved for "cannot be determined", which the backend reports as a retryable answer — you then receive rc 103 instead of a success body | Yes |
| cust_type | String | Subscriber type: PREPAID or POSTPAID. Telkomsel only; null for Smartfren | No |
| product | String | Subscriber product: SIMPATI or HALO. Telkomsel only; null for Smartfren | No |
| has_package | Boolean | Whether the subscriber has purchasable packages. null = not checked or could not be determined | No |
| package_count | Double | Number of purchasable packages. null = not checked or could not be determined | No |
| retryable | Boolean | Always false in a success body: a retryable upstream answer is reported as rc 103 (retry with backoff) | No |
| cached | Boolean | true = served from the backend cache (result may be up to 30 minutes old) | No |
| message | String | Response message | Yes |
| rc | String | Response code. See response code list | Yes |
{
"data": {
"customer_id": "6281200000001",
"operator": "telkomsel",
"is_subscriber": true,
"cust_type": "PREPAID",
"product": "SIMPATI",
"has_package": true,
"package_count": 2,
"retryable": false,
"cached": false,
"message": "SUCCESS",
"rc": "00"
}
}
Non-subscriber number
{
"data": {
"customer_id": "6288100000001",
"operator": "smartfren",
"is_subscriber": false,
"cust_type": null,
"product": null,
"has_package": false,
"package_count": 0,
"retryable": false,
"cached": false,
"message": "SUCCESS",
"rc": "00"
}
}
Error Responses
| Condition | rc | What to do |
|---|---|---|
| Number rejected by the operator | 14 | The number is not a valid prepaid number for that operator. |
| Operator not supported yet | 16 | Only telkomsel and smartfren are supported today. |
| Invalid body | 107 | Fix the request — error_details lists the offending fields. |
| Upstream throttled, unavailable, or the answer cannot be determined | 103 | Retry later with a delay between attempts. The backend also uses this code when it flags an answer as retryable. |
Live Testing
Request URL
https://api-sandbox.irongatedigital.com/api/check-number
Request Method
Request Header
Content-Type: application/json
Body
Result