Obtenir une Transaction par ID
curl --request GET \
--url https://api.oneclickdz.com/v3/bills/transactions/{transactionId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/bills/transactions/{transactionId}', 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/bills/transactions/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"transactionId": "<string>",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"partner": "<string>",
"account": {},
"currency": "<string>",
"bills": [
{}
],
"selectedBill": {},
"selectedBills": [
{}
],
"total": 123,
"receiptUrl": "<string>",
"operationId": "<string>",
"error": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"completedAt": {}
}
}Paiement de factures
Obtenir une Transaction par ID
Lisez l’état complet d’une transaction
GET
/
v3
/
bills
/
transactions
/
{transactionId}
Obtenir une Transaction par ID
curl --request GET \
--url https://api.oneclickdz.com/v3/bills/transactions/{transactionId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/bills/transactions/{transactionId}', 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/bills/transactions/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"transactionId": "<string>",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"partner": "<string>",
"account": {},
"currency": "<string>",
"bills": [
{}
],
"selectedBill": {},
"selectedBills": [
{}
],
"total": 123,
"receiptUrl": "<string>",
"operationId": "<string>",
"error": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"completedAt": {}
}
}Renvoie la transaction complète. C’est l’endpoint à interroger après
discover et après pay.
Une transaction qui ne vous appartient pas, ou qui appartient à l’autre environnement, répond 404 NOT_FOUND.
Paramètres de chemin
string
requis
L’identifiant de transaction renvoyé par
discover.Réponse
object
requis
Afficher propriétés
Afficher propriétés
string
requis
string
requis
Votre
ref de découverte.string
requis
discovery jusqu’à ce qu’un paiement soit accepté, puis payment.string
requis
PENDING, READY, PROCESSING, UNKNOWN, SUCCESS, FAILED ou REFUNDED.string
requis
object
requis
L’identifiant, sous une clé propre au partenaire :
reference (ADE), contractNumber (SONELGAZ), codeClient (SEAAL), codeloc (AADL), facture (SEOR), phoneNumber (Algérie Télécom).string
requis
Toujours
DZD.object[]
Présent lorsque
status vaut READY. Chaque entrée : billId, amount, fee, et en option label, period et (AADL) breakdown.object
Présent dès qu’un paiement a été accepté. La facture en cours de paiement ; pour une commande multi-factures,
amount est le montant cumulé et billId est le premier id.object[]
Présent uniquement pour une commande multi-factures : chaque facture de la commande.
number
Présent dès qu’un paiement a été accepté :
selectedBill.amount + selectedBill.fee.string
Présent lorsque
status vaut SUCCESS. URL de Télécharger le Reçu.string
Présent lorsque
status vaut SUCCESS. La référence d’opération du facturier ou de la passerelle.object
Présent lorsque
status vaut FAILED ou REFUNDED : { code, message } avec code parmi PAYMENT_DECLINED, PARTNER_UNAVAILABLE, INVALID_ACCOUNT, BILL_ALREADY_PAID.string
requis
ISO 8601.
string
requis
ISO 8601.
string | null
requis
null tant que la transaction est en cours. Renseigné lorsque la découverte se termine, lorsqu’un paiement passe à UNKNOWN, SUCCESS ou FAILED, et lorsqu’un remboursement est terminé.Exemple
curl https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9 \
-H "X-Access-Token: YOUR_API_KEY"
const response = await fetch(
"https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9",
{ headers: { "X-Access-Token": process.env.ONECLICKDZ_API_KEY } },
);
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
const txn = body.data; // branch on txn.status
import os, requests
response = requests.get(
"https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9",
headers={"X-Access-Token": os.environ["ONECLICKDZ_API_KEY"]},
)
body = response.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
txn = body["data"] # branch on txn["status"]
<?php
$ch = curl_init("https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Access-Token: " . getenv("ONECLICKDZ_API_KEY")],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$body["success"]) {
throw new Exception($body["error"]["code"]);
}
$txn = $body["data"]; // branch on $txn["status"]
?>
Réponse — SUCCESS (commande multi-factures)
{
"success": true,
"data": {
"transactionId": "68cdf0a2b7c1e4d5f6a7b8c9",
"ref": "disc-20260920-0003",
"type": "payment",
"status": "SUCCESS",
"partner": "SEAAL",
"account": { "codeClient": "100001" },
"currency": "DZD",
"selectedBill": { "billId": "F061612640", "amount": 912.66, "fee": 30, "label": "Facture SEAAL - Eau", "period": "3ème trimestre 2026" },
"selectedBills": [
{ "billId": "F061612640", "amount": 456.33, "fee": 30, "label": "Facture SEAAL - Eau", "period": "3ème trimestre 2026" },
{ "billId": "F060286499", "amount": 456.33, "fee": 30, "label": "Facture SEAAL - Eau", "period": "2ème trimestre 2026" }
],
"total": 942.66,
"receiptUrl": "https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9/receipt",
"operationId": "SEAAL-2026-000123",
"createdAt": "2026-09-20T10:15:32.194Z",
"updatedAt": "2026-09-20T10:17:48.006Z",
"completedAt": "2026-09-20T10:17:48.006Z"
},
"meta": { "timestamp": "2026-09-20T10:17:50.120Z" },
"requestId": "req_7q8r9s0t1u2v3w4x5y6z7a8b"
}
Réponse — FAILED
{
"success": true,
"data": {
"transactionId": "68cdf0a2b7c1e4d5f6a7b8d0",
"ref": "disc-20260920-0004",
"type": "payment",
"status": "FAILED",
"partner": "ADE",
"account": { "reference": "0123456789012340000000004" },
"currency": "DZD",
"selectedBill": { "billId": "0123456789012340000000004", "amount": 400, "fee": 10, "label": "Facture ADE" },
"total": 410,
"error": { "code": "PAYMENT_DECLINED", "message": "The payment was declined by the bank or partner portal." },
"createdAt": "2026-09-20T10:20:01.000Z",
"updatedAt": "2026-09-20T10:21:12.000Z",
"completedAt": "2026-09-20T10:21:12.000Z"
},
"meta": { "timestamp": "2026-09-20T10:21:15.000Z" },
"requestId": "req_2c3d4e5f6g7h8i9j0k1l2m3n"
}
Erreurs
| HTTP | Code | Signification |
|---|---|---|
| 401 | MISSING_ACCESS_TOKEN / INVALID_ACCESS_TOKEN | Clé manquante ou rejetée |
| 404 | NOT_FOUND | Transaction inconnue, ne vous appartenant pas, ou dans l’autre environnement |
| 503 | AUTH_UNAVAILABLE | La clé n’a pas pu être vérifiée à temps ; réessayez après Retry-After |

