#drismail_api

1 messages ยท Page 1 of 1 (latest)

abstract kilnBOT
#

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

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

pale latch
#

Clean pic on Github Orakaro ๐Ÿ‘๐Ÿผ

Looking forward to your help!

mint sandal
#

Hi there ๐Ÿ˜… ๐Ÿ‰

#

The issue is that Stripe generates a first invoice when creating the subscription and charges the user again. I need to link the captured payment intent to the subscriptionโ€™s first invoice (marking it as paid) while ensuring future renewals are charged automatically. How can I achieve this?

Taking a step back, I think a cleaner solution would be directly create a Subscription first, let it generate a PaymentIntent then try to change that PaymentIntent's capture_method to manual.
Not sure if that's possible, let me quickly test it

#

Otherwise, as you observed, you would want to mark the first Invoice of your Subscription as paid by giving the customer a credit notes, a 100% discount

pale latch
#

Hey! ๐Ÿ˜€
If the first solution is possible, it would be really clean!

mint sandal
#

Ugh it's not possible, sorry

Some of the parameters you provided (capture_method) cannot be used when modifying a PaymentIntent that was created by an invoice. You can try again without those parameters
#

So yeah you would want to "adjust" the first Invoice. Mark it as paid_out_out_band is also a way

pale latch
#

how to set paid out of band?

mint sandal
pale latch
#

Thanks for sharing!

#

But, how to set up the subscription in such way that it doesn't charge on creation?

mint sandal
#

You can set payment_behavior to default_incomplete

pale latch
#

And this will just apply on first invoice, right?

#

future ones will happen normally?

mint sandal
#

Yeah, will be using the payment method you setup for the Subscription

pale latch
#

Awesome! Thanks Orakaro!

#

Can I ask one more question?

mint sandal
#

(you will want to set the collected payment_method on the Payment Intent, to the Subscription)

#

Sure

pale latch
#

yes, I did that

#

thanks for the heads up

#

You can't set it right away by the way

#

you need to first attach it to the customer

#

when you set the payment intent

mint sandal
#

Yep. Or you set the PM as the customer's invoice_settings.default_payment_method

pale latch
#

hmm, that's clean as well!

#

My second question was: Is it possible to specify how many retries on failed subscription renewals before sub cancellation? If so, when and how should it be specified?

abstract kilnBOT
mint sandal
pale latch
#

Thanks Orakaro

#

Really appreciate your help

#

Can this chat be closed and kept for my reference or will it be deleted?

odd wing
#

Hey! Taking over for my colleague.

odd wing
pale latch
#

thanks