stripe-java icon indicating copy to clipboard operation
stripe-java copied to clipboard

Price object tiers field is null even though the price has tiers setup

Open mohammedshafiq opened this issue 2 years ago • 1 comments

Describe the bug

I am seeing that the tiers field in the Price object is null even though the Price has tiered options set.

Please can somone take a look and let me know what is wrong.

Thanks.

{ "active": true, "billing_scheme": "tiered", "created": 1721682774, "currency": "gbp", "currency_options": null, "custom_unit_amount": null, "deleted": null, "id": "price_1PfTXOGVKF9z51UnUJXmf9h5", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "object": "price", "product": "prod_QVxWyrjR1Lb6YD", "recurring": { "aggregate_usage": null, "interval": "month", "interval_count": 1, "meter": null, "trial_period_days": null, "usage_type": "licensed" }, "tax_behavior": "unspecified", "tiers": null, "tiers_mode": "graduated", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null }

To Reproduce

Via Stripe Dashboard

Add a Price to a product with tiered options

Retrieve the price via Stripe-Java

tiers field is null

Expected behavior

Tiers field expected to be filled with data.

Code snippets

No response

OS

windows

Java version

Java

stripe-java version

26.4.0

API version

2024-06-20

Additional context

No response

mohammedshafiq avatar Jul 23 '24 12:07 mohammedshafiq

This is not a bug.

I've just noticed that the tiers field is expandable so needs to be specified in the Params when retrieving.

Thanks

mohammedshafiq avatar Jul 23 '24 13:07 mohammedshafiq