Endpoint untuk login, cek transaksi terbaru, dan membuat QRIS dinamis.
Login menggunakan email dan password untuk mendapatkan access token.
Ambil 20 transaksi terbaru dengan header Authorization Bearer.
Ubah QRIS statis menjadi dinamis berdasarkan jumlah.
curl -X POST https://api-gopar-merch.vercel.app/api/login \
-H "content-type: application/json" \
-d '{
"email": "user@example.com",
"password": "your_password"
}'
{
"access_token": "eyJhbGciOi...",
"refresh_token": "eyJhbGciOi...",
"dbl_enabled": true
}
curl -X POST https://api-gopar-merch.vercel.app/api/cek-transaksi \
-H "content-type: application/json" \
-H "authorization: Bearer eyJhbGciOi..."
{
"scrapedAt": "2026-01-12T10:00:00.000Z",
"dateRange": "today",
"totalCount": 20,
"apiTotal": 20,
"transactions": [
{
"tanggalWaktu": "2026-01-12T10:40:15Z",
"idPesanan": "QRIS-04202601121040153l4zrADm9LID",
"idReferensiGopay": "04202601121040153l4zrADm9LID",
"tipePesanan": "GoFood",
"tipePembayaran": "qris",
"penjualanKotor": "Rp 25.000",
"jumlah": 25000,
"jumlahCents": 2500000,
"status": "success",
"issuer": "DANA",
"merchantId": "G692242439"
}
]
}
{"jumlah":"25.500"}.
Jika tidak ditemukan, API akan mengembalikan error "transaksi tidak ditemukan".
curl -X POST https://api-gopar-merch.vercel.app/api/create-payment \
-H "content-type: application/json" \
-H "authorization: Bearer eyJhbGciOi..." \
-d '{
"jumlah": "25.500"
}'
{
"jumlah": "25500",
"qris": "000201010212...",
"qris_image": "https://api-gopar-merch.vercel.app/qris_string=000201010212..."
}