Webhook Integration
Real-time Payment Notifications
QRISLY sends webhook notifications whenever there's a change in payment status. Implement webhooks to get real-time payment confirmation in your application.
How Webhook Work
After a customer pays through QRIS, QRISLY will:
- Receive payment notification from payment provider
- Validate payment details
- Send webhook to your registered endpoint
- Your application processes the notification and updates order status
Setup Webhook Endpoint
Step 1: Create Webhook Receiver Endpoint
Create an HTTP POST endpoint in your application to receive webhook:
POST https://yourapp.com/webhook/qrisly
Step 2: Register Webhook URL
- Login to RajaOngkir dashboard
- Navigate to Webhook → QRISLY
- Make sure the APK Webhook configuration has been added
- Click "Outbound Webhook"
- Enter webhook URL: https://yourapp.com/webhook/qrisly
- Click Save
Webhook Events
Event: payment.success
Sent when payment is successfully received.
Webhook Payload:
{
"event": "payment.success",
"timestamp": "2025-01-14T10:35:22Z",
"data": {
"history_id": "8c5b8e8d-7b22-3e31-7a0e-0d5a2d1d6c09",
"qris_id": "9d6c9f9e-8c33-4f42-8b1f-0e6a3e2e7d10",
"amount": 100001,
"original_amount": 100000,
"status": "paid",
"paid_at": "2025-01-14T10:35:22Z",
"payment_method": "Bank Transfer",
"payment_provider": "Bank BCA",
"created_at": "2025-01-14T10:30:00Z"
}
}
Event: payment.expired
Sent when QRIS has expired and there's no payment.
Webhook Payload:
{
"event": "payment.expired",
"timestamp": "2025-01-15T23:59:59Z",
"data": {
"history_id": "8c5b8e8d-7b22-3e31-7a0e-0d5a2d1d6c09",
"qris_id": "9d6c9f9e-8c33-4f42-8b1f-0e6a3e2e7d10",
"amount": 100001,
"status": "expired",
"created_at": "2025-01-14T10:30:00Z",
"expired_at": "2025-01-15T23:59:59Z"
}
}
Webhook Response
Your endpoint must return HTTP 200 OK with a JSON response:
{
"success": true,
"message": "Webhook received and processed"
}
If your application fails to process the webhook, QRISLY will retry 3 times with exponential backoff:
- Retry 1: After 1 minute
- Retry 2: After 5 minutes
- Retry 3: After 15 minutes