#exxmaxx
1 messages · Page 1 of 1 (latest)
So in order to make a relation between my authenticated user and stripe customer, should i also listen checkout.session.completed and record the customer_id (cus_123) accordingly or shall i just not bother with client_reference_id and just link the user via customer object (cus_123) during the invoice.paid call ?
Yes you should be listening tocheckout.session.completedevent too and implement this logic
what if i not bother with listening to an additional hook and create that relation vioa the email address of the customer?
Ah btw I also think of creating free-trials without collecting the card details ( so I am assuming there wont be a checkout session completed.
so I am assuming there wont be a checkout session completed.
No you'll get a that event even with Setup
what if i not bother with listening to an additional hook and create that relation vioa the email address of the customer?
Not sure I understand this, but you'll receiveclient_reference_idonly forcheckout session completedevent
so basically i was wondering if i couldt get away with not listening to checkout session completed at all. and only use invoice.paid to create the relation between the customer object and the authenticated user. PS. invoice.paid will give us both customer ojbect and the email adress.
so basically i was wondering if i couldt get away with not listening to checkout session completed at all.
no you can't get theclient_reference_idwithout listening to the checkout event.
yes yes i know that. But i can get away with not using the client_ref_id at all
look invoice.paid call gives us both email and the cus_id thats what i mean
I can fetchUserIdByEmail adress here, rather than using the client_reference_id (which is my userId) in the checkout.session.completed
You can I think, but in Stripe customer's email field isn't unique (Two Stripe customer objects can have the same email)
can i automatically select to carry the email of the user to the checkout page ? (maybe by toggling a button in the stripe dashboard)
i alsi couldnt find how I can enable free trials without asking for card details
can i automatically select to carry the email of the user to the checkout page ? (maybe by toggling a button in the stripe dashboard)
Nope you can't
i alsi couldnt find how I can enable free trials without asking for card details
Check this:
https://stripe.com/docs/payments/checkout/free-trials
thank you for the docs , but as i mentioned above i am using pricing tables so i think the checkout page is automatically created by a payment link
Is it possible to replicate this behaviour in this case?
i am not sending the stripe.checkout.sessions.create object myself . it is automatically being sent by the pricing table
so iam assuming there is a toggle in the dashboard to select this option ?
Currently that's not supported in pricing table
Ahh Is it going to be implemented any time soon if you know ?
Actually there is a private beta feature for this. I invite you to reach out to Stripe Support :
https://support.stripe.com/contact
And ask if you can have access to it.