If a subscription is scheduled to begin at a future date and therefore is in a pending state, does invoice.created get called at the time the subscription is due to be activated?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
https://developer.squareup.com/docs/app-marketplace/requirements/subscriptions-api
Additional Documentation
Invoices API
Create and Publish Invoices
Pay or Refund Invoices
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
No, the invoice.created webhook event is not specifically tied to the activation of a subscription. This event is triggered when a draft invoice is created, regardless of the subscription status. If you want to track the activation of a subscription, you should monitor the subscription.updated webhook event, which is triggered when a subscription changes, including when it moves from a pending to an active state.
This answer was reviewed by @Bryan-Square.