#lionel_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1247923933202612345
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Can you retrieve that price and paste the text of what you get back in this thread? I do see tiers being returned by the API for API calls that your code is making
https://dashboard.stripe.com/test/logs/req_PttgNwQzgCWZrC
I get this screenshot via the command line.
And if I use my following code
$prices = Price::all(['product' => $product->id, 'active' => true]);
foreach ($prices->data as $price) {
echo " Price ID: " . $price->id . "\n";
echo " Billing Scheme: " . $price->billing_scheme . "\n";
echo " Recurring Interval: " . ($price->recurring ? $price->recurring->interval : 'N/A') . "\n";
echo " Unit Amount: " . ($price->unit_amount !== null ? $price->unit_amount : 'N/A') . "\n";
if ($price->billing_scheme === 'tiered') {
echo " Tiers: \n";
var_dump($price->tiers);
I get null for my var_dump... What am I missing?
You'll notice I do not use the same price ID that you used
Ah it looks like you may need to expand this field when retrieving the prices to be able to see it in your response
https://docs.stripe.com/api/prices/object#price_object-tiers
https://docs.stripe.com/api/expanding_objects