> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneclickdz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Internet Top-Up Integration Overview

> Learn how to integrate ADSL and 4G LTE internet recharge

## Introduction

Integrate ADSL and 4G LTE internet recharge card sales in 5 simple steps. This overview explains the workflow-detailed implementation with code examples are in the step-by-step guides below.

<Info>
  Internet cards are delivered digitally with codes and transaction numbers once fulfilled.
</Info>

## How It Works

```mermaid theme={null}
sequenceDiagram
    participant User
    participant YourApp
    participant API as OneClickDz API

    YourApp->>API: 1. Load available cards
    API-->>YourApp: Cards with pricing & stock
    
    User->>YourApp: Enter phone & select card
    YourApp->>API: 2. Validate number format
    API-->>YourApp: Validation result
    
    YourApp->>API: 3. Send top-up request
    API-->>YourApp: Order ID
    
    loop Until Complete
        YourApp->>API: 4. Check status
        API-->>YourApp: Status update
    end
    
    YourApp->>User: 5. Deliver card code
```

## 5-Step Integration Process

<Steps>
  <Step title="Load Products">
    Get available ADSL and 4G cards with pricing and stock status.

    → [See Step 1: Loading Products](/en/internet-topup-guides/1-loading-products)
  </Step>

  <Step title="Validate Number">
    Verify phone number format (ADSL: 9 digits, 4G: 12 digits) before ordering.

    → [See Step 2: Validation](/en/internet-topup-guides/2-validation)
  </Step>

  <Step title="Send Top-Up">
    Submit the order with service type, number, and card value.

    → [See Step 3: Sending Top-Ups](/en/internet-topup-guides/3-sending-topups)
  </Step>

  <Step title="Track Status">
    Poll order status every 5-10 seconds until FULFILLED, QUEUED, or REFUNDED.

    → [See Step 4: Status Tracking](/en/internet-topup-guides/4-status-tracking)
  </Step>

  <Step title="Deliver Card">
    Retrieve and securely deliver the card code and transaction number.

    → [See Step 5: Card Delivery](/en/internet-topup-guides/5-card-delivery)
  </Step>
</Steps>

## What You Need to Know

### Service Types

* **ADSL**: Landline internet (9-digit numbers starting with 0)
* **4G LTE**: Mobile internet (12-digit numbers starting with 213)

→ [Number formats in Step 2](/en/internet-topup-guides/2-validation)

### Order Status

* `HANDLING` → Keep polling (3-45 seconds)
* `FULFILLED` → Card ready! Get `card_code` and `num_trans` ✅
* `QUEUED` → Scheduled delivery (12-48 hours) ⏰
* `REFUNDED` → Failed, refund issued ❌

→ [Status handling in Step 4](/en/internet-topup-guides/4-status-tracking)

### QUEUED Orders

**QUEUED is not a failure!** It means the card will be delivered within 12-48 hours. Store the order and recheck later.

→ [QUEUED handling in Step 4](/en/internet-topup-guides/4-status-tracking)

### Pricing

Apply your markup to wholesale prices before showing to customers.

Example: 980 DA wholesale → Sell at 1029 DA (5% markup) → Profit: 49 DA

→ [Pricing in Step 1](/en/internet-topup-guides/1-loading-products)

## Key Points

<CardGroup cols={2}>
  <Card title="Always Validate" icon="circle-check">
    Use `/check-number` before submitting orders

    → [Step 2](/en/internet-topup-guides/2-validation)
  </Card>

  <Card title="Check Stock" icon="boxes-stacked">
    Verify `available: true` before displaying cards

    → [Step 1](/en/internet-topup-guides/1-loading-products)
  </Card>

  <Card title="Handle QUEUED" icon="calendar">
    Don't treat QUEUED as failure-schedule rechecks

    → [Step 4](/en/internet-topup-guides/4-status-tracking)
  </Card>

  <Card title="Secure Delivery" icon="lock">
    Encrypt card codes in storage and transmission

    → [Step 5](/en/internet-topup-guides/5-card-delivery)
  </Card>
</CardGroup>

## API Reference

<CardGroup cols={2}>
  <Card title="List Products" icon="list" href="/en/api-reference/internet/list-products">
    GET /v3/internet/products
  </Card>

  <Card title="Validate Number" icon="check" href="/en/api-reference/internet/validate-number">
    GET /v3/internet/check-number
  </Card>

  <Card title="Send Top-Up" icon="paper-plane" href="/en/api-reference/internet/send-topup">
    POST /v3/internet/send
  </Card>

  <Card title="Check Status" icon="magnifying-glass" href="/en/api-reference/internet/check-by-id">
    GET /v3/internet/check-id/:id
  </Card>
</CardGroup>

## Testing

Use **sandbox mode** to test without real transactions. All phone numbers work in sandbox, and orders fulfill instantly with test card codes.

Enable sandbox in [dashboard settings](https://app.oneclickdz.com/#/settings).

## Start Integrating

<Card title="Begin with Step 1: Loading Products" icon="play" href="/en/internet-topup-guides/1-loading-products" color="#0D9373">
  Get started by loading available cards with code examples
</Card>

## Additional Resources

<CardGroup cols={2}>
  <Card title="Quick Start Guide" icon="rocket" href="/en/quickstart">
    Get up and running in 5 minutes
  </Card>

  <Card title="Authentication" icon="key" href="/en/authentication">
    Learn how to authenticate requests
  </Card>

  <Card title="Security Best Practices" icon="shield" href="/en/security-best-practices">
    Secure your integration
  </Card>

  <Card title="Contact Support" icon="headset" href="/en/contact">
    Get help from our team
  </Card>
</CardGroup>
