#obo_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259943554889945230
đ Have more to share? Add details, code, screenshots, videos, etc. below.
They are the exact same data-wise, the one difference is when they trigger: invoice.paid will trigger both for payments and when you mark an invoice as paid out of band. invoice.payment_succeeded only triggers for actual payments, it ignores paid out of band
We generally reccommend using invoice.paid as that covers more scenarios
Gotcha, thanks!
On a somewhat related note. Is there a webhook event you would recommend for a subscription period starting fresh? For example, the subscription period ended, and the next month of that susbcription period starts
For context, we're putting together a system that lets customers lock their accounts from accrueing new usage if a certain dollar amount is hit. Then we want to let the system automatically unlock their account again at the start of a new pay period.
invoice.paid seems like a solid option, but understandably there could be some issues with that if billing hiccups occur (or if they're on an net 30 delay such as enterprise billing)
customer.subscription.updated is the one that will be specifically locked to subscription cycling. You can listen to that and then check the event's previous_attributes for current_period_start and current_period_end to make sure that the update was the subscription cycling
to clarify, you're saying that customer.subscription.updated fires off at the exact second a billing period end is hit and a new cycle starts?
(even if no changes to the subscription occurred)
Correct, the update in that case is an automatic update to the billing cycle of the subscription. So at a minimum you will see that the cycle start and end changed