#mathan - subscription

1 messages · Page 1 of 1 (latest)

subtle sable
#

Hi there! Pasting your message here:

$plan = $stripe->plans->retrieve($organization->subscriptionPlan->stripe_id,[]);
this gives null values in amount

terse parrot
#

"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

terse parrot
subtle sable
#

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 has billing_scheme: "tiered"

terse parrot
#

its graduated billing base amount + unit amount

#

how can i get base amount and unit amount for my plan(graduated billing)?

#

from stripe

subtle sable
#

And you need to use expand to see that value in the API response.