#szef0
1 messages · Page 1 of 1 (latest)
you can pass metadata to https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata if you want it to appear in the Subscription object/events
Ok, so I should set metadata and also subscription_data.metadata
We have checkout session complete event and then from it (if the payment is with card) - we create subscription schedule for one month and then we get this subscription creation event - maybe we should pass it to subscription schedule? because our mode is "payment" not "subscription"
well if the mode of the CheckoutSession is "payment" then you can't pass subscription_data.
if using a Schedule to create a Subscription, there is no equivalent to automatically pass down metadata, you can only manually update the Subscription object to set it after the sub is created
or you can look at the schedule field of the Subscription, retrieve that object, and look for metadata you set on the Schedule.
do we do it correcly? Our clients sometimes pay "fraction" of the price for a product - for example they pay for some upsell for 10 days and after 10 days they will pay full price for next month - thats why, we update subscription later and checkout session has
payment mode
is it correct approach?
that is one way of accomplishing that flow yes, if it works for you then it's ok