. Create an API key under API keys.API reference · Customers
QRIS payments
Send a QRIS invoice to a chat and get paid into your own Pakasir account (Indonesia, rupiah). The customer gets the QR code with the total and a payment page; when it is paid (confirmed with Pakasir), they get a thank-you message, a label, and their lead moves to the won stage. The invoice.paid webhook event follows.
Payment settings
/v1/payments/settingsWhether your Pakasir account is connected (the API key is never returned), the webhook URL to set in Pakasir, and what happens when an invoice is paid.
Responses
- 200Settings
Response fields
connectedbooleanrequiredproviderstringrequiredslugstring | nullrequiredhas_webhook_secretbooleanrequiredwebhook_urlstring | nullrequiredPut this as the webhook URL of your Pakasir project. Without it, unpaid invoices are checked every 2 minuteson_paidobject | nullrequiredon_paid.stagestring | nullrequiredLead stage when paid: a stage id,auto(the first won stage) or null (leave it)on_paid.labelstring | nullrequiredLabel put on the person when paid (null = none)on_paid.thank_youstring | nullrequiredMessage sent to the customer when paid;{total},{amount},{description},{order}are filled in. null = noneon_paid.set_valuebooleanrequiredUse the amount as the deal value when the lead has none (rupiah leads)min_amountintegerrequiredmax_amountintegerrequired
curl "https://api.chatkomodo.com/v1/payments/settings" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/settings', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/v1/payments/settings",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/v1/payments/settings', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"connected": true,
"provider": "pakasir",
"slug": "string",
"has_webhook_secret": true,
"webhook_url": "https://example.com/webhooks/chatkomodo",
"on_paid": {
"stage": "vip",
"label": "string",
"thank_you": "string",
"set_value": true
},
"min_amount": 150000,
"max_amount": 150000
}Connect Pakasir / change settings
/v1/payments/settingsDashboard loginYour Pakasir project slug and api_key (kept encrypted), an optional webhook_secret (Pakasir sends it as X-Secret; null removes it) and on_paid. Send only what changes. Business owner only. Recorded as payments.settings.
Request body
slugstringapi_keystringwebhook_secretstring | nullon_paidany
Responses
- 200Settings
Response fields
connectedbooleanrequiredproviderstringrequiredslugstring | nullrequiredhas_webhook_secretbooleanrequiredwebhook_urlstring | nullrequiredPut this as the webhook URL of your Pakasir project. Without it, unpaid invoices are checked every 2 minuteson_paidobject | nullrequiredon_paid.stagestring | nullrequiredLead stage when paid: a stage id,auto(the first won stage) or null (leave it)on_paid.labelstring | nullrequiredLabel put on the person when paid (null = none)on_paid.thank_youstring | nullrequiredMessage sent to the customer when paid;{total},{amount},{description},{order}are filled in. null = noneon_paid.set_valuebooleanrequiredUse the amount as the deal value when the lead has none (rupiah leads)min_amountintegerrequiredmax_amountintegerrequired
- 400
VALIDATION_FAILED - 403
FORBIDDEN: not the owner
curl -X PUT "https://api.chatkomodo.com/v1/payments/settings" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "tokoani",
"api_key": "YOUR_PAKASIR_API_KEY",
"webhook_secret": "a-secret-you-set-in-pakasir",
"on_paid": {
"stage": "auto",
"label": "paid",
"thank_you": "Thank you! We have received {total} for {description}.",
"set_value": true
}
}'const res = await fetch('https://api.chatkomodo.com/v1/payments/settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "tokoani",
"api_key": "YOUR_PAKASIR_API_KEY",
"webhook_secret": "a-secret-you-set-in-pakasir",
"on_paid": {
"stage": "auto",
"label": "paid",
"thank_you": "Thank you! We have received {total} for {description}.",
"set_value": true
}
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.put(
"https://api.chatkomodo.com/v1/payments/settings",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"slug": "tokoani",
"api_key": "YOUR_PAKASIR_API_KEY",
"webhook_secret": "a-secret-you-set-in-pakasir",
"on_paid": {
"stage": "auto",
"label": "paid",
"thank_you": "Thank you! We have received {total} for {description}.",
"set_value": True,
},
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('PUT', 'https://api.chatkomodo.com/v1/payments/settings', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'slug' => 'tokoani',
'api_key' => 'YOUR_PAKASIR_API_KEY',
'webhook_secret' => 'a-secret-you-set-in-pakasir',
'on_paid' => [
'stage' => 'auto',
'label' => 'paid',
'thank_you' => 'Thank you! We have received {total} for {description}.',
'set_value' => true,
],
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"connected": true,
"provider": "pakasir",
"slug": "string",
"has_webhook_secret": true,
"webhook_url": "https://example.com/webhooks/chatkomodo",
"on_paid": {
"stage": "vip",
"label": "string",
"thank_you": "string",
"set_value": true
},
"min_amount": 150000,
"max_amount": 150000
}Disconnect Pakasir
/v1/payments/settingsRemoves the account; existing invoices are kept but are no longer checked. Recorded as payments.disconnect.
Responses
- 200Done
Response fields
okbooleanrequired
- 403
FORBIDDEN: not the owner
curl -X DELETE "https://api.chatkomodo.com/v1/payments/settings" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/settings', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.delete(
"https://api.chatkomodo.com/v1/payments/settings",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('DELETE', 'https://api.chatkomodo.com/v1/payments/settings', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"ok": true
}List invoices
/v1/payments/invoicesNewest first, with totals: paid in the last 30 days (sandbox excluded) and still pending. Filter by status or phone.
Query parameters
statusstringphonestringlimitinteger
Responses
- 200Invoices
Response fields
invoicesarray of objectrequiredinvoices[].idstringrequiredinvoices[].order_idstringrequiredShown to the customer and in Pakasirinvoices[].session_idstringrequiredinvoices[].chat_idstringrequiredinvoices[].phonestring | nullrequiredinvoices[].descriptionstringrequiredinvoices[].amountintegerrequiredRupiah, what you receiveinvoices[].feeintegerrequiredPakasir's fee, added for the customerinvoices[].totalintegerrequiredWhat the customer paysinvoices[].currencystringrequiredinvoices[].statusstringrequiredinvoices[].sandboxbooleanrequiredPaid in Pakasir's sandbox (a test)invoices[].pay_urlstringrequiredThe payment page with the QR codeinvoices[].expires_atinteger | nullrequiredUnix time in millisecondsinvoices[].paid_atinteger | nullrequiredUnix time in millisecondsinvoices[].created_atintegerrequiredUnix time in millisecondsinvoices[].created_bystring | nullrequiredAgent id,ownerorapi-keytotalsobjectrequiredtotals.paid_30dintegerrequiredtotals.paid_amount_30dintegerrequiredtotals.pendingintegerrequiredtotals.pending_amountintegerrequiredcurrencystringrequired
curl "https://api.chatkomodo.com/v1/payments/invoices" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/invoices', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/v1/payments/invoices",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/v1/payments/invoices', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"invoices": [
{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"session_id": "YOUR_DEVICE_ID",
"chat_id": "+447700900123",
"phone": "+447700900123",
"description": "Short description",
"amount": 150000,
"fee": 1,
"total": 12,
"currency": "IDR",
"status": "pending",
"sandbox": true,
"pay_url": "https://example.com/file.jpg",
"expires_at": 1767225600000,
"paid_at": 1767225600000,
"created_at": 1767225600000,
"created_by": "string"
}
],
"totals": {
"paid_30d": 1,
"paid_amount_30d": 150000,
"pending": 1,
"pending_amount": 150000
},
"currency": "IDR"
}Send a QRIS invoice
/v1/payments/invoicesCreates a QRIS payment in your Pakasir account for amount rupiah (1 000 to 100 000 000; Pakasir adds its fee for the customer) and, unless send is false, sends the QR image with the total and a link to the payment page to the chat. When it is paid (webhook or the 2-minute check, always confirmed with Pakasir), the person moves to the won stage, gets the label and the thank-you message from the settings, and the invoice.paid webhook event fires. Recorded as invoice.create.
Request body
session_idstringrequiredchat_idstringA chat with a personphonestringInstead of chat_idamountintegerrequireddescriptionstringrequiredsendboolean
Responses
- 201The invoice
Response fields
idstringrequiredorder_idstringrequiredShown to the customer and in Pakasirsession_idstringrequiredchat_idstringrequiredphonestring | nullrequireddescriptionstringrequiredamountintegerrequiredRupiah, what you receivefeeintegerrequiredPakasir's fee, added for the customertotalintegerrequiredWhat the customer payscurrencystringrequiredstatusstringrequiredsandboxbooleanrequiredPaid in Pakasir's sandbox (a test)pay_urlstringrequiredThe payment page with the QR codeexpires_atinteger | nullrequiredUnix time in millisecondspaid_atinteger | nullrequiredUnix time in millisecondscreated_atintegerrequiredUnix time in millisecondscreated_bystring | nullrequiredAgent id,ownerorapi-key
- 400
VALIDATION_FAILED - 409
PAYMENTS_NOT_CONNECTED - 502
PAYMENT_PROVIDER_ERROR: Pakasir refused - 503
PAYMENT_PROVIDER_ERROR: Pakasir unreachable; try again
curl -X POST "https://api.chatkomodo.com/v1/payments/invoices" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"session_id": "YOUR_DEVICE_ID",
"phone": "+6281234567890",
"amount": 150000,
"description": "Order #1042"
}'const res = await fetch('https://api.chatkomodo.com/v1/payments/invoices', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"session_id": "YOUR_DEVICE_ID",
"phone": "+6281234567890",
"amount": 150000,
"description": "Order #1042"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.chatkomodo.com/v1/payments/invoices",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"session_id": "YOUR_DEVICE_ID",
"phone": "+6281234567890",
"amount": 150000,
"description": "Order #1042",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.chatkomodo.com/v1/payments/invoices', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'session_id' => 'YOUR_DEVICE_ID',
'phone' => '+6281234567890',
'amount' => 150000,
'description' => 'Order #1042',
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"session_id": "YOUR_DEVICE_ID",
"chat_id": "+447700900123",
"phone": "+447700900123",
"description": "Short description",
"amount": 150000,
"fee": 1,
"total": 12,
"currency": "IDR",
"status": "pending",
"sandbox": true,
"pay_url": "https://example.com/file.jpg",
"expires_at": 1767225600000,
"paid_at": 1767225600000,
"created_at": 1767225600000,
"created_by": "string"
}Get an invoice
/v1/payments/invoices/{id}One invoice with its status and payment page.
Path parameters
idstringrequired
Responses
- 200The invoice
Response fields
idstringrequiredorder_idstringrequiredShown to the customer and in Pakasirsession_idstringrequiredchat_idstringrequiredphonestring | nullrequireddescriptionstringrequiredamountintegerrequiredRupiah, what you receivefeeintegerrequiredPakasir's fee, added for the customertotalintegerrequiredWhat the customer payscurrencystringrequiredstatusstringrequiredsandboxbooleanrequiredPaid in Pakasir's sandbox (a test)pay_urlstringrequiredThe payment page with the QR codeexpires_atinteger | nullrequiredUnix time in millisecondspaid_atinteger | nullrequiredUnix time in millisecondscreated_atintegerrequiredUnix time in millisecondscreated_bystring | nullrequiredAgent id,ownerorapi-key
- 404
NOT_FOUND
curl "https://api.chatkomodo.com/v1/payments/invoices/ID" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/invoices/ID', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/v1/payments/invoices/ID",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/v1/payments/invoices/ID', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"session_id": "YOUR_DEVICE_ID",
"chat_id": "+447700900123",
"phone": "+447700900123",
"description": "Short description",
"amount": 150000,
"fee": 1,
"total": 12,
"currency": "IDR",
"status": "pending",
"sandbox": true,
"pay_url": "https://example.com/file.jpg",
"expires_at": 1767225600000,
"paid_at": 1767225600000,
"created_at": 1767225600000,
"created_by": "string"
}Check an invoice now
/v1/payments/invoices/{id}/checkAsks Pakasir for the status right away (at most every 5 seconds) and applies a payment.
Path parameters
idstringrequired
Responses
- 200The invoice
Response fields
idstringrequiredorder_idstringrequiredShown to the customer and in Pakasirsession_idstringrequiredchat_idstringrequiredphonestring | nullrequireddescriptionstringrequiredamountintegerrequiredRupiah, what you receivefeeintegerrequiredPakasir's fee, added for the customertotalintegerrequiredWhat the customer payscurrencystringrequiredstatusstringrequiredsandboxbooleanrequiredPaid in Pakasir's sandbox (a test)pay_urlstringrequiredThe payment page with the QR codeexpires_atinteger | nullrequiredUnix time in millisecondspaid_atinteger | nullrequiredUnix time in millisecondscreated_atintegerrequiredUnix time in millisecondscreated_bystring | nullrequiredAgent id,ownerorapi-key
- 404
NOT_FOUND
curl -X POST "https://api.chatkomodo.com/v1/payments/invoices/ID/check" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/invoices/ID/check', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.chatkomodo.com/v1/payments/invoices/ID/check",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.chatkomodo.com/v1/payments/invoices/ID/check', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"session_id": "YOUR_DEVICE_ID",
"chat_id": "+447700900123",
"phone": "+447700900123",
"description": "Short description",
"amount": 150000,
"fee": 1,
"total": 12,
"currency": "IDR",
"status": "pending",
"sandbox": true,
"pay_url": "https://example.com/file.jpg",
"expires_at": 1767225600000,
"paid_at": 1767225600000,
"created_at": 1767225600000,
"created_by": "string"
}Cancel an invoice
/v1/payments/invoices/{id}/cancelCancels an unpaid invoice at Pakasir (and its message, if still queued). If it turns out to be paid, it is marked paid instead. Recorded as invoice.cancel.
Path parameters
idstringrequired
Responses
- 200The invoice
Response fields
idstringrequiredorder_idstringrequiredShown to the customer and in Pakasirsession_idstringrequiredchat_idstringrequiredphonestring | nullrequireddescriptionstringrequiredamountintegerrequiredRupiah, what you receivefeeintegerrequiredPakasir's fee, added for the customertotalintegerrequiredWhat the customer payscurrencystringrequiredstatusstringrequiredsandboxbooleanrequiredPaid in Pakasir's sandbox (a test)pay_urlstringrequiredThe payment page with the QR codeexpires_atinteger | nullrequiredUnix time in millisecondspaid_atinteger | nullrequiredUnix time in millisecondscreated_atintegerrequiredUnix time in millisecondscreated_bystring | nullrequiredAgent id,ownerorapi-key
- 404
NOT_FOUND - 409
CONFLICT: not pending
curl -X POST "https://api.chatkomodo.com/v1/payments/invoices/ID/cancel" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/payments/invoices/ID/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.chatkomodo.com/v1/payments/invoices/ID/cancel",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.chatkomodo.com/v1/payments/invoices/ID/cancel', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"session_id": "YOUR_DEVICE_ID",
"chat_id": "+447700900123",
"phone": "+447700900123",
"description": "Short description",
"amount": 150000,
"fee": 1,
"total": 12,
"currency": "IDR",
"status": "pending",
"sandbox": true,
"pay_url": "https://example.com/file.jpg",
"expires_at": 1767225600000,
"paid_at": 1767225600000,
"created_at": 1767225600000,
"created_by": "string"
}Payment page (customer)
/public/invoice/{token}No authenticationThe page the customer opens from the invoice message (https://chatkomodo.com/pay/{token} shows it): business, description, total, the QR code and a PNG to save, refreshing until paid. No authentication.
Path parameters
tokenstringrequired
Responses
- 200HTML
- 404Unknown invoice (HTML)
curl "https://api.chatkomodo.com/public/invoice/YOUR_STORE_TOKEN"const res = await fetch('https://api.chatkomodo.com/public/invoice/YOUR_STORE_TOKEN', {
method: 'GET',
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/public/invoice/YOUR_STORE_TOKEN",
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/public/invoice/YOUR_STORE_TOKEN', [
]);
print_r(json_decode((string) $res->getBody(), true));HTML
Pakasir webhook (your project)
/public/pay/pakasir/{hook}No authenticationWhere your Pakasir project posts payments (webhook_url in the settings). Checks X-Secret when you set one; the payment is then confirmed with Pakasir's status API. No authentication.
Path parameters
hookstringrequired
Request body
order_idstringrequired
Responses
- 200Received
Response fields
okbooleanrequiredstatusstring
- 401Wrong
X-Secret - 404Unknown webhook address
curl -X POST "https://api.chatkomodo.com/public/pay/pakasir/HOOK" \
-H "Content-Type: application/json" \
-d '{
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X"
}'const res = await fetch('https://api.chatkomodo.com/public/pay/pakasir/HOOK', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.chatkomodo.com/public/pay/pakasir/HOOK",
json={
"order_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.chatkomodo.com/public/pay/pakasir/HOOK', [
'json' => [
'order_id' => '01JA5V6Q8M2H7G4K9P3T0R1S2X',
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"ok": true,
"status": "active"
}