The callback flow
After a payment, Reeple redirects the checkout iframe to yourcallbackUrl with query parameters indicating the outcome (e.g. ?status=success&reference=reeple_xxx). The SDK detects this same-origin navigation, reads the query params, and fires onSuccess(data) — then closes the modal automatically.
ReepleSuccessData shape
Verifying on your server
Your server-side handler atcallbackUrl should:
1
Read the query params
e.g.
?status=success&reference=reeple_xxx2
Verify the transaction
Call the verify endpoint server-to-server, using the
reference — never trust the browser params alone.3
Update your order/database
Mark the order paid only after the server-side verification succeeds.
4
Return a response
The SDK closes the modal automatically once the callback URL is reached; your
onSuccess callback handles the client-side redirect.Keep your public key server-side in an environment variable — never hardcode it or bundle it into client-side code for this call.
{ success, statusCode, message, data: { status, reference, amount, currency } }, where data.status is one of pending, success, or failed. It returns 400 if the order isn’t found, 401 for an invalid/missing key, and 500 on an internal error.
Session timeout
If the checkout session isn’t completed within 10 minutes,onError fires and the session expires.