الحصول على المعاملة بالمعرّف
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دفع الفواتير
الحصول على المعاملة بالمعرّف
قراءة الحالة الكاملة لمعاملة ما
GET
/
v3
/
bills
/
transactions
/
{transactionId}
الحصول على المعاملة بالمعرّف
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تُعيد المعاملة كاملة. هذه هي نقطة النهاية التي يجب استطلاع حالتها بعد
discover وبعد pay.تُجيب المعاملة التي ليست لك، أو التي تنتمي إلى البيئة الأخرى، بالخطأ 404 NOT_FOUND.معاملات المسار
الاستجابة
إظهار الخصائص
إظهار الخصائص
المعرّف، ضمن مفتاح خاص بكل شريك:
reference (ADE)، contractNumber (SONELGAZ)، codeClient (SEAAL)، codeloc (AADL)، facture (SEOR، SEACO)، phoneNumber (Algérie Télécom).موجودة عندما تكون قيمة
status هي READY. يتضمّن كل مُدخل: billId وamount وfee، وlabel وperiod اختياريًا، وbreakdown (لـ AADL).موجود بمجرد قبول دفعة. الفاتورة قيد الدفع؛ في الطلب متعدد الفواتير،
amount هو المبلغ المجمّع وbillId هو المعرّف الأول.موجود عندما تكون قيمة
status هي SUCCESS. عنوان URL الخاص بـ تنزيل الإيصال.موجود عندما تكون قيمة
status هي FAILED أو REFUNDED: { code, message } حيث code إحدى القيم PAYMENT_DECLINED وPARTNER_UNAVAILABLE وINVALID_ACCOUNT وBILL_ALREADY_PAID.مثال
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"]
?>
Response — SUCCESS (multi-bill order)
{
"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"
}
Response — 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"
}
الأخطاء
| HTTP | الرمز | المعنى |
|---|---|---|
| 401 | MISSING_ACCESS_TOKEN / INVALID_ACCESS_TOKEN | المفتاح مفقود أو مرفوض |
| 404 | NOT_FOUND | معاملة غير معروفة، أو ليست لك، أو في البيئة الأخرى |
| 503 | AUTH_UNAVAILABLE | تعذّر التحقّق من المفتاح في الوقت المحدّد؛ أعد المحاولة بعد Retry-After |

