#Slanfan-Checkout-Metadata

1 messages · Page 1 of 1 (latest)

strong widget
#

We don't have such a deep parameter. You can have metadata on the Subscription itself, then by listening to webhook event each time a PaymentIntent is created, find the Subscription metadata and update it in the PaymentIntent metadata

weak stream
#

Thats fine but where do I add the metadata so that it ends up in the customer.subscription.created object?

#

stripe.checkout.sessions.create({ customer: customerId, payment_method_types: ['card'], line_items: data.line_items, mode: 'subscription', success_url: 'url', cancel_url: 'url', metadata: data.metadata, })

#

This is how I create the checkout

#

{ price_data: { currency, product_data: { name: productName, metadata: metadata, }, unit_amount: unit_amount * PaymentFactor, recurring: { interval: 'day', interval_count: 1, } }, quantity: 1, }

#

this is the line item

strong widget
#

That will be added to the Checkout Session metadata

weak stream
#

Thanks!