#egor.slam-checkout-metadata
1 messages · Page 1 of 1 (latest)
Hello. Can you share the ID of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
That API link isn't really relevant as that's for Invoice Line Item objects. There's no metadata parameter for Checkout Session line_items: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Got it.
So, when I'm creating items with subscription i can set metadata - https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-metadata
But when I'm creating items through checkout session, I can't
right?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Correct. What's the use case?
I want to pass some keys for line items for matching it. For example when the subscription was downgraded and I want to update line items ids in my DB
Hi! I'm taking over ynnoj.
Would it work if you added metadata on the Checkout Session or on the Subscription itself?
Yes, it's my plan B. I'll use metadata on session or subscription
The other option is to update the subscription items, since they have a metadat field: https://stripe.com/docs/api/subscription_items/update#update_subscription_item-metadata
as option, yes