Internet top-up
Idoom cards for ADSL/fibre and 4G LTE lines.
Line numbers
| Type | Format | Example |
|---|---|---|
ADSL | 9-digit fixed line, leading 0 | 030000009 |
4G | 12 digits starting with 2134, no + | 213400000009 |
ADSL covers ADSL, VDSL and fibre (FTTH) lines.
Card values
curl "$API_URL/v3/internet/products?type=ADSL" -H "X-Access-Token: $API_KEY"{
"type": "ADSL",
"products": [
{ "value": 500, "cost": 500, "name": "ADSL 500 DZD", "available": true },
{ "value": 1000, "cost": 1000, "name": "ADSL 1000 DZD", "available": true },
{ "value": 2000, "cost": 2000, "name": "ADSL 2000 DZD", "available": false }
]
}value identifies the card; cost is what your balance pays; available is the stock right now. Sending an unavailable value fails with ERR_STOCK.
Checking a line (optional)
curl "$API_URL/v3/internet/check-number?type=ADSL&number=030000009" -H "X-Access-Token: $API_KEY"{ "number": "030000009", "type": "ADSL", "ncli": "11022*****", "offre": "FTTH 100M" }It catches typos before you charge your customer. A missing or mismatched line returns ERR_PHONE. Algérie Télécom can take a few seconds to answer.
Sending
curl -X POST "$API_URL/v3/internet/send" \
-H "X-Access-Token: $API_KEY" -H "Content-Type: application/json" \
-d '{"type":"ADSL","number":"030000009","value":1000,"ref":"order-3001"}'The answer has topupId and topupRef. Poll GET /v3/internet/check-ref/order-3001 every 5 seconds.
Statuses
| Status | Meaning | Final | Charged |
|---|---|---|---|
| HANDLING | Being applied to the line. | No | No |
| COMPLETED | The card was applied. num_trans is the transaction number. | Yes | Yes |
| REFUNDED | Failed. refund_message says why. | Yes | No |
| MANUAL_REDEEM | The card could not be applied automatically. card_code and serial_number are included so the customer can redeem it by hand (call 1500). | Yes | Yes |
| UNKNOWN_ERROR | Unconfirmed. Our team checks it. | Yes, for polling | Maybe |
MANUAL_REDEEM
Show the card_code to your customer with the instructions in manual_message. The card is valid and was paid for; it only needs to be entered by hand. Card codes are never returned for other statuses.
Listing top-ups
GET /v3/internet/list returns internet top-ups sent with your API keys, newest first, in data.items. The same array is repeated as data.topups for clients migrating from other v3 APIs.