#j_r_e
1 messages ยท Page 1 of 1 (latest)
yes that's right
๐ taking over for my colleague. Let me catch up.
the usage records are created on subscription item basis
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes but how do I mention the product id ?
you don't mention the product ID, you mention the subscription item ID which is by itself tied to a price
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, this what is not clear for me, I have subscription_item per subscription
isn't it ?
yes so this is the relationship
1 Subscription -> many Subscription Items
1 Subscription Item -> 1 price
1 price -> 1 product
ok, I thought I had only one subscription_item per subscription, but when I create a subscription I'll obtain as many subscription_item as products subscribed
if you're creating the subcription using the API each item you pass to this array
https://stripe.com/docs/api/subscriptions/create#create_subscription-items would generate a unique Subscription Item that has a unique ID
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
which you can then use to record the usage
ok perfect thanks