#manic-pixie-dream-bananarchist_api

1 messages ¡ Page 1 of 1 (latest)

mild escarpBOT
#

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

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

near chasmBOT
silent bramble
#

hi there!

#

that's correct, Stripe doesn't support creating Subscription with capture_method: manual. but even if that was possible, I'm not sure that would solve your issue.

#

why do the subscription fail 30% of time? what's the issue exactly?

torn dagger
#

We start the subscription with a trial. The trial ends and the subscription attempts to charge the payment method they started the trial with, which fails because the method they added does not have sufficient funds

#

The goal for us is to prevent them from starting a trial if they are using a payment method that will fail. We wanted to do this by starting the trial with a hold

silent bramble
#

got it. any payment can fail because of insufficient balance, and there's not much you can do to avoid this.
but when the payment fails, then you can retry the payment at a later date, or ask the user to enter a new payment method.

torn dagger
#

yes obviously any payment method can fail at any time. we don't want them to start the trial if they are using a payment method that cannot cover the subscription fee at the point in time they start the trial

#

it's not a perfect solution but it will greatly reduce the amount of support we are having to provide bc of the volume of subscription charge failures we're getting after the trial period ends

silent bramble
#

we don't want them to start the trial if they are using a payment method that cannot cover the subscription fee
that makes sense, but you cannot know in advance if the payment will fail or not, so there's not much you can do.
one option could be:

  • Use Checkout Session in payment mode, and place a hold on the card
  • Then you manually create a Subscription with a free trial
  • And in less than 7 days capture the funds
  • This way you are sure that the first payment will work, but then the next payment might fail. so that doesn't really help and make your integration more complex.
torn dagger
#

is that not what a hold accomplishes? creating the hold would fail because the card does not have funds to cover the hold

#

maybe i'm not understanding how holds work, I was thinking the request to create the hold would fail in the same way the request to actually charge the payment method would

#

And in less than 7 days capture the funds
This way you are sure that the first payment will work, but then the next payment might fail. so that doesn't really help and make your integration more complex.
the problem with this is that we capture the funds, and then the subscription charges them

#

as far as i can tell to get what we want without being able to create a hold as part of the subscription, we have to create a payment intent with a hold in addition to the subscription, then wait for the trial period to end, then cancel the payment intent with the hold. it's possible there's just so much more state management we have to do

silent bramble
#

creating the hold would fail because the card does not have funds to cover the hold
correct. but maybe in a week the card would have enough funds
the problem with this is that we capture the funds, and then the subscription charges them
to avoid double charging the user, you could add a 100% off coupon on the Subscription
then wait for the trial period to end, then cancel the payment intent with the hold
when you cancel the hold there is some delay before the funds are actually released to the customer. so even if you do this, the payment could still fail for insufficient balance. that's why I suggested to actually capture the funds.

#

but I don't recommend placing a hold at all.
instead you should handle failed payment by retrying the payment or asking the user to try a different payment method. or don't offer free trials at all.

torn dagger
#

this is an incredibly complicated state management requirement for a pretty simple use case. starting a subscription with a trial and a hold feels like it should be a relatively simple core product offering. can you please feature request this? we just want the API to give us some basic safety. the fact that a payment method can fail at any time is not a valid reason to not be able to start a subscription with a hold