Skip to content

Customer Redirects

After the customer completes or cancels a payment, their browser is redirected to the URL you specified when creating the Payment Intent.

OutcomeRedirect to
Payment successfulsuccess_redirect_url
Payment failedfailed_redirect_url
Customer cancelledcancel_redirect_url

You know all booking details when creating the Payment Intent, so build them into the redirect URL:

https://yoursite.com/payment-ok?ref=BOOKING-001&amount=1000&cur=ZAR
reference = "BOOKING-2026-001"
amount = 1000
currency = "ZAR"
email = "jean@example.com"
success_url = (
f"https://www.yoursite.com/payment-ok"
f"?ref={reference}&amount={amount}&cur={currency}&email={email}"
)
# Pass as success_redirect_url when creating the Payment Intent
var successUrl = $"https://www.yoursite.com/payment_ok.aspx"
+ $"?r=ok&k={Uri.EscapeDataString(reference)}"
+ $"&a={amount}&cur={currency}"
+ $"&email={Uri.EscapeDataString(email)}";

Do not rely solely on redirect URLs to confirm payment status. Always verify payment status server-side using webhooks or callbacks.