Stripe: give session/checkout info to success page

Solution:
Add session_id={CHECKOUT_SESSION_ID} to the success url image

Then:

  1. Pass the query to the server action image
  2. Server side: use the session ID to retrieve the check out customer ID → retrieve customer info with that. (turn output on)
  3. Show variables on page / do what you want with the data

From:
https://stripe.com/docs/payments/checkout/custom-success-page

2 Likes