#Nadiya-webhooks
1 messages · Page 1 of 1 (latest)
hi there! i assume you're referring to recurring payment for a Subscription. I would suggest listening for the invoice.paid event and looking at the billing_reason : https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Thanks, i would like to perform set of operation only from 2nd invoice. Is it possible to check that?
subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription.
sorry, still don't get it. What will be the default billing cycle for a recurring payment?
subscription_update?
yes, subscription_update
First invoice will be having subscription_create and the rest will be having subscription_update?
yep, that's right
ok, understood.
Thank you !
i tested the subscription using test clock, but the billing_reason showing subscription_cycle
oh, sorry about that, actually yes - subscription_cycle should be the correct reason to look at. As the docs mention : subscription_cycle indicates an invoice created by a subscription advancing into a new period.
i see..