Skip to content

Instantly share code, notes, and snippets.

@MrMooky
Created August 13, 2020 11:33
Show Gist options
  • Save MrMooky/d98c6d3781c0a24292fe59fea2bcf58d to your computer and use it in GitHub Desktop.
Save MrMooky/d98c6d3781c0a24292fe59fea2bcf58d to your computer and use it in GitHub Desktop.
$update = \Stripe\Subscription::update($subscriptionId, [
'billing_cycle_anchor' => 'now',
'proration_behavior' => 'always_invoice',
'proration_date' => strtotime('tomorrow 00:01'),
'default_tax_rates' => [$this->getCorrectTaxRateId($planID)],
'cancel_at_period_end' => false,
'items' => [
[
'id' => $subscription->items->data[0]->id,
'plan' => $planID
],
],
'coupon' => $coupon
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment