#acaiafa
1 messages · Page 1 of 1 (latest)
Sure, invoice.paid is the event you should use: https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
The problem with invoice.paid upon activation is that I don't have the client_reference_id... I only have this in "checkout.session.completed" but these events arrive for me out of order, so how can I resolve this impasse?
You can't as we don't guarantee event ordering
The recommendation would be to use some metadata on the Subscription
client_reference_id doesn't propogate to other objects
but this is exactly the field that allows me to synchronize
It's not available in events for recurring payments, so you're going to need to use another field
so in the activation I was using checkout.session.complete validating the payment_status=paid field and for monthly renewals I would use invoice.paid
What does client_reference_id map to?
my client's unique code within my system
because on activation I couldn't use "checkout.session.complete validating the payment_status=paid" and on recurring invoice.paid? Wouldn't it work?
Then what I'd recommend you do is when you recieve the checkout.session.completed event you use the client_reference_id and map the the related sub_xxx ID (from the same event) to the corresponding user in your system
All subsequent invoice.paid events will have the same sub_xxx ID too
that's what i'm doing.
Then I'm not sure where your issue lies