0

I'd like to apply tax to the subscription I have just swapped the user to. Here is my attempt:

protected function swapToYearlyPlan(){
    $company = Auth::user()->company;
    $customer = $company->subscription()->getStripeCustomer();

    $company->subscription('Gold Annual Plan')->swap();

    // This doesn't seem to work -- no error message or anything.
    $company->subscription()->tax_percent = 5;

    return 'Upgraded to Gold Annual Plan w/ tax!!';
}

I looked through the Laravel Cashier files and wasn't able to find any code relating to taxes whatsoever in the StripeGateway.php file. My ultimate fear is that it can't be done in this version of Laravel Cashier.

Marcel Gruber
  • 6,668
  • 6
  • 34
  • 60

1 Answers1

0

After more research, it looks like 4.2 doesn't seem to support this feature out of the box. You must separately add tax to an invoice as a separate line item.

I found this post helpful.

Marcel Gruber
  • 6,668
  • 6
  • 34
  • 60