#will_api

1 messages ยท Page 1 of 1 (latest)

glass kelpBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

worn kite
#

To clarify, I'm trying to figure out which event indicates that all automatic retries have failed, and thus the payment will never be captured.

dense eagle
#

There's a couple ways you can do this. It might be invoice.marked_uncollectible, but that completely depends on your subscriptoin settings. You can configure different behaviors for what happens when all attempts have been made

#

That will be null after the last attempt

worn kite
#

Terrific! No further questions your honor

dense eagle
#

Recommend testing in test mode or sandbox before going life to see how it all works

#

Actually hold up I do think there's a caveat with next_payment_attempt

worn kite
#

Holding...

dense eagle
#

The next_payment_attempt attribute on the invoice indicates the date when Stripe will attempt the next collection. For automations users, next_payment_attempt is no longer set in invoice.payment_failed webhooks but is set in invoice.updated webhooks.

#

So I recommend checking in invoice.updated

worn kite
#

Got it, so listen for invoice.updated, and check if next_payment_attempt is null โœ…

dense eagle
#

But you original suggestion works as well if your subscription settings are set up to mark invoices uncollectible on all attempts being completed

#

That's completely fine to do it that way

worn kite
#

Okay understood

#

Oh before this gets deleted, can I ask: if I attach a payment intent to an invoice with attachPayment and then the payment fails, will the invoice attempt automatic retries for that payment intent?

dense eagle
#

Good question. I'm not sure offhand

#

Let me ask a colleague

#

My assumption is no but I'll get back to you

glass kelpBOT
brazen aspen
#

Apologies for the delay here, we're not 100% sure if we'll attempt automatic retries for PaymentIntents that were attached to an Invoice. Please reach out via support@stripe.com. They should be able to get you the answer to that question.

worn kite
#

Okay, will do. When someone successfully pays an attached payment intent that comprises an entire invoice, triggering the invoice's status to become "Paid", will a receipt automatically be sent according to my invoice email receipt settings, or would it be controlled by my payment intent email settings?