🚀 Sibagi Payment API

Payment Gateway Integration with QRIS Support

v1.0.0 Status: Active

✨ Features

🔄 Multi Account

Support multiple beneficiary accounts

📱 QRIS Generation

Auto generate QR code images

🔔 Webhook Callback

Real-time payment notifications

⏰ Auto Polling

Automatic status checking

🚀 Quick Start

1. Create Transaction with Callback

POST http://genjot.quinellastore.my.id/transaction Content-Type: application/json { "amount": 15000, "beneficiaryUsername": "masjjoooo", "callbackUrl": "https://your-server.com/callback" }

✅ Recommended: Use callbackUrl for automatic payment notification when status is SUCCESS

📡 API Endpoints

POST Create Transaction

http://genjot.quinellastore.my.id/transaction

Create new payment transaction and generate QRIS string.

Request Body:

amount (number) Required

Payment amount (minimum: 1000)

beneficiaryUsername (string) Required

Sibagi username of payment recipient

callbackUrl (string) Optional

URL to receive payment notification (auto polling enabled)

email (string) Optional

Donor email (auto-generated if not provided)

name (string) Optional

Donor name (auto-generated if not provided)

message (string) Optional

Donation message (auto-generated if not provided)

Response Example:

{ "success": true, "data": { "donationId": "abc123xyz", "beneficiaryUsername": "masjjoooo", "transactionId": "TRX-123456", "amount": 15700, "qrisString": "00020101021...", "status": "PENDING", "expiredAt": "2026-10-12T12:00:00Z", "redirectUrl": "https://sibagi.com/donate/abc123xyz", "callbackUrl": "https://your-server.com/callback", "identity": { "email": "acakin12345@okekang.my.id", "name": "acakin12345", "message": "acakin12345" } } }

GET Get Transaction Status

http://genjot.quinellastore.my.id/transaction/:donationId?beneficiaryUsername=xxx

Check current payment status.

Parameters:

donationId (path) Required

Donation ID from create transaction response

beneficiaryUsername (query) Required

Beneficiary username

Response Example:

{ "success": true, "data": { "id": "abc123xyz", "status": "SUCCESS", "amount": 15000, "email": "acakin12345@okekang.my.id", "name": "acakin12345", "lastModifiedDate": "2026-10-12T11:45:00Z", "beneficiaryUsername": "masjjoooo" } }

POST Generate QRIS with Image

http://genjot.quinellastore.my.id/qris

Create transaction and generate QRIS as PNG image file.

Request Body:

amount (number) Required

Payment amount (minimum: 1000)

beneficiaryUsername (string) Required

Sibagi username of payment recipient

callbackUrl (string) Optional

URL to receive payment notification

Response Example:

{ "success": true, "data": { "donationId": "abc123xyz", "qrisFile": "D:\\paymenthub\\qris\\qris-abc123xyz.png", "qrisFilename": "qris-abc123xyz.png", ... } }
📁 Note: QRIS images are saved in qris/ folder with filename format: qris-{donationId}.png

POST Start Manual Polling

http://genjot.quinellastore.my.id/polling/start

Start background polling for payment status (not needed if using callbackUrl).

Request Body:

donationId (string) Required

Donation ID to monitor

beneficiaryUsername (string) Required

Beneficiary username

interval (number) Optional

Check interval in seconds (default: 10)

timeout (number) Optional

Max polling duration in seconds (default: 1800)

webhookUrl (string) Optional

Webhook URL for status notification

GET Get Polling Status

http://genjot.quinellastore.my.id/polling/:donationId

Check current polling status.

POST Stop Polling

http://genjot.quinellastore.my.id/polling/stop/:donationId

Stop active polling for a donation.

GET Get Active Polls

http://genjot.quinellastore.my.id/polling/active

List all currently active polling operations.

GET Get Registered Callbacks

http://genjot.quinellastore.my.id/callbacks

List all registered callback URLs.

🔔 Callback Payload

When payment status changes to SUCCESS, the following payload is sent to your callbackUrl:

{ "donationId": "abc123xyz", "beneficiaryUsername": "masjjoooo", "status": "SUCCESS", "transactionData": { "id": "abc123xyz", "amount": 15000, "status": "SUCCESS", "email": "donor@example.com", "name": "John Doe", "lastModifiedDate": "2026-10-12T11:45:00Z" }, "message": "Payment completed successfully", "timestamp": "2026-10-12T11:45:00.123Z" }
💡 Tip: Use webhook.site to test callbacks during development.

📊 Payment Status

PENDING

Waiting for payment

SUCCESS

Payment completed successfully

EXPIRED

QRIS expired (30 minutes timeout)

FAILED

Payment failed

CANCELED

Payment canceled

⚙️ Configuration

Environment variables (.env file):

PORT=3000 PAYMENT_METHOD=QRIS EMAIL_DOMAIN=okekang.my.id QRIS_OUTPUT_FILE=qris.png CHECK_INTERVAL=10 CHECK_TIMEOUT=1800