#usmanibrahim

1 messages ยท Page 1 of 1 (latest)

rugged idolBOT
fast tulip
#

Hey there

#

Can you tell me about why you can't create the Subscription prior to rendering Payment Element?

pseudo iron
#

for subscription customer with a payment method is required.

full coral
#

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.

pseudo iron
#

@fast tulip in my app we have mixed payments(one time and recurring). what you think is a better approach for such scenario?

pseudo iron
full coral
#

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.

pseudo iron
# full coral Can you elaborate? The question is a bit vague so I'm not really sure what advic...

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.

full coral
#

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.

full coral
#

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.

pseudo iron
full coral
#

Any time, happy to help!

pseudo iron
full coral
pseudo iron
#

fixing this will fix the issue?

full coral
#

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

rugged idolBOT