#Fake Drew
1 messages · Page 1 of 1 (latest)
Hit there,
Could you please share the related priceId
price_1LzyFOCt7iTZrSyB8Iy6tuWp
I'm seeing the flat rates price, could you uplease share the response you get when fetching it ?
In [63]: stripe.Price.retrieve(id="price_1LzyFOCt7iTZrSyB8Iy6tuWp", api_key=TEST_SEC_KEY)
Out[63]:
<Price price id=price_1LzyFOCt7iTZrSyB8Iy6tuWp at 0x7ff5083fc540> JSON: {
"active": true,
"billing_scheme": "tiered",
"created": 1667462038,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_1LzyFOCt7iTZrSyB8Iy6tuWp",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "***** Repricing by Volume",
"object": "price",
"product": "prod_MjR75FoFI6FIXQ",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": "volume",
"transform_quantity": null,
"type": "recurring",
"unit_amount": null,
"unit_amount_decimal": null
}
You need to expand tiers when fetching the price:
https://stripe.com/docs/api/prices/object#price_object-tiers
You can refer to this link for more details about expanding:
https://stripe.com/docs/api/expanding_objects
Got it! Thank you!
stripe.Price.retrieve(id="price_1LzyFOCt7iTZrSyB8Iy6tuWp", api_key=TEST_SEC_KEY, expand=["tiers"])
Yes like that 👌