#next_invoice-failed
1 messages ¡ Page 1 of 1 (latest)
đ 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/1298717539962191934
đ 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.
- nextplayerrr_api, 9 hours ago, 5 messages
next_invoice-failed
@mellow steppe yes the Event shouldbe triggered as expected. Not sure what you mean by "void that event".
Just as in return a 200 and not do anything with that event
Unless it's not subscription_create
Would this be the correct way to do it? or is there another event that triggers for failed payments for a recurring subscription?
Sorry, so basically, a user creates a subscription, then first month passes, their card will get charged to keep the subscription, but incase their payment fails, how do I get an event sent with that information so that my API can handle past due clients?
I am currently using invoice.payment_failed, but this also sends when a payment declines at all even when the user doesn't have a subscription and is about to pay for one, so is this the correct event to use here?
Gotcha. So listening for invoice.payment_failed is totally correct. It is here to tell you "this payment attempt on the Invoice failed". Then you decide what to do.
I don't think special-casing the subscription_create makes sense here. You will have the same problem when the end customer comes back to your app to pay the Invoice and gets a decline
Basically I think you want to track whether the end customer is on your app currently trying to pay or not, and react differently to the Event based on that
I see, its because when a subscription is renewed, then the billing_reason is not subscription_create, I can't remmeber what it was exaclty so I've been using that to disguish new subscriptions with renewals
Hi, stepping in and catching up here.
I think I'm all caught up here, but I'm unsure if you have any follow up questions. As far as telling if the payment on the invoice failed, you would want to listen to invoice.payment_failed as suggested above. Then, you can inspect the billing_reason and action them on your end if you're trying to handle these events differently on your end.