Integrate pembayaran QRIS langsung ke aplikasi Anda
Gunakan ShannonPay untuk membuat transaksi QRIS, menerima payment link, memeriksa status pembayaran, membatalkan transaksi, membaca saldo merchant, dan mengambil riwayat transaksi menggunakan API Key.
https://shannon.web.id/api/v1
Autentikasi API
Semua endpoint Public API ShannonPay memerlukan API Key. Kirim API Key melalui HTTP Authorization header menggunakan format Bearer Token.
Authorization
Gunakan API Key yang tersedia di Dashboard Merchant pada bagian Integrasi API.
Authorization: Bearer YOUR_API_KEY
Content Type
Request JSON menggunakan Content-Type application/json. Response API juga dikembalikan dalam format JSON.
Content-Type: application/json
Contoh Header
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Mulai dalam beberapa langkah
Flow dasar integrasi ShannonPay adalah membuat transaksi, memberikan checkout URL kepada pelanggan, lalu memonitor statusnya.
Generate
Panggil
/qris/generate
dengan nominal pembayaran.
Checkout
Ambil
checkout_url
dari response.
Bayar
Kirim checkout URL kepada pelanggan.
Status
Gunakan endpoint status untuk memeriksa pembayaran.
Cek Saldo Merchant
Mengambil saldo dan nama merchant yang terkait dengan API Key.
Saldo Merchant
Mengambil informasi saldo akun merchant.
/saldo
curl -X GET "https://shannon.web.id/api/v1/saldo" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"message": "Success",
"data": {
"balance": 2000,
"name": "Arthur"
}
}
Daftar Transaksi
Mengambil transaksi terbaru milik merchant. Default limit adalah 20 dan dapat diatur melalui query parameter.
Daftar Transaksi
Data transaksi diurutkan dari yang terbaru.
/transactions
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
limit
|
integer | Tidak | Jumlah transaksi. Default 20. |
curl -X GET "https://shannon.web.id/api/v1/transactions?limit=20" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"message": "Success",
"data": {
"transactions": [
{
"transaction_id": "b202271b-8784-4a63-b8c3-4dfc3114594d",
"order_id": "ARTSHNN-1786724901-5810",
"amount": 100000,
"fee": 4000,
"total": 104000,
"status": "EXPIRED",
"checkout_url": "https://shannon.web.id/pay/b202271b-8784-4a63-b8c3-4dfc3114594d",
"qr_url": "https://shannon.web.id/pay/b202271b-8784-4a63-b8c3-4dfc3114594d/qr",
"expiry_time": "2026-08-14 23:43:21",
"created_at": "2026-08-14T16:28:21.890Z",
"paid_at": null
}
]
}
}
Detail Transaksi
Mengambil satu transaksi berdasarkan Transaction ID. Hanya transaksi milik merchant yang dapat diakses.
Detail Transaksi
Mengambil informasi lengkap transaksi.
/transactions/:id
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
id
|
string | Wajib | Transaction ID. |
curl -X GET "https://shannon.web.id/api/v1/transactions/TRANSACTION_ID" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"message": "Success",
"data": {
"transaction_id": "b202271b-8784-4a63-b8c3-4dfc3114594d",
"order_id": "ARTSHNN-1786724901-5810",
"amount": 100000,
"fee": 4000,
"total": 104000,
"status": "EXPIRED",
"checkout_url": "https://shannon.web.id/pay/b202271b-8784-4a63-b8c3-4dfc3114594d",
"qr_url": "https://shannon.web.id/pay/b202271b-8784-4a63-b8c3-4dfc3114594d/qr",
"expiry_time": "2026-08-14 23:43:21",
"created_at": "2026-08-14T16:28:21.890Z",
"paid_at": null
}
}
Generate QRIS
Membuat transaksi QRIS baru. Response berisi Transaction ID, Order ID, nominal, fee, total, status, checkout URL, QR URL, expiry time, dan timestamp.
Generate Transaksi QRIS
Nominal minimum Rp1.000 dan maksimum Rp10.000.000.
/qris/generate
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
amount
|
number | Wajib | Nominal dalam rupiah. Minimum 1.000, maksimum 10.000.000. |
curl -X POST "https://shannon.web.id/api/v1/qris/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000
}'
{
"success": true,
"message": "Success",
"data": {
"transaction_id": "e9883c8e-8eb0-4c59-b5c3-909c22acf8ca",
"order_id": "ARTSHNN-1786712909-7025",
"amount": 10000,
"fee": 400,
"total": 10400,
"status": "PENDING",
"checkout_url": "https://shannon.web.id/pay/e9883c8e-8eb0-4c59-b5c3-909c22acf8ca",
"qr_url": "https://shannon.web.id/pay/e9883c8e-8eb0-4c59-b5c3-909c22acf8ca/qr",
"expiry_time": "2026-08-14 20:23:29",
"created_at": "2026-08-14T13:08:29.031Z",
"paid_at": null
}
}
checkout_url kepada pelanggan.
URL tersebut merupakan halaman pembayaran ShannonPay.
Status QRIS
Memeriksa status terbaru transaksi berdasarkan Transaction ID.
Cek Status Pembayaran
/qris/status
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
transaction_id
|
string | Wajib | Transaction ID dari Generate QRIS. |
curl -X POST "https://shannon.web.id/api/v1/qris/status" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "TRANSACTION_ID"
}'
{
"success": true,
"message": "Success",
"data": {
"transaction_id": "TRANSACTION_ID",
"order_id": "ARTSHNN-...",
"amount": 10000,
"fee": 400,
"total": 10400,
"status": "PENDING",
"checkout_url": "https://shannon.web.id/pay/TRANSACTION_ID",
"qr_url": "https://shannon.web.id/pay/TRANSACTION_ID/qr",
"expiry_time": "2026-08-14 20:23:29",
"created_at": "2026-08-14T13:08:29.031Z",
"paid_at": null
}
}
{
"success": true,
"message": "Pembayaran berhasil",
"data": {
"transaction_id": "TRANSACTION_ID",
"order_id": "ARTSHNN-...",
"amount": 10000,
"fee": 400,
"total": 10400,
"status": "SETTLED",
"checkout_url": "https://shannon.web.id/pay/TRANSACTION_ID",
"qr_url": "https://shannon.web.id/pay/TRANSACTION_ID/qr",
"expiry_time": "2026-08-14 20:23:29",
"created_at": "2026-08-14T13:08:29.031Z",
"paid_at": "2026-08-14 20:10:01"
}
}
Cancel QRIS
Membatalkan transaksi yang masih berstatus PENDING.
Batalkan Transaksi
/qris/cancel
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
transaction_id
|
string | Wajib | Transaction ID yang akan dibatalkan. |
curl -X POST "https://shannon.web.id/api/v1/qris/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "TRANSACTION_ID"
}'
{
"success": true,
"message": "Transaksi berhasil dibatalkan",
"data": {
"transaction_id": "TRANSACTION_ID",
"order_id": "ARTSHNN-...",
"amount": 10000,
"fee": 400,
"total": 10400,
"status": "CANCEL",
"checkout_url": "https://shannon.web.id/pay/TRANSACTION_ID",
"qr_url": "https://shannon.web.id/pay/TRANSACTION_ID/qr",
"expiry_time": "2026-08-14 20:23:29",
"created_at": "2026-08-14T13:08:29.031Z",
"paid_at": null
}
}
Checkout URL
Setiap transaksi QRIS menghasilkan checkout URL yang dapat digunakan pelanggan untuk membuka halaman pembayaran ShannonPay.
Generate
POST ke
/qris/generate.
Ambil URL
Ambil nilai
checkout_url.
Kirim
Kirim link melalui website, WhatsApp, email, atau aplikasi.
Bayar
Pelanggan membuka link dan menyelesaikan pembayaran QRIS.
Format Checkout URL
https://shannon.web.id/pay/TRANSACTION_ID
QR URL
https://shannon.web.id/pay/TRANSACTION_ID/qr
Node.js
Contoh integrasi menggunakan Node.js dan package Axios. API Key disimpan di environment variable agar tidak ditulis langsung di source code.
npm install axios
SHANNON_API_KEY=YOUR_API_KEY SHANNON_BASE_URL=https://shannon.web.id/api/v1
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SHANNON_API_KEY;
const BASE_URL = process.env.SHANNON_BASE_URL;
async function generateQris() {
const response = await axios.post(
`${BASE_URL}/qris/generate`,
{
amount: 10000
},
{
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
}
);
const data = response.data.data;
console.log('Transaction ID:', data.transaction_id);
console.log('Order ID:', data.order_id);
console.log('Total:', data.total);
console.log('Checkout URL:', data.checkout_url);
}
generateQris().catch((error) => {
console.error(
error.response?.data || error.message
);
});
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SHANNON_API_KEY;
const BASE_URL = process.env.SHANNON_BASE_URL;
async function checkStatus(transactionId) {
const response = await axios.post(
`${BASE_URL}/qris/status`,
{
transaction_id: transactionId
},
{
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
}
);
console.log(
response.data.data
);
}
checkStatus('TRANSACTION_ID').catch((error) => {
console.error(
error.response?.data || error.message
);
});
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SHANNON_API_KEY;
const BASE_URL = process.env.SHANNON_BASE_URL;
async function cancelQris(transactionId) {
const response = await axios.post(
`${BASE_URL}/qris/cancel`,
{
transaction_id: transactionId
},
{
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
}
);
console.log(
response.data
);
}
cancelQris('TRANSACTION_ID').catch((error) => {
console.error(
error.response?.data || error.message
);
});
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SHANNON_API_KEY;
const BASE_URL = process.env.SHANNON_BASE_URL;
async function getBalance() {
const response = await axios.get(
`${BASE_URL}/saldo`,
{
headers: {
Authorization: `Bearer ${API_KEY}`
}
}
);
console.log(
response.data.data
);
}
getBalance().catch((error) => {
console.error(
error.response?.data || error.message
);
});
Daftar Transaksi Node.js
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SHANNON_API_KEY;
const BASE_URL = process.env.SHANNON_BASE_URL;
async function getTransactions() {
const response = await axios.get(
`${BASE_URL}/transactions?limit=20`,
{
headers: {
Authorization: `Bearer ${API_KEY}`
}
}
);
for (const trx of response.data.data.transactions) {
console.log({
transaction_id: trx.transaction_id,
order_id: trx.order_id,
amount: trx.amount,
total: trx.total,
status: trx.status
});
}
}
getTransactions().catch((error) => {
console.error(
error.response?.data || error.message
);
});
PHP
Contoh integrasi PHP menggunakan cURL bawaan PHP. Simpan API Key di environment variable atau configuration server dan jangan menaruh API Key langsung di frontend.
Konfigurasi
<?php
$apiKey = getenv('SHANNON_API_KEY');
$baseUrl = 'https://shannon.web.id/api/v1';
<?php
$apiKey = getenv('SHANNON_API_KEY');
$ch = curl_init(
'https://shannon.web.id/api/v1/qris/generate'
);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10000
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode(
$response,
true
);
echo $data['data']['checkout_url'];
<?php
$apiKey = getenv('SHANNON_API_KEY');
$ch = curl_init(
'https://shannon.web.id/api/v1/qris/status'
);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'transaction_id' => 'TRANSACTION_ID'
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode(
$response,
true
);
echo $data['data']['status'];
<?php
$apiKey = getenv('SHANNON_API_KEY');
$ch = curl_init(
'https://shannon.web.id/api/v1/qris/cancel'
);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'transaction_id' => 'TRANSACTION_ID'
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode(
$response,
true
);
print_r($data);
<?php
$apiKey = getenv('SHANNON_API_KEY');
$ch = curl_init(
'https://shannon.web.id/api/v1/saldo'
);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode(
$response,
true
);
echo 'Saldo: Rp ' .
number_format(
$data['data']['balance'],
0,
',',
'.'
);
Daftar Transaksi PHP
<?php
$apiKey = getenv('SHANNON_API_KEY');
$ch = curl_init(
'https://shannon.web.id/api/v1/transactions?limit=20'
);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode(
$response,
true
);
foreach (
$data['data']['transactions']
as $transaction
) {
echo $transaction['order_id'] . PHP_EOL;
echo 'Rp ' .
number_format(
$transaction['amount'],
0,
',',
'.'
) . PHP_EOL;
echo $transaction['status'] . PHP_EOL;
echo PHP_EOL;
}
Status Transaksi
Status yang digunakan ShannonPay pada transaksi QRIS.