Get Transaction by 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": {}
}
}Bill Payment
Get Transaction by ID
Read the full state of a transaction
GET
/
v3
/
bills
/
transactions
/
{transactionId}
Get Transaction by 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": {}
}
}Returns the complete transaction. This is the endpoint to poll after
discover and after pay.
A transaction that is not yours, or that belongs to the other environment, answers 404 NOT_FOUND.
Path parameters
string
required
The transaction identifier returned by
discover.Response
object
required
Show properties
Show properties
string
required
string
required
Your discovery
ref.string
required
discovery until a payment is accepted, then payment.string
required
PENDING, READY, PROCESSING, UNKNOWN, SUCCESS, FAILED or REFUNDED.string
required
object
required
The identifier, under a partner-specific key:
reference (ADE), contractNumber (SONELGAZ), codeClient (SEAAL), codeloc (AADL), facture (SEOR), phoneNumber (Algérie Télécom).string
required
Always
DZD.object[]
Present when
status is READY. Each entry: billId, amount, fee, optional label, period and (AADL) breakdown.object
Present once a payment was accepted. The bill being paid; for a multi-bill order,
amount is the combined amount and billId is the first id.object[]
Present for a multi-bill order only: each bill of the order.
number
Present once a payment was accepted:
selectedBill.amount + selectedBill.fee.string
Present when
status is SUCCESS. URL of Download Receipt.string
Present when
status is SUCCESS. The biller’s or gateway’s operation reference.object
Present when
status is FAILED or REFUNDED: { code, message } with code one of PAYMENT_DECLINED, PARTNER_UNAVAILABLE, INVALID_ACCOUNT, BILL_ALREADY_PAID.string
required
ISO 8601.
string
required
ISO 8601.
string | null
required
null while the transaction is in progress. Set when discovery finishes, when a payment becomes UNKNOWN, SUCCESS or FAILED, and when a refund is completed.Example
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"
}
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | MISSING_ACCESS_TOKEN / INVALID_ACCESS_TOKEN | Missing or rejected key |
| 404 | NOT_FOUND | Unknown transaction, not yours, or in the other environment |
| 503 | AUTH_UNAVAILABLE | The key could not be verified in time; retry after Retry-After |

