List orders
curl --request GET \
--url https://api.kawan.digital/v1/orders \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kawan.digital/v1/orders', 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.kawan.digital/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"payment_reference": "<string>",
"amount": 123,
"subtotal": 123,
"currency": "IDR",
"settlement_channel": "<string>",
"payment_provider": "<string>",
"payment_method": "<string>",
"buyer": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"items": [
{
"type": "product",
"title": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bundle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkout_url": "<string>",
"payment_url": "<string>",
"requires_payment": true
}
],
"has_more": true
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid JSON body."
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Authorization header."
}
}{
"success": false,
"error": {
"code": "PLAN_REQUIRED",
"message": "Public API is not available on this store's plan."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded."
}
}Orders
List orders
payment_url / checkout_url are the hosted pay page on the store
domain (custom domain or free subdomain).
This endpoint does not start a gateway session. Use get-one for a
live Duitku payment URL.
GET
/
orders
List orders
curl --request GET \
--url https://api.kawan.digital/v1/orders \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kawan.digital/v1/orders', 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.kawan.digital/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"payment_reference": "<string>",
"amount": 123,
"subtotal": 123,
"currency": "IDR",
"settlement_channel": "<string>",
"payment_provider": "<string>",
"payment_method": "<string>",
"buyer": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"items": [
{
"type": "product",
"title": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bundle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkout_url": "<string>",
"payment_url": "<string>",
"requires_payment": true
}
],
"has_more": true
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid JSON body."
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Authorization header."
}
}{
"success": false,
"error": {
"code": "PLAN_REQUIRED",
"message": "Public API is not available on this store's plan."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded."
}
}Authorizations
API key from Dashboard → Developer API. Shown once when created.
Query Parameters
Available options:
pending, awaiting_verification, paid, failed, expired, refunded Inclusive created_at lower bound (ISO 8601).
Inclusive created_at upper bound (ISO 8601).
Required range:
x >= 0Required range:
1 <= x <= 50