Why 3DS?
Many East African banks and card issuers require 3D Secure authentication for online transactions. Trying to process without 3DS results in declines from the issuing bank. RohoPay uses a redirect-based 3DS flow:- Send your customer to the authentication page
- The customer completes bank OTP / PIN
- The provider redirects back to your
return_url - A webhook confirms the authoritative final status
Step-by-Step Flow
Step 1: Initiate Payment
Step 2: User Completes 3DS
The user is taken to the provider’s secure page where they authenticate with their bank. Your app has no role in this step — do not try to embed it in an iframe.Step 3: Handle the Return URL
After 3DS completes (success or failure), the provider redirects the user to yourreturn_url with query parameters:
Step 4: Poll or Wait for Webhook
After the user returns to your app, verify the true transaction status:Expiry Validation
RohoPay validates card expiry on submission — expired cards return a 400 error before the payment is attempted:Return URL Query Parameters
| Parameter | Description |
|---|---|
status | success or failed (provisional only) |
reference | RohoPay internal_reference |
order_ref | Provider internal reference |
Common Issues
User closes the browser before completing 3DS
User closes the browser before completing 3DS
The transaction stays at
pending. It will eventually expire on the provider side. No charge occurs.Recommendation: Show the user an “In Progress” state with a “Resume payment” button that re-opens the same payment_url (or initiates a new one).Bank shows X-Frame-Options error
Bank shows X-Frame-Options error
Some banks block iframe embedding. This is why RohoPay uses a full browser redirect rather than an embedded iframe for the 3DS step. If you were using an iframe, switch to
window.location.href = payment_url.Redirect returns success but webhook says failed
Redirect returns success but webhook says failed
Trust the webhook. Browser redirects can be manipulated or intercepted. The HMAC-verified webhook is the authoritative source of truth.