#touchyspidey
1 messages · Page 1 of 1 (latest)
basically i'm creating a checkout session in my backend, but i want it to be finalized as if a user actually paid
everything local of course, i need to test this one thing to set the webhooks in production
Why does the ID need to be specific?
are you suggesting that i don't need it?
when doing checkout a customer gets generated on the fly if it didn't exist
i kinda need that don't i?
user clicks [subscribe] button
frontend makes xhr to backend "hey let's make this user subscribe"
backend creates stripe checkout, and returns the url -- customer doesn't exist
frontend redirects user to that url
user pays up
stripe triggers event to my webhook, event contains customer_id (newly generated)
backend looks up in db searching for that pending checkout session that needs to be upgraded to a subscription
which is what i need to force, because i need it to match the one that was generated
customer_id can get newly generated, i don't care
am i not making sense?
when completing my checkout, the stripe cli makes fixtures: makes a new customer (cool), but makes a new checkout session (not cool, because how will i ever mark the existing one as completed and associate the userid to the newly generated customerid?)
but.. is it possible? i'm starting to wonder why you aren't giving me a straightforward answer
i was guessing i just needed to --add checkout_session:something=the-value
now you're crushing my expectations