#mathan - subscription
1 messages · Page 1 of 1 (latest)
Hi there! Pasting your message here:
$plan = $stripe->plans->retrieve($organization->subscriptionPlan->stripe_id,[]);
this gives null values in amount
Are you trying to retrieve this value? https://stripe.com/docs/api/plans/object#plan_object-amount
"id" => "plan_MGBi9pUbPo350R"
"object" => "plan"
"active" => true
"aggregate_usage" => "max"
** "amount" => null**
** "amount_decimal" => null**
"billing_scheme" => "tiered"
"created" => 1660716169
"currency" => "usd"
"interval" => "month"
"interval_count" => 1
"livemode" => false
this is my o/p
i am trying to retrieve base amount and unit amount for my plan(graduated billing)
Thanks, that's expected. As mentioned in the documentation
The unit amount in cents to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
But your plan hasbilling_scheme: "tiered"
its graduated billing base amount + unit amount
how can i get base amount and unit amount for my plan(graduated billing)?
from stripe
I think that information is in the tiers property https://stripe.com/docs/api/plans/object#plan_object-tiers
And you need to use expand to see that value in the API response.