#S60-Cosminacho-checkout
1 messages · Page 1 of 1 (latest)
Hello Soma!
I will make a quick video to explain it better .
essentially, what I want is to make sure that get an email address in the checkout session...or that I can assign assign that that specific email address (completed in the form) a session ID that would allow me to link it to the completion of the checkout.
I really really hope, that i expressed myself corectly.
Thanks! I didn't have time to look at the video (yet). But two things that may help:
- If you want to create a Checkout Session with a specific email address, then use the
customer_emailproperty of the Checkout Session - if you already have a Checkout Session ID, then you can access the
customerproperty. Then if you retrieve this customer, it should have anemailproperty.
customer_email would be a parameter essentially ?
You can either:
- Create a new customer object, set its
emailand then pass that customer ID when creating the Checkout Session - Or directly pass the
customer_emailwhen creating the Checkout Session
I have another question
cs_test_a1AWKi5WSotEgQZiXeryMsd3Q42uVHn1oeYFOccas0eKBav99711lPjl10
This CS ID has just been created is there a way I can access this in stripe before the checkout is already completed?
What do you mean by "access this in stripe"?
for example .
When a checkout session is completed. (as in paid.
a subscription is created.
I'd like to know the checkout session ID that led to the creation of the subscription
So you have a Subscription ID, and you would like to find the Checkout Session ID that created this subscription? give me a few minutes to look into this.
yes
@grave tree you could use https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-subscription
but really the way to do this is you recieve the checkout.session.completed event, and that event has a subscription field on it. That's how you know.