Dokumentasi Developer
Dokumentasi API
Panduan integrasi H2H Lutijalpay. REST · JSON · HTTPS only, autentikasi lewat API Key.
01
API Key
Setiap akun punya satu kredensial untuk autentikasi. API Key bisa dilihat & disalin di halaman API Keys.
| Kredensial | Header | Fungsi |
|---|---|---|
| API Key | x-api-keywajib | Kunci rahasia untuk autentikasi — satu-satunya header wajib di setiap request. Bisa di-regenerate lewat halaman Profil & API. |
x-api-key wajib dikirim di setiap request.
02
Base URL & Autentikasi
Sertakan API Key di header setiap request.
// Base URL
const BASE_URL = 'https://lutijalpay.my.id';
// Header Autentikasi
const headers = {
'x-api-key': 'YOUR_API_KEY' // wajib
};
API Key tersedia di halaman API Keys. Jangan bagikan ke siapapun.
03
Deposit QRIS
4 endpointPOST /api/deposit/create Buat Invoice
Membuat invoice QRIS baru untuk deposit saldo. User diambil otomatis dari API Key.
| Parameter | Tipe | Keterangan |
|---|---|---|
| amountwajib | integer | Nominal deposit (min 500, max 1.000.000) |
Request
const res = await fetch('https://lutijalpay.my.id/api/deposit/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({ amount: 50000 })
});
const data = await res.json();
Response
// 200 OK
{
"success": true,
"deposit": {
"id": "DP17500001234567",
"amount": 50000,
"total_payment": 50000,
"qr_image": "https://imgbb.46dhygfadgs.png",
"status": "pending",
"expired_at": "2027-06-17T11:00:00.000Z"
}
}
// 400 Bad Request
{ "success": false, "error": "Minimal deposit Rp500" }
GET /api/deposit/status/:id Cek Status
Mengecek status deposit. id dikirim lewat URL.
| Parameter | Tipe | Keterangan |
|---|---|---|
| idwajib | URL param | ID deposit dari create |
Request
const res = await fetch('https://lutijalpay.my.id/api/deposit/status/DP17500001234567', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
Response
// pending
{ "success": true, "status": "pending", "message": "Menunggu pembayaran" }
// success
{ "success": true, "status": "success", "message": "Deposit berhasil! Saldo bertambah." }
GET /api/deposit/history Riwayat Deposit
Daftar deposit milik pemilik API Key, terbaru duluan.
| Parameter | Tipe | Keterangan |
|---|---|---|
| limitopsional | query | Jumlah data (default 20, maks 100) |
Request
const res = await fetch('https://lutijalpay.my.id/api/deposit/history?limit=10', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
Response
{
"success": true,
"deposits": [
{ "id": "DP17500001234567", "amount": 50000, "status": "success", "created_at": 1750000000000 }
]
}
POST /api/deposit/cancel Batalkan Deposit
Membatalkan deposit dengan status pending.
| Parameter | Tipe | Keterangan |
|---|---|---|
| deposit_idwajib | string | ID deposit yang ingin dibatalkan |
Request
const res = await fetch('https://lutijalpay.my.id/api/deposit/cancel', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({ deposit_id: 'DP17500001234567' })
});
Response
// 200 OK
{ "success": true, "message": "Deposit berhasil dibatalkan" }
// 400 Bad Request
{ "success": false, "error": "Deposit status success, tidak bisa dibatalkan" }
04
Contoh Implementasi
Integrasi lengkap dengan Node.js / axios:
const axios = require('axios');
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://lutijalpay.my.id';
const authHeaders = { 'x-api-key': API_KEY };
// Buat Deposit
async function createDeposit(amount) {
const res = await axios.post(`${BASE_URL}/api/deposit/create`, {
amount: amount
}, { headers: authHeaders });
return res.data;
}
// Cek Status
async function checkStatus(depositId) {
const res = await axios.get(`${BASE_URL}/api/deposit/status/${depositId}`, {
headers: authHeaders
});
return res.data;
}
// Batalkan Deposit
async function cancelDeposit(depositId) {
const res = await axios.post(`${BASE_URL}/api/deposit/cancel`, {
deposit_id: depositId
}, { headers: authHeaders });
return res.data;
}
Mau coba langsung? Tes semua endpoint di atas tanpa Postman lewat API Playground.
Butuh bantuan? Hubungi CS kami di Telegram.