#yonatan
1 messages · Page 1 of 1 (latest)
When you create the usage records, your system should specify the subscription item to update: https://stripe.com/docs/api/usage_records/create
So yes, it will only update the subscription item on the price with usage-based billing
Thanks!
if I have in the same product subscription two metered prices, and I want to update only one of them, how can I do that?
in the docs I see I can only send the subscription id
Hi there, it's not the subscription ID, it's the subscription item ID, which corresponds to one metered price.
when I create a subscription checkout intent, I pass two products
when the checkout.session.completed is called, I get one subscription id
You need to retrieve the subscription object and get the subscription items through items property (https://stripe.com/docs/api/subscriptions/object?lang=curl#subscription_object-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 you, thanks!
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!