#nerdy-puff_code

1 messages ยท Page 1 of 1 (latest)

green meadowBOT
#

๐Ÿ‘‹ 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/1287770841400082504

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

bitter creek
sage jungle
#

Hi there ๐Ÿ‘‹ sorry, but I'm not sure I'm grasping what you're asking. Would you mind trying to restate your question?

bitter creek
#

hello so im trying to add stipe to the sign up portion of my site so that when they sigh up they have to get the subsription but when i tested it nothing gets charged

sage jungle
#

Gotcha, so you want the customer to be charged immediately? What are you seeing happen instead? Can you share the ID of a Subscription that you created as part of your testing?

bitter creek
#

like the actually object

#

let me see

sage jungle
#

Yup, actual objects. Because you shared your code, but it looks like largely frontend code unless I'm skimming too quickly. I see you making a request to your backend to create a Checkout Session, but don't understand what that's doing on your backend.

bitter creek
#

it might be in my app.js which is a huge file so im combing thought to find it

#

talking the other dev it should be in sign up but if not im going to keep looking

sage jungle
#

I also don't really understand the flow in the code that you showed. It looks like you're creating a Payment Method then maybe creating a Checkout Session (again, not sure on this last part, I don't know what your /create-checkout-session endpoint does). That seems redundant, why not let the Checkout Sesssion collect payment method details? You can't provide existing Payment Method IDs to them.

bitter creek
#

i tried to have the checkout session take the payment but honestly it jsut caused the error that made the whole thing not show up so

sage jungle
#

What error? It sounds like there is a lot of context that you have on what you're doing that you aren't sharing, which makes it tricky for me to provide guidance on what you need to adjust.

Did you build your flow by following one of our subscription guides? Like this one here for using Checkout Sessions to create Subscriptions:
https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=stripe-hosted

Create and manage subscriptions to accept recurring payments.

bitter creek