#DARN40 - metered pricing
1 messages · Page 1 of 1 (latest)
Hi 👋
Could you describe your scenario a bit more? What Stripe products are you using?
Of course... so I'm adding a non metered price to my stripe hosted checkout session (so I'm not using elements) and everything goes as planned. As soon as I'm creating this exact same price but activating it metered, the checkout is not opening...
quoting for context
Of course... so I'm adding a non metered price to my stripe hosted checkout session (so I'm not using elements) and everything goes as planned. As soon as I'm creating this exact same price but activating it metered, the checkout is not opening...
activating it metered
What do you mean by that?
So in the stripe dashboard there is the option to create is normal or 'licensed' or creating a price 'metered'
So do you mean you pass in a metered price instead of a static price? Or you include both?
I'm replacing this price with another price that is basically the same, only that it is metered now.
I'm not adding it
Okay do you have the ID for the checkout session creation request?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
These IDs start with req_
Oh I see. I got the error message from the logs. Quantity should not be specified where usage_type is metered. Remove quantity from line_items[1]
I need to remove that
However, in the stripe docs this is documented wrong... It says a quanitity should be defined also for metered prices...
Where is that called out?
https://stripe.com/docs/products-prices/pricing-models at "Flat rate with metered usage"
{"price": "{{METERED_USAGE_PRICE_ID}}", "quantity": 1},