#DARN40 - metered pricing

1 messages · Page 1 of 1 (latest)

vapid valley
#

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

gusty fulcrum
#

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...

vapid valley
#

activating it metered
What do you mean by that?

gusty fulcrum
#

So in the stripe dashboard there is the option to create is normal or 'licensed' or creating a price 'metered'

vapid valley
#

So do you mean you pass in a metered price instead of a static price? Or you include both?

gusty fulcrum
#

I'm replacing this price with another price that is basically the same, only that it is metered now.

#

I'm not adding it

vapid valley
#

These IDs start with req_

gusty fulcrum
#

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...

vapid valley
#

Where is that called out?

gusty fulcrum
#

{"price": "{{METERED_USAGE_PRICE_ID}}", "quantity": 1},