My app uses NextJs 13 using pages I am using react context holding basket info. After I make a call to Stripe checkout, I get a redirect from Stripe to my payment success page. In the success page my context information is now empty. How get the context information back.
I call stripe with
const checkoutSession: Stripe.Checkout.Session =
await stripe.checkout.sessions.create(params);
My context covers the whole app.
<UserProvider>
<LayoutProvider>
<BasketProvider>
<Layout>
<Component {...pageProps} />
</Layout>
</BasketProvider>
</LayoutProvider>
</UserProvider>
How do I retrieve the BasketProvider data in the stripe success page?
Thanks for the suggestion. The approach I took was: