#zonixo
1 messages · Page 1 of 1 (latest)
From https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason:
subscription_cycleindicates an invoice created by a subscription advancing into a new period.subscription_createindicates an invoice created due to creating a subscription.subscription_updateindicates an invoice created due to updating a subscription.
For the first subscription invoice, the billing_reason should be subscription_create.
For the recurring invoice, the billing_reason should be subscription_cycle.
Well i don't really know why the subscription_update is called instead of subscription_create. My opinion the subscription is already created before so this is an update.
Can you share an example invoice.paid event ID (evt_xxx) with subscription_update set?
evt_1Ni50wFgtOfUTDeq3ZTkz208
Thanks for sharing! It's indeed strange that the billing_reason was indicated as subscription_update for the initial subscription invoice. Can I suggest you to write in to us https://support.stripe.com/contact, so that we can follow up and check with the relevant team? It’ll be helpful if you can include the ID in your email.
I also see that Checkout Session is used to create a subscription. checkout.session.completed event can be used to determine whether the first invoice of a subscription has been made successfully since this event will only be sent for initial subscribing to the subscription
Okay but otherwise when the subscription_update is supposed to occur ? Yes but i'm not using it because invoice.paid make sure that the invoice have been paid so i can update the user whatever it's first or the following invoice. I suppose that checkout.session.completed confirm the payment the same like invoice.paid ? It could be the solution. Last question how can i simulate the ending period payment of the first month of subscription ? To jump to the last day and check what is called ?
when the subscription_update is supposed to occur ?
subscription_updatewill be set of the invoice is created due to updating the subscription such as changing the prices
I suppose that checkout.session.completed confirm the payment the same like invoice.paid ?
Yes.
Last question how can i simulate the ending period payment of the first month of subscription ? To jump to the last day and check what is called ?
Test clock can be used to advance the time to the next billing cycle: https://stripe.com/docs/billing/testing/test-clocks
Thank you for your help. 🙂