Solution:
Add session_id={CHECKOUT_SESSION_ID}
to the success url
Then:
- Pass the query to the server action
- Server side: use the session ID to retrieve the check out customer ID → retrieve customer info with that. (turn output on)
- Show variables on page / do what you want with the data
From:
https://stripe.com/docs/payments/checkout/custom-success-page