#chimpTerminal
1 messages ยท Page 1 of 1 (latest)
Sure, what's going on?
quick question. right now im applying the cus_id to my database using the user email as a common data point between stripe and my app. however, if the user enters an email different to their email on my apps database the cus_id does not get linked to their account.
is there another way i should match the users between stripe and my app
i did shed a tear when it worked btw
is it best practice to do this with a session id?
You can have multiple Customers with the same email, so you may want to find a new way of associating Customers.
Not sure if that's a helpful answer or not though
i think i store my user id's in a session session['user_id'] = user.id when the user logs in?
then match the stripe customer to the user id thats in the session? so the users will be locked?
Ah, it might be worth storing the Customer ID as well, so you can do an easy lookup of their Stripe stuff (e.g. subscriptions, payment methods, etc.)
do you have any docs on usings session with stripe to capture customer id
like a checkout session to store my app user db id
What do you mean by capturing customer ID?
You determine whether to provide an existing customer ID when you create the session
I dont have a session setup yet. I struggling to link the stripe customer to my app db user. i have managed to do this by matching my user email to the stripe customer email. but this wont work if the user uses a different email when paying with stripe.
i need an alterative method. and i have no idea how to do sessions with the stripe price table.
i think i can hold the user id as meta data in the session but is there any documentation on how to get this to work with the stripe price tables
Pricing Table does not currently support providing an existing customer ID, but its something we are looking at
yes but when the user pays for a product on the price table. a customer is created with a customer id
does this look correct for creating a session?
Wait, you're creating your own checkout sessions, that's different that pricing table, so i'm confused what you're doing here
You can pass a client_reference_id in both cases that would let you tie things together:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-client_reference_id
https://stripe.com/docs/no-code/pricing-table#handle-fulfillment-with-the-stripe-api
The <stripe-pricing-table> web component supports setting the client-reference-id property
ah ok i think that track subscriptions is what im looking for thank you
can i chat to synthrider please
hey, do you have more questions about this?
hey mate i just want to say thank you i got it working
great! glad to hear it ๐
ive been struggling for 3 days and im a complete moron. i didnt have the correct event turned on
that link really helped thank you so much made my day! ill let you get back to work now ๐
Happy that it was useful and let you get things working ๐
Good luck as you keep building ๐ป
cheers!