diff --git a/src/CheckoutBuilder.php b/src/CheckoutBuilder.php index b2372cbd..860d29b1 100644 --- a/src/CheckoutBuilder.php +++ b/src/CheckoutBuilder.php @@ -79,11 +79,12 @@ public function create($items, array $sessionOptions = [], array $customerOption return $item; })->values()->all(), - 'tax_id_collection' => [ - 'enabled' => Cashier::$calculatesTaxes ?: $this->collectTaxIds, - ], ]); + if (Cashier::$calculatesTaxes ?: $this->collectTaxIds) { + $payload['tax_id_collection'] = ['enabled' => true]; + } + return Checkout::create($this->owner, array_merge($payload, $sessionOptions), $customerOptions); } }