#joaovbsberse
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- joaovbsberse, 2 hours ago, 13 messages
- joao-search-price, 4 days ago, 6 messages
- joaovbsberse, 5 days ago, 11 messages
I think i need to query the tiers
Plan doesn't have unit_amount
It has an amount: https://stripe.com/docs/api/plans/object#plan_object-amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but look at this
plan_Oy85yOkf0Q8lI6
{
"id": "plan_Oy85yOkf0Q8lI6",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1699450202,
"currency": "brl",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "1 reau",
"product": "prod_Oy7tAoNyrAsYkA",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": 14,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 100,
"unit_amount_decimal": "100"
}
this plan with per unit billing scheme has unit_amount
"Only set if billing_scheme=per_unit."
to see tiers, need to expand the qurey;
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What field are you expanding exactly?
There's not a tiers field
I see the amount on the plan object you originally shared for what it's worth
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No problem
other thing
do you know how this expand works?
just for a quick question to avoid a wast of time
Sure
im query all prices
i can expand using the query to list all
or just for querying one?
You can do for both
do you know php?
i tryed to do this, but seems not be working
Price::all(['active' => 'true', "expand" => ["data.tiers"]])