#blinkdaffer
1 messages · Page 1 of 1 (latest)
Hi 👋
The propagation of metadata is kind of tricky. You can pass it down to the Subscription using the subscription_data parameter:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data
But it won't automatically propagate to the Invoices created by that subscription. For that you will want to listen for the invoice.created webhook event: https://stripe.com/docs/api/events/types#event_types-invoice.created
And update the Invoice with the metadata from the related Subscription object.
https://stripe.com/docs/api/invoices/update#update_invoice-metadata
hmm interesting
also quick question when i am verifying subscription state, the events i am using are
checkoutcompleted for initial state
and then i use invoice created
and then invoice payment succeded
are these recommended events to listen for while managing the state of the subscriptions
coz i noticed that the subscription updated event doesnt tell me anything about the state
what the recommended way to handling subscription states