ShopeePay Payment Gateway
Dokumentasi API untuk otomasi pembayaran QRIS ShopeePay merchant milik kamu. Generate QRIS dinamis, deteksi mutasi real-time, dan integrasi bot / web store. Fitur ini opsional & dapat diaktifkan langsung oleh owner.
https://YOUR-DOMAIN
Pengenalan
Mode ShopeePay memungkinkan kamu menerima pembayaran via QRIS ShopeePay merchant sendiri secara otomatis. Uang masuk ke akun Shopee merchant kamu (bukan saldo shared PG / withdraw). Cocok untuk bot Telegram, web store, top-up otomatis, dan sistem kasir.
QRIS Dinamis
Convert QRIS static merchant jadi dinamis dengan nominal per order.
Deteksi Mutasi
Ambil daftar transaksi Shopee Partner untuk mencocokkan nominal + status success.
Siap Integrasi
API sederhana (REST + Bearer token) untuk Node.js, Python, PHP, bot, dll.
- Docs Payment Gateway — Saldo, mutasi, withdraw otomatis (QRIS Gateway)
- Docs ini (ShopeePay) — token + QRIS toko sendiri, butuh owner buka fitur
Syarat Fitur Khusus
- Owner mengaktifkan fitur ShopeePay di
/admin(tombol Buka SP) - Connect token Shopee Partner di portal (menu ShopeePay)
- Scan / simpan QRIS Static toko merchant Anda
- Gunakan API Key unik Anda untuk integrasi bot/web store
Autentikasi
Semua request (kecuali gambar QR) memerlukan API Key via header
Authorization dengan format Bearer Token.
Setiap pengguna punya API Key berbeda agar transaksi tidak tabrakan.
Login di Portal Penyewa untuk menampilkan API Key Anda di sini.
Daftar / Login PortalAuthorization: Bearer js_API_KEY_ANDA
Env bot / store
Cara Mulai
- Buka /portal → daftar (wajib
/startbot Telegram dulu agar OTP masuk) - Minta owner mengaktifkan fitur khusus ShopeePay untuk akun Anda
- Menu ShopeePay → Connect token + scan QRIS Static toko Anda
- Salin API Key dari Settings portal
- Integrasikan endpoint di bawah ke bot / backend toko kamu
- Setup portal (token + QRIS)
- Panggil API create QRIS → tampilkan ke pelanggan
- Polling transaksi → cocokkan amount & status
success
Token Shopee Partner
Token Shopee Partner Merchant disediakan langsung oleh Owner Gateway.
ShopeePay — Status
Cek status koneksi ShopeePay dan validitas token merchant yang tersimpan di akun penyewa.
/shopeepay/status
Response
{
"success": true,
"message": "ShopeePay status",
"data": {
"connected": true,
"token_valid": true,
"mode": "tenant_shopeepay",
"shopee_pay_enabled": true
}
}
| Field | Keterangan |
|---|---|
connected | Apakah token Shopee tersimpan / terhubung |
token_valid | Apakah token masih bisa dipakai (test call ke Shopee API) |
mode |
tenant_shopeepay = mode merchant sendiri (ShopeePay aktif + token + QRIS terisi)tenant_shared = mode QRIS Gateway (fitur khusus belum aktif / belum setup)
|
shopee_pay_enabled | Apakah owner sudah membuka fitur khusus ShopeePay |
ShopeePay — Transaksi
Ambil daftar transaksi ShopeePay merchant. Default: 3 hari terakhir.
Hanya mutasi milik token kamu (mode tenant_shopeepay).
/shopeepay/transactions?pageSize=10
Parameter (Query)
| Param | Tipe | Default | Keterangan |
|---|---|---|---|
startTime | unix timestamp | 3 hari lalu | Waktu mulai |
endTime | unix timestamp | sekarang | Waktu akhir |
pageSize | integer | 10 | Jumlah per halaman |
Response
{
"success": true,
"message": "Transactions retrieved",
"data": {
"mode": "tenant_shopeepay",
"transactions": [
{
"amount": 10047,
"status": "success",
"issuer": "DANA",
"time": "2026-06-10 23:21:44"
}
]
}
}
Status Transaksi
ShopeePay — Generate QRIS
Generate QRIS dinamis dari static QRIS merchant.
Jika qris_static tidak dikirim, sistem memakai QRIS static yang sudah disimpan di portal (menu ShopeePay).
QR URL valid ±15 menit, otomatis dihapus setelah expired.
/shopeepay/qris/create
Request Body
{
"amount": 50000,
"qris_static": "00020101021126..."
}
| Param | Tipe | Keterangan | |
|---|---|---|---|
amount | integer | wajib | Nominal dalam IDR (bilangan bulat) |
qris_static |
string | opsional* | String QRIS statis sticker merchant. *Wajib jika belum diset di portal ShopeePay. |
Response
{
"success": true,
"message": "QRIS created successfully",
"data": {
"amount": 50000,
"qr_string": "00020101021226610016ID.CO.SHOPEE.WWW...",
"qr_url": "https://YOUR-DOMAIN/shopeepay/qr/6ff2cd1d04c5e4e7",
"transaction_time": "2026-06-11 14:30:00",
"expiry_time": "2026-06-11 14:45:00",
"mode": "tenant_shopeepay"
}
}
| Field | Keterangan |
|---|---|
qr_url | URL gambar QR (PNG). Expired otomatis setelah 15 menit → 404 |
qr_string | Raw QRIS string untuk render sendiri |
expiry_time | Waktu QR expired (WIB) |
mode | Harus tenant_shopeepay jika setup lengkap |
ShopeePay — QR Image
Ambil gambar QR yang di-generate. Endpoint ini publik (tanpa API Key), ID sudah random & berumur pendek.
/shopeepay/qr/:id
| Query | Keterangan |
|---|---|
format=png | Default — image/png |
format=svg | SVG |
format=raw | Plain text QRIS string |
format=json | JSON metadata |
ShopeePay — Contoh Bot Payment
Contoh implementasi bot pembayaran otomatis. Bot membuat QRIS dengan nominal unik, lalu polling transaksi untuk deteksi pembayaran.
- Buat QRIS dengan nominal dasar + angka acak (1–99) supaya unik
- Tampilkan QR ke pelanggan
- Polling
GET /shopeepay/transactionssetiap 5 detik - Jika ada transaksi nominal cocok & status
"success"= berhasil
Node.js
Python
Error Umum
| Pesan / status | Arti | Solusi |
|---|---|---|
| 401 Unauthorized | API Key salah / kosong | Salin ulang dari portal Settings |
| Fitur ShopeePay terkunci | Owner belum membuka fitur ShopeePay | Minta owner aktifkan fitur ShopeePay di tab Merchant /admin |
| Token Shopee Partner belum di-set | Belum connect token | Portal → ShopeePay → Connect Token |
| token_valid: false / TOKEN_INVALID | Token expired / salah | Hubungi Owner Gateway untuk mendapatkan token baru |
| QRIS static belum di-set | Belum scan sticker | Portal → ShopeePay → Upload / scan QRIS |
| mode: tenant_shared | Setup ShopeePay mandiri belum lengkap | Cek token + QRIS toko, lalu cek status lagi |
Butuh integrasi dengan saldo otomatis & withdraw? Lihat Docs Payment Gateway.