Check Number Packages
API to list the packages a prepaid subscriber can actually buy: name, price, pre-discount price (strike-through price), validity, quota and category. Use it after Check Number confirms the number, or directly when you need the catalog.
Supported operators: Telkomsel and Smartfren. Both endpoints are served for isolated (IDSL-only) accounts — non-isolated accounts receive HTTP 404.
Path
| Method | Path |
|---|---|
| POST | api/check-number-packages |
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 |
| refresh | Boolean | true = bypass the backend cache and fetch a fresh catalog (the fresh result re-populates the cache). Default false | 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",
"refresh": false,
"username": "your_username",
"sign": "your_signature"
}
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 |
Response
Valid subscriber with packages
| 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 | Yes |
| has_package | Boolean | Whether the subscriber has purchasable packages. 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 | No |
| package_count | Double | Total purchasable packages. See has_package for the null case | No |
| packages | Array | The catalog. Each item: code, name, price, base_price, validity, quota, category | No |
| truncated | Boolean | true = the list was capped and is not the complete catalog | No |
| retryable | Boolean | Always false in a success body: a partially readable catalog (or an unreachable operator) 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,
"has_package": true,
"package_count": 2,
"packages": [
{
"code": "DUMMY-TSEL-1",
"name": "Dummy Package 1",
"price": 50000,
"base_price": 65000,
"validity": "30 days",
"quota": "10 GB",
"category": "Internet"
},
{
"code": "DUMMY-TSEL-2",
"name": "Dummy Package 2",
"price": 15000,
"base_price": null,
"validity": "7 days",
"quota": "3 GB",
"category": "Internet"
}
],
"truncated": false,
"retryable": false,
"cached": false,
"message": "SUCCESS",
"rc": "00"
}
}
Non-subscriber number
{
"data": {
"customer_id": "6288100000001",
"operator": "smartfren",
"is_subscriber": false,
"has_package": false,
"package_count": 0,
"packages": [],
"truncated": false,
"retryable": false,
"cached": false,
"message": "SUCCESS",
"rc": "00"
}
}
Field notes
priceis the selling price andbase_pricethe pre-discount price (TelkomseloriginalPrice, SmartfrenbasePrice).base_priceis absent or null when there is no promo — do not treat a missingbase_priceas an error.code,quotaandcategoryare operator-specific: Telkomsel returns opaque package ids, a per-quota-bucketquotaand product-taxonomycategory; Smartfren returns short SKUs, a total benefitquotaand tab names. Do not compare or sum them across operators.- The catalog is cached per number for 30 minutes; set
refresh: trueonly when you truly need a fresh one (it triggers the upstream fetch and is slower). - A number that is not a subscriber of the detected operator answers
is_subscriber: falsewith an emptypackageslist — that is a valid answer, not an error.
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 catalog could not be read in full | 103 | Retry later with a delay between attempts. A partially readable catalog is reported this way too, so no partial list is returned. |
Live Testing
Request URL
https://api-sandbox.irongatedigital.com/api/check-number-packages
Request Method
Request Header
Content-Type: application/json
Body
Result