#vineet5769

1 messages · Page 1 of 1 (latest)

slender bridgeBOT
warped spoke
#

hi! do you have details on how you integrate exactly?
do you have an ID of a CheckoutSession cs_test_xx where this happened?
do you have a link to your page where I could replicate this?

tame yacht
#

I can share the ids but cannot share the test link as it is an organization testing link.

cs_test_a1o2P2fFeZMH0LxMRxNj1m5E5Y5F1oRZZQiiRIPp1R3SBxUbv2RaculTF9

#

cs_test_a1gt4Mcd0kfln4KKnEblTOgBs94kg2NXOTT3AeS1AFLGYHZlABYPsP0to8

#

I'm using stripe api version. I've not made any changes to the code which was working fine previously, and I'm using version = '2020-08-27', so even this should not create any problem irrespective of any changes in latest versions in stripe.

warped spoke
#

I suggest looking into what webhook listeners you might have or some services you might be running on Google AppEngine that you might have forgotten about and that are making these API calls

tame yacht
#

I checked everything already and it seems this issue is not from our side.
The API call that you see deletes previous subscription is when we receive webhook associated with invoice.payment_failed

warped spoke
#

The API call that you see deletes previous subscription is when we receive webhook associated with invoice.payment_failed
did you try removing it for now?

#

like just to check if maybe it is the problem? 🙂 if you try and it doesn't change anything and the error still happens, then fair enough, but worth trying.

tame yacht
#

If a payment fails, our ideal solution is to delete the subscription so that no retries occur.
But sure, I will check by removing it once.

tame yacht
#

It got resolved, but may I please know why invoice.payment_failed event is triggered first. Following that, charge.succeeded , invoice.payment_succeeded and checkout.session.completed event are also triggered.

#

sub_1NYS7BKBKFciBNc7Almpc0tH

warped spoke
#

probably because the payment attempt initially fails if a captcha is required , and then it succeeds when the captcha succeeds

tame yacht
#

It seems the captcha verification is triggering the payment failed event

warped spoke
#

you should not cancel a subscription based just on an invoice.failed event

#

in your current implementation you will just break Checkout(you cancel the subscription it's trying to use if there's any failure on the page, when it's not expecting that to happen)

tame yacht
#

But then what about the case when payment fails for the user and the subscription is still active in Stripe?

#

I do not want automatic retries for first time payments in a subscription.

#

Is there something we can do to disable captcha?

warped spoke
#

like think about the scenario. I come to your page. I go to Checkout. I make a mistake and have a typo in my card number. It's declined. I try again. I pay successfully

#

do you want me to not be able to do that? because right now that's kind of what you're doing since you cancel the Subscription immediately

#

there are no automatic retries

tame yacht
#

Understood your point.

warped spoke
#

overall you should ignore any events that are coming from Checkout until it's finished, and you can identify that with billing_reason

tame yacht
#

Can I delete subscription in case of checkout.session.expired event?

tame yacht
#

One more question - when was captcha introduced in Stripe Checkout?

warped spoke
warped spoke
tame yacht
#

Thanks for your help, I started working on Stripe like 3-4 months ago and still there are a lot of uncovered areas. I guess I will learn slowly.