#mathankumar-subscription

1 messages ยท Page 1 of 1 (latest)

soft roost
#

๐Ÿ‘‹ Happy to help

#

Can you share the subscription ID (sub_xxx)?

opaque birch
#

sub_1LOE8qSF6Qh6F24i2EVR6iGr

#

Any problems in subscription?

soft roost
#

Discord is a bit busy now. Looking into it

opaque birch
#

Okay

soft roost
opaque birch
#

my scenario is that when I upgrade, I need to start that new plan with current start date, not the same billing period !!?

#

what i do for this scenario?

crystal storm
#

can you explain in more detail?

opaque birch
#

for example, I upgraded my subscription plan but my current_period_start and current_perion_date are not updated for my updated plan how can I do that also I need a billing cycle for this new plan

#

$this->stripeSubscriptionPlan = \Stripe\Subscription::update('stripe_subscription_id', [
'cancel_at_period_end' => false,
'proration_behavior' => 'create_prorations',
'items' => [
[
'id' => $subscription->items->data[0]->id,
'price' => $plan->stripe_id,
],
],
]);

#

using this code

crystal storm
#

you can set billing_cycle_anchor=>"now on the request then to also start a new billing cycle at the same time.

opaque birch
#

and invoice will be created for that previous plan?

crystal storm
#

what would that mean?

opaque birch
#

I updated one plan it shows overdue, what does it mean?

opaque birch
#

I understand from "previous invoices are not paid correctly?"

crystal storm
#

sounds right

opaque birch
#

Okay

#

How can I get the previous plan usage details in usage-based plans?

#

I just got the current plan usage but I did not find ways for previous plan usage!

crystal storm
#

not sure exactly. Can you tell me how exactly you get the current usage in code so it refreshes my memory?

opaque birch
#

$stripe = new \Stripe\StripeClient( 'sk_test_51LKL0hSF6Qh6F24itprFyspHFL8jPfQ6cmgj0zKL1vljEzMFNzsLJiBtJOTLBwaHW2tdt7pB2x7ImW99RHcU19Z800rQB7JDTG' ); $stripe->subscriptionItems->allUsageRecordSummaries( 'si_DAyhPiOTjrdfTv', ['limit' => 3] );

#

by using this

crystal storm
opaque birch
#

like this

#

$data = $stripe->subscriptionItems->allUsageRecordSummaries( 'si_M6R0Do9jzUbhAt', [] ); foreach ($data->autoPagingIterator() as $item) { // Do something with $customer }