Cancel Payment
The Cancel Payment API allows you to cancel a payment that is still awaiting customer action. A payment can only be cancelled while it is in a pending state. Once a payment has been completed, failed, expired, or previously cancelled, it can no longer be cancelled.Note Cancellation only prevents the customer from completing the payment. If the payment has already been processed successfully, use refunds or reversals where applicable.
Endpoint
Authentication
Every request must include your API credentials.Example Request
- cURL
- JavaScript
- Python
- PHP
Request Body
Example Response
Error Responses
Payment Already Completed
Payment Expired
Payment Not Found
Cancellable Statuses
Webhook Notification
If your merchant account has a webhook endpoint configured, SplashPay sends apayment.cancelled event after the payment has been successfully cancelled.
The webhook is dispatched only after the cancellation has been confirmed and the transaction has been updated in SplashPay.
Event
Sample Webhook
Best Practices
1
Cancel only pending payments
Call the Cancel Payment endpoint before the customer completes the payment. Once payment is successful, it cannot be cancelled.
2
Use the merchant reference
Always store the merchant reference returned when creating the payment. It is required to cancel or check the payment status.
3
Verify the final status
After cancelling a payment, you can use the Check Payment Status endpoint to confirm that the payment status is
cancelled.4
Handle webhook notifications
If your application receives webhook events, update your local payment record whenever a
payment.cancelled event is received.Related Guides
Check Payment Status
Retrieve the latest status of a payment.
Webhooks
Receive real-time payment events.
Mobile Money
Accept Mobile Money payments.
Dynamic TanQR
Accept payments using Dynamic TanQR.
