#elppypy_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/1339301875463356447
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, it all depends on your business use case. Are you needing the PaymentMethod prior to creating the subscriptions? If not, you can collect the payment method details when you create the subscription.We document that integration path here: https://docs.stripe.com/billing/subscriptions/build-subscriptions
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?
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.
Here is the specific guide: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements
Let me know what specific questions you have after reviewing the above
My application is entirely in the backend, this guide is for a web page integration
If your integration is on the backend, how are you collecting the payment method details in a PCI compliant manner, https://stripe.com/guides/pci-compliance?
We have our own setup to collect and proxy the information to Stripe
I see. In this case, you might want to use this API: https://docs.stripe.com/api/payment_methods/create to create the PaymentMethod. Your Stripe would need a feature that allow passing raw card details. You would need to reach out to support for that feature: https://support.stripe.com/contact
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
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.