#elppypy_api

1 messages ¡ Page 1 of 1 (latest)

inner timberBOT
#

👋 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/1339301875463356447

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

hybrid flicker
edgy adder
#

No, the payment method doesn't need to exist prior to the moment of the subscription creation

#

Does it mean we can't create the payment method and then attach it to the user and set it as default? Does the payment method data need to be passed in the subscription creation?

hybrid flicker
#

If that is the case, you want to use the integartion I shared above. You can create the subscription, and use the PaymentElement to collect the payment method details in that flow.

#

Let me know what specific questions you have after reviewing the above

edgy adder
#

My application is entirely in the backend, this guide is for a web page integration

hybrid flicker
edgy adder
#

We have our own setup to collect and proxy the information to Stripe

hybrid flicker
edgy adder
#

Got it, it's already enabled

#

I just wanted to confirm the setup_intent requirement

#

But if the subscriptions don't need them, I think it's ok for me for now

hybrid flicker
#

If you already have the payment method details, you'd pass that pm_ id on the subscription creation.

#

If you set charge_automatically on the collection method, you would need to oass the pm_ id. Please note that the payment method needs to be attached to the customer, https://docs.stripe.com/api/payment_methods/attach before you can use it in that way.