#twirtle2_unexpected

1 messages ยท Page 1 of 1 (latest)

wild orchidBOT
#

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

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

crimson frigate
#

Hi! The IDs would be useful. Thanks! ๐Ÿ™‚

inland hearth
#

np

pi_3RLg91I9cLlAW5Qr0y13FVR1
pi_3RLjsmI9cLlAW5Qr1zVBAMuc

#

and here's an example of a successful one that goes through the same flow
pi_3RLu96I9cLlAW5Qr14hs43bp

#

to add context, looking at the payment flow

await stripe.confirmPayment
check result.error
if no error then perform checkStatus
checkStatus ==> await stripe.retrievePaymentIntent
if the intent status == succeeded then proceed as paid.

#

at least that's the expected path for the payment methods allowed for these PIs (card). weird that there's nothing in the logs after the PI is created

crimson frigate
inland hearth
#

hrm nothing else you can see on your end that looks weird (i assume not from the logs)?

crimson frigate
#

Nothing, no. These are essentially just incomplete purchases, or 'abandoned carts'; the user just left the page some time between when you created the Payment Intent and when your client-side code intended to call await stripe.confirmPayment.

inland hearth
#

hrm ok thanks for confirming, appreciate it. there must be some exception path that i've not considered that allows this to happen

#

thanks for your time please close

crimson frigate
#

This isn't a code issue, it's a user issue. They are stopping your program before it gets to the confirm step.

You could search for these regularly, and assuming you have an email address for the person, you could follow up - but beyond that, it just happens. ยฏ_(ใƒ„)_/ยฏ

#

But also you're welcome!

inland hearth
#

I more meant that from our crm perspective it appears something broken on my end where the user is able to continue as if a transaction occurred when nothing has happened in stripe. Something totally on my end as opposed to stripe, I just wanted to confirm tyty. If you can please close this thread I have different question to ask ๐Ÿ™

crimson frigate
#

It sounds like you might be marking the payment complete in your system before it has actually completed, ya.

#

You can ask more questions here as well, or you can go back to #help and create a different thread - up to you. ๐Ÿ™‚

inland hearth
#

ah, i have a best practice question around billing you happy to keep it here?

crimson frigate
#

That's totally fine, yes. ๐Ÿ™‚

inland hearth
#

Appreciate it! So context is that i'm working on a subscription donation flow for a charity. I've got the setup of the subscription all working as expected, however I've been doing some lifecycle testing where the transaction fails and seeing what happens

right now i see what happens after the smart reties is that the invoice is marked as uncollectible which is what we want. However on the next invoice it gets created (draft) however doesn't automatically get attempted. from the docs I've read that when the subscription has an unpaid status the invoice is created but automatic collection is turned off.

With the context of donations we want to keep automatically attempting each cycle until our business logic says to do no more. What's the best way to handle this?

sub_1RLd6rI9cLlAW5QrZOGQr3eM

#

should i be changing the settings to mark the subscription/invoice as overdue instead? does that keep automatic collection going?

wild orchidBOT
kind rapids
#

Hi there, could you share an example Subscription Id?

inland hearth
#

hey sub_1RLd6rI9cLlAW5QrZOGQr3eM

kind rapids
#

I see. So this is called "Auto advance" and I think your second Invoice.in_1RLepSI9cLlAW5QrPTgF6xBe , after all retries failed, has turned to off and then all Invoice afterwards also has it turned off.

#

qq, if you advance your latest Invoice in_1RLfPkI9cLlAW5QrewIxSwIN from draft to open, will it auto-attempt for charge?

inland hearth
#

hrm do you mean advance the time?

#

or change the invoice status manually?

#

the invoice is meant to charge at 2:28pm local time, and i pushed out the test clock to 3:30pm so i assume you don't mean the time

kind rapids
#

Ah I see, it does not finalize also because of auto_advance is off

inland hearth
#

reading the subscription statues i think if i set the configuration to set the status as past_due (overdue) instead it sounds like it'll continue to auto collect

#

I'll try this, but i guess my question is should i leave the invoice as uncollectible?

#

or set the invoice status to overdue as well

kind rapids
#

Uncollectible is more "peaceful" than "overdue". I would recommend keeping uncollectible

#

Alternatively, you can explicitly turn on auto_advance on the new Invoice right after its invoice.created event

#

change its auto_advance property

inland hearth
inland hearth
kind rapids
#

I think just the first Invoice should work. Could you try it? Turn it on then advance the time past the next Invoice as well and inspect its auto_advance?

inland hearth
#

i think all good, the setting to leave the subscription as overdue seems to be working perfectly

#

while I have you, again with testing the lifecycle of a subscription.

I want to test someone who successfully pays for a subscription, but subsequently fails due to insufficient funds

is that possible? or is it only possible via the specifc card

#

if it's not possible, are you able to confirm if I can see that decline code under failure_code or do I have to check the outcome.reason instead?

kind rapids
#

Yes that 0341 is the exact card you need

#

Well it's not insufficient decline code, but it will be generic decline

#

I meant it's the only card which can allow you to success first, then failed later

inland hearth
#

yep i understand that, but in the event of an insufficient funds (in a real scenario) where would that code appear?

#

in the docs I can't quite tell where exactly the value insufficient_funds would appear in the charge object

kind rapids
#

Ctrl+F for card_declined or insufficient_funds on this page

inland hearth
kind rapids
inland hearth
#

thanks so much for your time, i think i've got all i need for now