Envoyer une Recharge Internet
curl --request POST \
--url https://api.oneclickdz.com/v3/internet/send \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"type": "<string>",
"number": "<string>",
"value": 123,
"ref": "<string>"
}
'import requests
url = "https://api.oneclickdz.com/v3/internet/send"
payload = {
"type": "<string>",
"number": "<string>",
"value": 123,
"ref": "<string>"
}
headers = {
"X-Access-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', number: '<string>', value: 123, ref: '<string>'})
};
fetch('https://api.oneclickdz.com/v3/internet/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/internet/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'number' => '<string>',
'value' => 123,
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/internet/send"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.oneclickdz.com/v3/internet/send")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/internet/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRecharges internet
Envoyer une Recharge Internet
Achetez et envoyez une carte de recharge internet ADSL ou 4G LTE
POST
/
v3
/
internet
/
send
Envoyer une Recharge Internet
curl --request POST \
--url https://api.oneclickdz.com/v3/internet/send \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"type": "<string>",
"number": "<string>",
"value": 123,
"ref": "<string>"
}
'import requests
url = "https://api.oneclickdz.com/v3/internet/send"
payload = {
"type": "<string>",
"number": "<string>",
"value": 123,
"ref": "<string>"
}
headers = {
"X-Access-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', number: '<string>', value: 123, ref: '<string>'})
};
fetch('https://api.oneclickdz.com/v3/internet/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/internet/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'number' => '<string>',
'value' => 123,
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/internet/send"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.oneclickdz.com/v3/internet/send")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/internet/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"number\": \"<string>\",\n \"value\": 123,\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVue d’ensemble
Achetez des cartes de recharge internet pour les services ADSL ou 4G LTE avec livraison numérique instantanée.Veuillez toujours valider les numéros de téléphone avant la soumission pour réduire les erreurs.
Corps de la requête
string
requis
Type de service :
ADSL ou 4Gstring
requis
Numéro de téléphone - ADSL :
0[0-9]{8} (ex. 036362608) - 4G : 213[0-9]{9} (ex. 213472731602)number
requis
Valeur nominale de la carte depuis
/internet/products (ex. 500, 1000, 2000)string
Votre référence de commande unique (optionnel, générée automatiquement si non fournie)
Exemples
curl https://api.oneclickdz.com/v3/internet/send \
-X POST \
-H "Content-Type: application/json" \
-H "X-Access-Token: YOUR_API_KEY" \
-d '{
"type": "ADSL",
"number": "036362608",
"value": 1000,
"ref": "internet-order-001"
}'
const response = await fetch("https://api.oneclickdz.com/v3/internet/send", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Access-Token": "YOUR_API_KEY",
},
body: JSON.stringify({
type: "ADSL",
number: "036362608",
value: 1000,
ref: "internet-order-001",
}),
});
const data = await response.json();
response = requests.post(
'https://api.oneclickdz.com/v3/internet/send',
headers={
'Content-Type': 'application/json',
'X-Access-Token': 'YOUR_API_KEY'
},
json={
'type': 'ADSL',
'number': '036362608',
'value': 1000,
'ref': 'internet-order-001'
}
)
<?php
$data = [
'type' => 'ADSL',
'number' => '036362608',
'value' => 1000,
'ref' => 'internet-order-001'
];
$ch = curl_init('https://api.oneclickdz.com/v3/internet/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-Access-Token: YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = json_decode(curl_exec($ch), true);
?>
Réponse de succès
{
"success": true,
"data": {
"topupId": "690161a3e9e88196b4eb6545",
"topupRef": "API-+213665983439-test-internet-1761698210633"
},
"meta": {
"timestamp": "2025-10-29T00:36:52.065Z"
}
}
Cycle de vie du statut
1
HANDLING
Traitement en cours avec l’opérateur (3 à 45 secondes en général)
2
États finaux
- FULFILLED : Carte livrée ✅ - REFUNDED : Échec et remboursement ❌ - QUEUED : Programmé pour plus tard (12 à 48h) ⏰
Sandbox
Avec une clé sandbox, aucune carte n’est consommée et votre solde n’est jamais débité. Le numéro envoyé détermine le résultat, et le statut évolue tout seul — interrogez exactement comme en production :| Numéro | Résultat |
|---|---|
030000000 | 400 ERR_PHONE — commande refusée |
030000001 | HANDLING → REFUNDED après 3 s |
030000002 | HANDLING → QUEUED après 3 s → FULFILLED 15 s plus tard |
| tout autre numéro valide | HANDLING → FULFILLED après 3 s |
card_code: "TESTCARD" et num_trans: "TESTTRANS" ; tout le reste est identique à la réponse de production.
Réponses d’erreur
ERR_VALIDATION
ERR_VALIDATION
Paramètres de requête invalides
ERR_PHONE
ERR_PHONE
Format de numéro de téléphone invalide ou incompatibilité de type
ERR_STOCK
ERR_STOCK
Valeur de carte hors stock
INSUFFICIENT_BALANCE
INSUFFICIENT_BALANCE
Solde insuffisant
DUPLICATED_REF
DUPLICATED_REF
Référence déjà utilisée
Bonnes pratiques
Valider en premier
Utilisez
/check-number avant de soumettreVérifier le stock
Vérifiez la disponibilité du produit
Références uniques
Fournissez un
ref unique pour le suiviInterroger le statut
Vérifiez le statut après la soumission
Liens utiles
Valider le numéro
Vérifier la validité du numéro
Vérifier le statut
Suivre la commande
Lister les produits
Cartes disponibles

