Webhooks
SplashPay uses webhooks to notify your application whenever a payment reaches a final state. Instead of continuously polling the Payment Status endpoint, configure a webhook endpoint to receive instant updates.Real-time Notifications
SplashPay automatically sends an HTTP POST request to your webhook URL whenever a payment status changes.
Configure Your Webhook URL
You can configure your webhook URL from the SplashPay Merchant Dashboard or via the Merchant API. Example:- Support HTTPS
- Accept HTTP POST requests
- Return HTTP 200 OK after successful processing
- Be publicly accessible
Webhook Events
SplashPay currently sends the following events.| Event | Description |
|---|---|
payment.success | Payment completed successfully. |
payment.failed | Payment failed. |
payment.cancelled | Payment was cancelled by the customer or provider. |
payment.expired | Payment expired before completion. |
Sample Webhook
SplashPay sends webhook notifications using the following JSON structure.Webhook Payload
| Field | Type | Description |
|---|---|---|
event | string | Event name. |
created_at | datetime | Time the webhook was generated. |
data.reference | string | Merchant payment reference. |
data.amount | decimal | Payment amount. |
data.fee | decimal | Processing fee charged. |
data.net_amount | decimal | Amount settled after fees. |
data.currency | string | Transaction currency. |
data.status | string | Payment status. |
data.customer_name | string | Customer full name. |
data.customer_email | string | Customer email. |
data.customer_phone | string | Customer phone number. |
data.payment_method | string | Payment method used. |
data.provider | string | Payment provider. |
data.channel | string | Provider channel or network. |
data.provider_reference | string | Provider transaction reference. |
data.metadata | object/null | Merchant-defined metadata. |
Verify Webhook Signature
Every webhook request includes a signature that allows you to verify the payload originated from SplashPay.| Header | Description |
|---|---|
X-SPLASHPAY-SIGNATURE | HMAC SHA-256 signature of the payload |
X-SPLASHPAY-TIMESTAMP | Unix timestamp used to generate the signature |
X-SPLASHPAY-SIGNATURE header, the request is authentic.
Example Verification (PHP)
Example Verification (Node.js)
Return HTTP 200
After successfully processing the webhook, return:Retry Policy
If SplashPay does not receive a successful response (HTTP 200), the webhook will be retried automatically.
| Attempt | Delay |
|---|---|
| 1 | Immediately |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 15 minutes |
| 5 | 30 minutes |
| 6 | 1 hour |
| 7 | 6 hours |
| 8 | 24 hours |
Best Practices
Process asynchronously
Respond with HTTP 200 immediately, then process the webhook in the background.
Use idempotent processing
The same webhook may be delivered more than once. Use the payment
reference to avoid duplicate processing.Store provider references
Persist both the merchant reference and provider reference for reconciliation.
Event Lifecycle
Testing Webhooks
During development you can expose your local server using tools such as:- ngrok
- Cloudflare Tunnel
- LocalTunnel
Supported Payment Methods
Webhooks are sent for all SplashPay collection methods:- Mobile Money
- Card Payments
- Dynamic TANQR
Next Steps
Payment Status
Retrieve the latest status of any payment.
Collections Overview
Learn more about SplashPay Collections.
