This guide is only relevant for the Web integration.
- The Payment Method opens a third-party banking app like Revolut through deep linking
Set up redirects
If creating a popup or tab is not possible, Universal Checkout will automatically redirect the user back to thereturnUrl
provided in the checkout options.
TYPESCRIPT
Feel free to pass additional query parameters to the
returnUrl
. They will be automatically forwarded when the user is brought back.Handle redirects
When the user is redirected back toreturnUrl
, a clientToken
is passed as a query parameter:
URL
clientToken
from the query parameters and use it to render Universal Checkout. The checkout will automatically continue the payment flow.
TYPESCRIPT
onCheckoutComplete
will be called like for any other payment methods.
If the payment failed, or if the user cancelled their payment, an error message will be shown and Universal Checkout will once again present the configured payment methods to the user. At this point, the flow has been restarted and the user will be able to attempt another payment with a payment method of their choice.
You can use onCheckoutFail
to listen to the cancellation and restore your UI to its initial state.
Testing
For testing purposes, you can force a redirect by settingredirect.forceRedirect
to true.
TYPESCRIPT
We encourage not forcing redirects in production in order to provide the best experience to your user.
Universal Checkout will seamlessly fallback to a redirect if needed!
Universal Checkout will seamlessly fallback to a redirect if needed!