I found the problem, It was related to how I created the stripe Tax and the currency Plus Inclusive tax for my country.
Feb 15, 2023
1
Level 1
Laravel - Stripe Integration Error default_tax_rates[0]
Hello,
I'm trying to finish my integration with stripe and when I'm checking out the payment on the stripe dashboard at Customer there is a 400 Error resource_missing - default_tax_rates[0]
I tried to ask @Stripe but with no Help. I used this tutorial Laravel Cashier (Stripe) ("laravel/cashier": "^12.6",) and my Billing class is Business instead of a User.
public function checkout(User $user, Business $business, SubscriptionType $subType, Request $request) {
if ($request->payment_method) {
$price_id = $subType->yearly_price_id;
try {
$business->newSubscription($subType->name, $price_id)->create($request->payment_method);
$business->updateSubscriptionsFromStripe();
return view('refactoring.registration.refactor-register2',
[
'userId' => $user->id
]
);
} catch (Exception $ex) {
return back()->withErrors([
'error' => 'Unable to create subscription due to this issue '. $ex->getMessage()
]);
}
} else {
return redirect()->back();
}
}
{ "error": { "code": "resource_missing", "doc_url": "", "message": "No such tax rate: 'txr_1IHVvFGyvLw1g1hBj9HJuLzA'", "param": "default_tax_rates[0]", "request_log_url": "", "type": "invalid_request_error" } }
Please or to participate in this conversation.