#ricky-u_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1414942949804085269
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
I'm not sure I understand. The request you shared that creates a Customer was made by your own code.
Hi Soma, struggling with this one, asked chat too, but couldn't quite find a sol
Yes, but i didnt call stripe.customer.create, i called checkout.sessions.create which is only to mount the embedded checkot form to take a payment, but this creates a customer as well.
but i didnt call stripe.customer.create
at least for the request you shared, your code calledstripe.customer.create.
can you share a Customer ID (cus_xxx) that you didn't create?
hmm, sure. i mean to say i didn't create them directly, but for some reason i assume that when embedded checkout is mounted, it does create the cutomer (even before the form is submmited) - is this correct?
i checked again, i am not calling customer.create
can you share a Customer ID (cus_xxx) that you didn't create?
cus_T1S594DbJqCTvq
it 2ms prior to checkout sessions, which i assume is called by stripe before checkout session - just a theory, the AI chatbot in Stripe mentioned that when creating a cehckout session (in order to mount the embedded checkout) will also create a customer .. hoping to find a way to do that without.
here's the request that created the customer: https://dashboard.stripe.com/logs/req_CF1A0sMAD8cyV6
it was made by your node JS code. so can you double check your code?
would you mind if i paste parts of my code here, just to be sure that stripe.customer.create isn't called, but rather checkout.sessions.create
Or let me ask it another way, when I callicalling checkout.sessions.create the result is a client secret, which is then used to mont the embedded cehckout.. Does this checkout.sessions.create , create a customer if none exisits for that email.
would you mind if i paste parts of my code here, just to be sure that stripe.customer.create isn't called, but rather checkout.sessions.create
I don't think that would help, since your code to create a customer might not be included in the code you share with me.
Does this checkout.sessions.create , create a customer if none exisits for that email.
Checkout Session can create Customers yes. but that's not what happened in your code. your code called thecustomer.create()function to create a customer
Got it, i mean i am checking and dont have it logged anywhere. However since you did mention that checkout session themselves can create customers - wouldn't that explain why the logs show that too. -- anyhow to move things along, What I do want to acheive is
- Using embedded checkout which i am already
- create a customer and a subscription at once (even when passing in a customer_email
- I read the docs here https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-customer and it does say although not clear enough for me to understand that -- "Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created." -- the result is i have a lot of ghost customers, users without a payment method (this happens when they leave the checkout process.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ill be back in a little to check on this, hopefully i can find a solution.
either you create your own customer object upfront, and then pass it when creating the Checkout Session on the backend. or don't pass a customer at all, and Checkout Session will automatically create one for you with mode: subscription