Pay a Bill
curl --request POST \
--url https://api.oneclickdz.com/v3/bills/pay \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"transactionId": "<string>",
"billId": "<string>",
"billIds": [
"<string>"
],
"ref": "<string>"
}
'import requests
url = "https://api.oneclickdz.com/v3/bills/pay"
payload = {
"transactionId": "<string>",
"billId": "<string>",
"billIds": ["<string>"],
"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({
transactionId: '<string>',
billId: '<string>',
billIds: ['<string>'],
ref: '<string>'
})
};
fetch('https://api.oneclickdz.com/v3/bills/pay', 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/pay",
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([
'transactionId' => '<string>',
'billId' => '<string>',
'billIds' => [
'<string>'
],
'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/bills/pay"
payload := strings.NewReader("{\n \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\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/bills/pay")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/pay")
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 \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transactionId": "<string>",
"ref": "<string>",
"status": "<string>"
}
}Bill Payment
Pay a Bill
Pay one or several bills from a READY discovery
POST
/
v3
/
bills
/
pay
Pay a Bill
curl --request POST \
--url https://api.oneclickdz.com/v3/bills/pay \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"transactionId": "<string>",
"billId": "<string>",
"billIds": [
"<string>"
],
"ref": "<string>"
}
'import requests
url = "https://api.oneclickdz.com/v3/bills/pay"
payload = {
"transactionId": "<string>",
"billId": "<string>",
"billIds": ["<string>"],
"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({
transactionId: '<string>',
billId: '<string>',
billIds: ['<string>'],
ref: '<string>'
})
};
fetch('https://api.oneclickdz.com/v3/bills/pay', 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/pay",
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([
'transactionId' => '<string>',
'billId' => '<string>',
'billIds' => [
'<string>'
],
'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/bills/pay"
payload := strings.NewReader("{\n \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\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/bills/pay")
.header("X-Access-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/pay")
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 \"transactionId\": \"<string>\",\n \"billId\": \"<string>\",\n \"billIds\": [\n \"<string>\"\n ],\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transactionId": "<string>",
"ref": "<string>",
"status": "<string>"
}
}Pays one bill, or several bills as a single order, from a discovery whose
On a network timeout, read the transaction before doing anything else:
status is READY. The response confirms the payment was accepted; the outcome is read from the transaction’s status (SUCCESS, FAILED or REFUNDED).
Request body
string
required
The
READY discovery, 24 hexadecimal characters.string
One
billId from that transaction’s bills[]. Send this or billIds.string[]
1 to 50 distinct
billIds from bills[], paid as one order; its fee is the sum of the selected bills’ fee. Send this or billId. More than one id is accepted for SEAAL only; any other partner answers 400 ERR_VALIDATION.string
required
A new reference for this payment, up to 100 characters. It must differ from the discovery
ref and from any ref still in use for this partner; otherwise 403 DUPLICATED_REF.Response
object
required
Example
curl -X POST https://api.oneclickdz.com/v3/bills/pay \
-H "X-Access-Token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transactionId": "68cdf0a2b7c1e4d5f6a7b8c9",
"billIds": ["F061612640", "F060286499"],
"ref": "disc-20260920-0003-pay"
}'
const response = await fetch("https://api.oneclickdz.com/v3/bills/pay", {
method: "POST",
headers: {
"X-Access-Token": process.env.ONECLICKDZ_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
transactionId: "68cdf0a2b7c1e4d5f6a7b8c9",
billIds: ["F061612640", "F060286499"],
ref: "disc-20260920-0003-pay",
}),
});
const body = await response.json();
if (!body.success) throw new Error(`${body.error.code}: ${body.error.message}`);
// body.data.status === "PROCESSING" — poll the transaction for the outcome
import os, requests
response = requests.post(
"https://api.oneclickdz.com/v3/bills/pay",
headers={"X-Access-Token": os.environ["ONECLICKDZ_API_KEY"]},
json={
"transactionId": "68cdf0a2b7c1e4d5f6a7b8c9",
"billIds": ["F061612640", "F060286499"],
"ref": "disc-20260920-0003-pay",
},
)
body = response.json()
if not body["success"]:
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
# body["data"]["status"] == "PROCESSING" — poll the transaction for the outcome
<?php
$ch = curl_init("https://api.oneclickdz.com/v3/bills/pay");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: " . getenv("ONECLICKDZ_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"transactionId" => "68cdf0a2b7c1e4d5f6a7b8c9",
"billIds" => ["F061612640", "F060286499"],
"ref" => "disc-20260920-0003-pay",
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$body["success"]) {
throw new Exception($body["error"]["code"] . ": " . $body["error"]["message"]);
}
// $body["data"]["status"] === "PROCESSING" — poll the transaction for the outcome
?>
Response
{
"success": true,
"data": {
"transactionId": "68cdf0a2b7c1e4d5f6a7b8c9",
"ref": "disc-20260920-0003",
"status": "PROCESSING"
},
"meta": { "timestamp": "2026-09-20T10:16:04.512Z" },
"requestId": "req_5f6g7h8i9j0k1l2m3n4o5p6q"
}
What is debited
total on the transaction = selectedBill.amount + selectedBill.fee. For a multi-bill order, selectedBill.amount is the sum of the selected bills and selectedBill.fee is the sum of their fees; selectedBills[] lists each bill. Fees are configured per biller and can change: display the values returned by the API.
Errors
Returned immediately; nothing is debited.| HTTP | Code | Meaning |
|---|---|---|
| 400 | ERR_VALIDATION | Bad transactionId, both or neither of billId/billIds, missing ref |
| 401 | MISSING_ACCESS_TOKEN / INVALID_ACCESS_TOKEN | Missing or rejected key |
| 403 | DUPLICATED_REF | ref already in use for this partner, including the discovery ref |
| 404 | NOT_FOUND | Transaction unknown, not yours, not READY, or a billId is not in its bills[] |
| 409 | BILL_ALREADY_PAID | One of the selected bills was already paid through this API |
| 409 | PAYMENT_IN_PROGRESS | A payment for one of the selected bills is already running |
| 503 | PARTNER_UNAVAILABLE | The biller is unavailable; retry later |
| 503 | AUTH_UNAVAILABLE | The key could not be verified in time; retry after Retry-After |
PROCESSING or later means the payment was accepted.

