#manuel_api
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/1428125927388221643
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Generally, the answer is webhook events. Probably invoice.paid - let me look at your example
ok
what happens in my case is that when the payment fails, I have to check whether it is an update or a subscription renewal in order to carry out the rest of my project logic.
im using the "payment_intent.payment_failed" event btw
Do you have an example of such a failure? For the Subscription that relates to the request you provided above, the webhook events are out of rention so I can't view them
yes, let me look for a failed paymetn
this is a payment intent failed: evt_3SIFQMDtLlgoCDIr1aWT14DH
well on that event there's description: "Subscription update",
Yes, I see that. But I'm curious to know if the renewal and update use the same description
or I can continue to use “billing_reason”
I don't think so but I'm looking through the events.
Invoice events have billing_reason:
ah it seems like this customer is on an annual plan. Let me look at an example on my own account
ok great
yeah, for the first Invoice's payment, the payment_intent.xxx events will have description: "Subscription creation",
and invoice.xxx events will have billing_reason: "subscription_create",
ok
And when do customers renew?
or update?
subscription_cycle and subscription_update?
What do you mean by "renew"?
when a subscription advanced into a new period
I guess I'm not clear on what you mean when you're asking when Customers renew. Customers don't "renew" - I think you're asking something else about the Subscription but I'm not sure exactly what. Could you give me a more verbose explanation of what you want to know, please?
I am referring to when a customer's subscription expires and they renew/pay their subscription for a new period. Whether it is annual or monthly.
That depends on the interval of the Price on their Subscription
When Charges occur, absent updates that cut a new Invoice, are defined by the interval on the Price, whether monthly, yearly, or something else
I just want to know if it is possible that in Invoice objects, the billing_reason for subscription updates can be used for expiration/renewal😮💨
I see that the customer's payment is to pay for the subscription period again, and the billing_reason on the invoice says "subscription_update" and not "subscription_update"
ah so like what are the possible values for billing_reason
y e s
I would like to confirm whether the payment that was canceled is an update or a payment for a new subscription period
using the billing_reason
Here are the possible values https://docs.stripe.com/api/invoices/object?api-version=2025-09-30.clover#invoice_object-billing_reason
I think so but it would be good to test to confirm. I doubt that we distinguish since we don't have a value for billing_reason that provides an obvious answer in the api reference.
By the way, are you aware of our test clocks feature? https://docs.stripe.com/billing/testing/test-clocks
I highly recommend it; you can advance time on a subscription, make changes as you go, and create the scenario you want to know about
So, was the invoice I sent you that was canceled a subscription update or a payment for a new period?
I see that it says “subscription_update,” but I don't understand why it appears if it's a payment for a new subscription period since it expired.
You're referring to in_1SIZyMDtLlgoCDIrCxm0wm7r?
in_1SIFQ7DtLlgoCDIrDQdx24gU
in_1SH3KJDtLlgoCDIrKmfQGcVV
in_1SIFQ7DtLlgoCDIrDQdx24gU was created by this update request in the dashboard: https://dashboard.stripe.com/acct_18A5G2DtLlgoCDIr/logs/req_2bdCA3R6ljgT3d
for in_1SH3KJDtLlgoCDIrKmfQGcVV - I see subscription_cycle on the invoice events, which makes sense because it is not the first Invoice on the Subscription