Skip to main content
GET
/
v3
/
internet
/
check-id
/
{id}
Check Status by ID
curl --request GET \
  --url https://api.oneclickdz.com/v3/internet/check-id/{id} \
  --header 'X-Access-Token: <api-key>'
{
  "status": "<string>",
  "card_code": "<string>",
  "num_trans": "<string>",
  "date_traitement": "<string>"
}

Overview

Track internet top-up status and retrieve card details when fulfilled.

Path Parameters

id
string
required
Internal top-up ID from /internet/send response

Response Fields

status
string
  • HANDLING: Processing (3-45s) - FULFILLED: Complete with card code ✅
  • REFUNDED: Failed and refunded ❌ - QUEUED: Scheduled (12-48h) ⏰
card_code
string
Activated card code (available when FULFILLED)
num_trans
string
Algérie Télécom transaction number
date_traitement
string
Processing date

Examples

curl https://api.oneclickdz.com/v3/internet/check-id/6901616fe9e88196b4eb64b2 \
  -H "X-Access-Token: YOUR_API_KEY"

Fulfilled Response

{
  "success": true,
  "data": {
    "_id": "6901616fe9e88196b4eb64b2",
    "ref": "internet-order-001",
    "status": "FULFILLED",
    "type": "ADSL",
    "number": "036362608",
    "topup_amount": 1000,
    "card_code": "123456789012",
    "num_trans": "AT-2025-12345",
    "date_traitement": "2025-10-29T01:05:30.000Z",
    "created_at": "2025-10-29T01:00:00.000Z"
  }
}

Polling Example

async function pollInternetStatus(topupId) {
  const maxAttempts = 60;

  for (let i = 0; i < maxAttempts; i++) {
    const response = await fetch(
      `https://api.oneclickdz.com/v3/internet/check-id/${topupId}`,
      { headers: { "X-Access-Token": process.env.API_KEY } }
    );

    const { data } = await response.json();

    if (["FULFILLED", "REFUNDED", "QUEUED"].includes(data.status)) {
      return data;
    }

    await new Promise((resolve) => setTimeout(resolve, 5000));
  }

  throw new Error("Timeout");
}

Handling QUEUED Status

QUEUED means the top-up is scheduled for later (12-48 hours). Do not treat as failure.
if (status === "QUEUED") {
  // Save for later verification
  await db.orders.update({
    id: orderId,
    status: "SCHEDULED",
    message: "Card will be delivered within 48 hours",
  });

  // Check again after 24h
  scheduleRecheck(orderId, 24 * 60 * 60 * 1000);
}