Redirect to a confirmation page after payment success - React

Hi there,

I’m using React package react-square-web-payments-sdk to process payments on my react app. Everything is working fine I just need to know to to redirect users to a confirmation page after successful payment.

Thanks

With the Checkout API is you configure the redirect_url in the checkout_options we will automatically redirect the customer once the payment is completed. :slightly_smiling_face:

Hey Bryan,

I did, but redirect is not working after successful payments.
Here is my code.

what am I doing wrong? Could you also let me know how to retrieve the session info in the redirected page so I can display the payment info to users after being redirected.

Best,
Atef

That looks like an API call to CreatePayment. I thought you’re using the Checkout API CreatePaymentLink? If your using the Payments API CreatePayment with the Web Payments SDK there isn’t a configurable redirect URL. When you get the payment confirmation you’ll need to build your custom redirect for the customer. :slightly_smiling_face: