Test
Integration Process

How to get started.
Push your bills to Bill24 proxy/host follow these steps:
1 Push New Customer π
This step Billers/Businesses can push customer (new , update , remvove) to Bill24 proxy/host, after completed customer can search via Bank channnels.
Sample code for:
//change best url to production
var client = new RestClient("https://supplierapi-demo.bill24.net/customer/push");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
//change your real credential token.
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""data"": [" + "\n" +
@" {" + "\n" +
@" ""code"": ""2093-099003""," + "\n" +
@" ""org_code"": ""099003""," + "\n" +
@" ""sync_code"": ""099003""," + "\n" +
@" ""name"": ""Nheb Nim""," + "\n" +
@" ""name_kh"": ""αααα ααΈα""," + "\n" +
@" ""phone"": """"," + "\n" +
@" ""email"": """"," + "\n" +
@" ""address"": ""48501 Phnom Penh""," + "\n" +
@" ""address_kh"": ""ααααααα, CA 27990""," + "\n" +
@" ""tin_number"": """"," + "\n" +
@" ""is_active"": true" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change best url to production
//change your real credential token.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/customer/push',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"data": [
{
"code": "2093-099003",
"org_code": "099003",
"sync_code": "099003",
"name": "Nheb Nim",
"name_kh": "αααα ααΈα",
"phone": "",
"email": "",
"address": "48501 Phnom Penh",
"address_kh": "ααααααα, CA 27990",
"tin_number": "",
"is_active": true
}
]
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
//change best url to production
//change your real credential token.
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = json.dumps({
"data": [
{
"code": "2093-099003",
"org_code": "099003",
"sync_code": "099003",
"name": "Nheb Nim",
"name_kh": "αααα ααΈα",
"phone": "",
"email": "",
"address": "48501 Phnom Penh",
"address_kh": "ααααααα, CA 27990",
"tin_number": "",
"is_active": True
}
]
})
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
'Content-Type': 'application/json'
}
conn.request("POST", "/customer/push", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example Response Payload
{
"id": "Ny5KzCQ4",
"code": "12831cd5-0e78-40e7-bba6-6f046d9e5931",
"operation": "cus.push",
"note": "",
"status": "ready",
"completed": false,
"created_host": "None",
"start_date": null,
"end_date": null,
"result": null,
"total_record": "1",
"created_date": "2024-02-14T14:18:33.775055"
}
2 Push New Bill π
This step Billers/Businesses can push bills to Bill24 proxy/host. After completed this step your customer can pay via Bank channels.
Sample code for:
//change best url to production
var client = new RestClient("https://supplierapi-demo.bill24.net/bill/push");
client.Timeout = -1;
//change your real credential token.
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""data"": [" + "\n" +
@" {" + "\n" +
@" ""status"": ""pending""," + "\n" +
@" ""due_date"": ""2024-12-31""," + "\n" +
@" ""description"": ""Buy something.""," + "\n" +
@" ""org_code"": ""INVV001""," + "\n" +
@" ""customer_sync_code"": ""099003""," + "\n" +
@" ""currency_id"": ""USD""," + "\n" +
@" ""org_token"": """"," + "\n" +
@" ""ext__discount"": ""1%""," + "\n" +
@" ""ext__details"": [" + "\n" +
@" {" + "\n" +
@" ""item_name"": ""Note book""," + "\n" +
@" ""price"": 10.0," + "\n" +
@" ""amount"": 10.0," + "\n" +
@" ""quantity"": 1" + "\n" +
@" }" + "\n" +
@" ]," + "\n" +
@" ""ext__attachment"": ""string""," + "\n" +
@" ""total_amount"": 10.0," + "\n" +
@" ""sync_code"": ""INVV001""," + "\n" +
@" ""ext__tax"": """"," + "\n" +
@" ""ext__delivery"": ""0""," + "\n" +
@" ""bill_date"": ""2024-02-26""," + "\n" +
@" ""bill_type"": ""2""" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change best url to production
//change your real credential token.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/bill/push',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"data": [
{
"status": "pending",
"due_date": "2024-12-31",
"description": "Buy something.",
"org_code": "INVV001",
"customer_sync_code": "099003",
"currency_id": "USD",
"org_token": "",
"ext__discount": "1%",
"ext__details": [
{
"item_name": "Note book",
"price": 10.0,
"amount": 10.0,
"quantity": 1
}
],
"ext__attachment": "string",
"total_amount": 10.0,
"sync_code": "INVV001",
"ext__tax": "",
"ext__delivery": "0",
"bill_date": "2024-02-26",
"bill_type": "2"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
//change best url to production
//change your real credential token.
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = json.dumps({
"data": [
{
"status": "pending",
"due_date": "2024-12-31",
"description": "Buy something.",
"org_code": "INVV001",
"customer_sync_code": "099003",
"currency_id": "USD",
"org_token": "",
"ext__discount": "1%",
"ext__details": [
{
"item_name": "Note book",
"price": 10,
"amount": 10,
"quantity": 1
}
],
"ext__attachment": "string",
"total_amount": 10,
"sync_code": "INVV001",
"ext__tax": "",
"ext__delivery": "0",
"bill_date": "2024-02-26",
"bill_type": "2"
}
]
})
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
'Content-Type': 'application/json'
}
conn.request("POST", "/bill/push", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example Response Payload
{
"id": "SD4N0C4l",
"code": "2da3c91e-e7cd-427c-b987-154a9793b271",
"operation": "bll.push",
"note": "",
"status": "ready",
"completed": false,
"created_host": "None",
"start_date": null,
"end_date": null,
"result": null,
"total_record": "1",
"created_date": "2024-02-14T14:16:31.081235"
}
3 Get Queue π
This step Billers/Businesses can get queue as list. After push customer or bill.
Sampel code for:
//change best url to production
var client = new RestClient("https://supplierapi-demo.bill24.net/queue/?d1=2024-01-20&d2=2024-01-25");
client.Timeout = -1;
//change your real credential token.
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change best url to production
//change your real credential token.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/queue/?d1=2024-01-20&d2=2024-01-25',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
//change best url to production
//change your real credential token.
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = ''
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
}
conn.request("GET", "/queue/?d1=2024-01-20&d2=2024-01-25", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example Response Payload
{
"paging": {
"per_page": 50,
"pages": 1,
"total": 1,
"page": 1,
"more": false
},
"data": [
{
"id": "j5wiZWu2",
"code": "7861872f-8776-43cd-9be0-3a4577bca7be",
"operation": "cus.push",
"note": null,
"status": "done",
"completed": true,
"created_host": "None",
"start_date": "2024-02-01T15:08:02.046534",
"end_date": "2024-02-01T15:08:15.503621",
"result": "success",
"total_record": null,
"created_date": "2024-02-01T15:07:58.366856"
}
]
}
4 Get Queue Detail π
You possible get queue detail with this step by using id
.
Sample code for:
//change best url to production
//provide with path {id}
var client = new RestClient("https://supplierapi-demo.bill24.net/queue/");
client.Timeout = -1;
//change your real credential token.
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change best url to production
//provide with path {id}
//change your real credential token.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/queue/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
//change best url to production
//change your real credential token.
//provide with path {id}
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = ''
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
}
conn.request("GET", "/queue/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example Response Payload
{
"status": "done",
"message": "Queue is done",
"data": {
"total_added": 0,
"total_canceled": 0,
"total_deleted": 0,
"total_updated": 1,
"total_records": 1,
"operation": "cus.push"
}
}
5 Webhook π
This step required Billers/Businesses implement this endpoint to allow Bill24 push back the online payment transaction to your server.
Sample Request JSON:
{
"tnx_id": "BUb4CmDE",
"tran_amount": 10,
"customer_fee": 0.20,
"supplier_fee": 0,
"total_amount": 10.20,
"currency": "USD",
"bank_name": "ACLEDA",
"bank_ref": "FT00003941",
"customer_sync_code": "",
"customer_code": "CU003035",
"customer_name": "Nheb Nim",
"customer_phone": "097394303",
"paid_by": "893-349-349-3449",
"paid_date": "2024-02-29 10:46:33",
"description": "",
"checkout_ref": "",
"bills": []
}
Sample Response JSON:
{
"status": "Success",
"message": "SUCCESS"
}
6 Create New Payment π
This step allow Billers/Businesses push bills to clear at Bill24 side. In case customer paid by cash.
Sample code for:
//change best url to production
var client = new RestClient("https://supplierapi-demo.bill24.net/payment/push");
client.Timeout = -1;
//change your real credential token.
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""data"": [" + "\n" +
@" {" + "\n" +
@" ""currency_id"": ""USD""," + "\n" +
@" ""customer_sync"": ""CU003035""," + "\n" +
@" ""description"": ""pay by cash""," + "\n" +
@" ""title"": ""Invoice""," + "\n" +
@" ""payment_method"": ""cash""," + "\n" +
@" ""sync_code"": ""CU003035""," + "\n" +
@" ""tran_date"": ""2024-02-14""," + "\n" +
@" ""bill_syncs"": ""INV001""," + "\n" +
@" ""total_amount"": 10.0" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change your real credential token.
//change best url to production
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/payment/push',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"data": [
{
"currency_id": "USD",
"customer_sync": "CU003035",
"description": "pay by cash",
"title": "Invoice",
"payment_method": "cash",
"sync_code": "CU003035",
"tran_date": "2024-02-14",
"bill_syncs": "INV001",
"total_amount": 10.0
}
]
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
//change best url to production
//change your real credential token.
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = json.dumps({
"data": [
{
"currency_id": "USD",
"customer_sync": "CU003035",
"description": "pay by cash",
"title": "Invoice",
"payment_method": "cash",
"sync_code": "CU003035",
"tran_date": "2024-02-14",
"bill_syncs": "INV001",
"total_amount": 10
}
]
})
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
'Content-Type': 'application/json'
}
conn.request("POST", "/payment/push", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Sample Response JSON:
{
"id": "nn5RscTz",
"code": "708839d8-5b18-4fd9-8c2e-cf0d111940a7",
"operation": "pmt.push",
"note": "",
"status": "ready",
"completed": false,
"created_host": "chrome",
"start_date": "null",
"end_date": "null",
"result": "null",
"total_record": 1,
"created_date": "2024-01-15T10:52:04.777467"
}
7 Get Payment π
This step allow Billers/Businesses get payments from Bil24, and we will response payments default, you can filter as well.
Sample code for:
//change best url to production
var client = new RestClient("https://supplierapi-demo.bill24.net/payment/?d1=2024-01-20&d2=2024-02-14&customer_sync&payment_method¤cy_id&source");
client.Timeout = -1;
//change your real credential token.
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("token", "1603aa00dcc4426ba83298341bab126b");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
//change best url to production
//change your real credential token.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://supplierapi-demo.bill24.net/payment/?d1=2024-01-20&d2=2024-02-14&customer_sync&payment_method¤cy_id&source',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'token: 1603aa00dcc4426ba83298341bab126b',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("supplierapi-demo.bill24.net")
payload = ''
headers = {
'Accept': 'application/json',
'token': '1603aa00dcc4426ba83298341bab126b',
}
conn.request("GET", "/payment/?d1=2024-01-20&d2=2024-02-14&customer_sync=null&payment_method=null¤cy_id=null&source=null", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Sample Response JSON:
{
"message": "DATA FOUND",
"data": [
{
"id": "UO1RlXW4",
"code": "644100001143",
"title": "",
"description": "",
"tran_date": "2024-02-01T17:30:44.373336",
"payment_type": "partial",
"payment_method": "cash",
"pay_from": null,
"tran_amount": 400,
"fee_amount": 0,
"total_amount": 400,
"currency_id": "KHR",
"customer_name": "Vi",
"supplier_fee": 0,
"sync_code": "",
"payment_ref": "",
"is_exported": false,
"source": "b24",
"bank_name": "Cash / Cheque",
"customer_org_code": "6441-000026",
"customer_sync_code": "RLIjQ45Z",
"bank_id": "",
"ext": {
"paid_to": "Heng group",
"paid_by": null
},
"bills": [
{
"due_date": "2024-03-01",
"code": "644198399",
"org_code": "98399",
"pay_amount": 400,
"customer_syn_code": "RLIjQ45Z",
"id": "2FecLCrO",
"total_amount": 6000,
"sync_code": "2FecLCrO",
"ext": {
"digit": "2",
"code": "",
"discount": "",
"tax": "",
"delivery": "",
"exchange_rate": "",
"less_withholding_tax": ""
},
"due_amount": 2000,
"bill_id": "2FecLCrO",
"bill_date": "2024-01-31"
}
],
"receipt_url": "https://demo.bill24.net/public/receipt/UO1RlXW4"
}
]
}