Subscribe to webhooks for real-time updates and use polling only as a backup for dashboards.
Payment webhook events
| Event | Description |
|---|---|
payment.created | A new payment request was created (initiated by customer). |
payment.pending_authorization | Payment is awaiting authorization (for example, Pay Later checks). |
payment.authorized | Payment has been authorized and funds are on hold. |
payment.completed | Payment has been captured or charged successfully. |
payment.settled | Payment funds have been settled to the merchant. |
payment.refunded | Payment was fully refunded. |
payment.refund_partial | Payment was partially refunded. |
payment.rejected | Payment was rejected before authorization. |
payment.failed | Payment processing failed. |
payment.reversed | Payment was reversed after completion. |
payment.voided | Payment authorization was voided. |
RTP Now
EndpointsPOST /v1/aggregators/{{aggregator_id}}/paymentsGET /v1/aggregators/{{aggregator_id}}/payments/{{payment_id}}(optional polling)
Create the payment
Call
POST /v1/aggregators/{{aggregator_id}}/payments with type: "RTP_NOW", debtor details, amount, and a unique request_id.Poll or wait for webhook
Your frontend polls your backend, which either polls Safepay or waits for a webhook event.
Safepay forwards the status
Webhooks contain the final decision; update your systems and UI accordingly.
Webhook events to expect
Expectpayment.created, payment.pending_authorization, and a terminal state such as payment.completed, payment.settled, payment.rejected, or payment.failed.
RTP Later
EndpointsPOST /v1/aggregators/{{aggregator_id}}/paymentsGET /v1/aggregators/{{aggregator_id}}/payments/{{payment_id}}(optional polling)
Expose refresh options
Customers may take longer to act, so offer manual refresh buttons or background polling.
Webhook events to expect
Expectpayment.created, payment.pending_authorization, and a terminal state such as payment.completed, payment.settled, payment.rejected, or payment.failed.
Dynamic QR
EndpointsPOST /v1/aggregators/{{aggregator_id}}/qrsGET /v1/aggregators/{{aggregator_id}}/payments/{{payment_id}}(optional polling)
Generate QR per transaction
Call
POST /v1/aggregators/{{aggregator_id}}/qrs with type: "DYNAMIC" and the amount.Customer scans and pays
The banking app handles authentication. You do not know the debtor until the webhook arrives.
Webhook events to expect
Expectpayment.created, payment.completed, and payment.settled, plus payment.failed or payment.rejected when the customer abandons or cancels.
Static QR
EndpointsPOST /v1/aggregators/{{aggregator_id}}/qrsGET /v1/aggregators/{{aggregator_id}}/qrs/{{qr_id}}/payments(list QR payments)
Create once
Call
POST /v1/aggregators/{{aggregator_id}}/qrs without specifying an amount. Store the QR for reuse.Safepay notifies you per payment
Use the webhook payload to match against the expected amount. Static QRs can receive multiple payments.
Combine webhooks with periodic polling of
GET /v1/aggregators/{{aggregator_id}}/payments when building dashboards; polling is still helpful if your webhook endpoint is temporarily unavailable.Webhook events to expect
Expectpayment.created, payment.completed, and payment.settled for each payment made against the QR.