#usmanibrahim
1 messages ยท Page 1 of 1 (latest)
Hey there
Can you tell me about why you can't create the Subscription prior to rendering Payment Element?
If so, you likely want to look into using the deferred-intent flow here instead: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
for subscription customer with a payment method is required.
Hi there ๐ jumping in as my teammate needed to step away. I'll need to double check, but I think there is a way to create a Subscription before a Payment Method has been created for a Customer. That being said, I also think the approach that my teammate recommended is likely the best approach and would recommend you take a look at that.
@fast tulip in my app we have mixed payments(one time and recurring). what you think is a better approach for such scenario?
thanks
@full coral can you help with this one?
Can you elaborate? The question is a bit vague so I'm not really sure what advice you're looking for or what question you're trying to answer.
The flows shown in the deferred intents guide for both one time payments and subscriptions is a good approach in general.
Alright. we have a donation platform where we collect donations from donors. there are both types of donations in single checkout. one time donation and recurring donation. sometimes there will be just one time donation, sometimes there will recurring and sometimes there will be both. so I was looking for scenario which covers both type of payments.
I was intending to collect payment details using stripe payment element and then create payment intent for one time donation and subscription for monthly or recurring donations.
Hm, that flow will be a bit complex no matter how it's handled, please bear with me a couple minutes while I think through it a bit more.
sure brother. thanks
So I think the easier approach here is going to be creating the Subscription first. You can create a Subscription for a Customer that doesn't already have a Payment Method by setting payment_behavior to default_incomplete:
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior
If the customer is selecting any recurring price, then you'll want to create a Subscription for them. Any one-time prices that they want to purchase alongside the recurring prices can be included on the Subscription's first Invoice via the add_invoice_items parameter:
https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
If the customer's cart only contains one-time prices, then you can use a Payment Intent to handle that payment.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you very much. it will be a great help.
Any time, happy to help!
it is working. but Bacs Direct Debit payment method is still missing for subscription. it appear for payment intent. I'm sharing the backend code.
Hm, if you go here to look at your Invoice settings, and click on Manage beside the list of available Payment Methods, is BACS available there to be toggled on?
https://dashboard.stripe.com/settings/billing/invoice
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
bacs is not listed there. I check this page for available options. apparently bacs needed NIN number
https://dashboard.stripe.com/settings/payments
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
fixing this will fix the issue?
Hm, BACS not being listed as an option in the Invoice Template makes me a little nervous, but I'm not exactly sure if that is expected (that is something I think our Support team may be more knowledgable about).
For testing purposes, when you create the Subscription are you able to specify the desired payment method types via payment_settings.payment_method_types and see the desired options presented in the frontend?
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it worked. thanks