#Leee-subscription-events
1 messages · Page 1 of 1 (latest)
Hi!
I just need some kind of id that can connect a subscription payment to the original checkout (or similar). So, for example, Customer A signs up for a subcription on Jan 1st. Then they sign up for a second one on Jan 15th.
They are charged again on Feb 1st. When I receive that notification I need to be able to know it's for the first subscription and not the second
You're likely better off listening for invoice.paid events: https://stripe.com/docs/billing/subscriptions/webhooks#tracking
There'll be reference to the subscription on the Invoice object in the event: https://stripe.com/docs/api/invoices/object#invoice_object-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Nice. So, am I correct in stating .subscription will be a unique string which is an id, and all the payments in the future for that subscription will note that id?
Yep, that's unique and any invoice relating to that subscription will reference it on that field
Brilliant. Thank you so much. You've just saved me at least an hour.
Np!