#### Category : laravel-cashier

I’m trying to figure out how to update the Stripe payment method associated with a subscription. Is it fine if I simply update the default payment method of the user ? I would use Stripe’s JS to get the card information and make a payment method token with it, then update the default payment method ..

I have 2 different stripe accounts : # Stripe Keys Account 1 STRIPE_KEY=pk_test_abc STRIPE_SECRET=sk_test_abc # Stripe Keys Account 2 STRIPE_KEY_MAPPING=pk_test_opr STRIPE_SECRET_MAPPING_MASTER=sk_test_opr I put in an array : $stripe_accounts = [ env(‘STRIPE_SECRET’), env(‘STRIPE_SECRET_MAPPING_MASTER’) ]; I want to create customer in both accounts in the same time : foreach ($stripe_accounts as $item) {$stripe = new StripeStripeClient($item); .. Read more I have 2 stripe account : # Stripe API Keys STRIPE_KEY=pk_test_abc STRIPE_SECRET=sk_test_abc STRIPE_KEY_MAPPING=pk_test_opr STRIPE_SECRET_MAPPING_MASTER=sk_test_opr I put both in an array : ‘stripe_accounts’ => [ env(‘STRIPE_SECRET’), env(‘STRIPE_SECRET_MAPPING_MASTER’) ] Now I want to create user in both accounts : foreach ($stripe_accounts as $item) { Stripe::setApiKey($item); $hotel = session(‘hotel’);$stripeUser = $hotel->createOrGetStripeCustomer();$hotel->updateDefaultPaymentMethodFromStripe(); } I have no errors, ..

I want to use another model for cashier, not the default. I have 2 tables User and Hotel relation one-to-many (a user can have multiple hotels). I want to add posibility that a user can add different payment methods for his hotels. I removed cashier columns from user and I added to hotel table. I ..

Is there a way to download the Stripe generated invoices PDF from the Laravel app ? When I generate an Invoice PDF using downloadInvoice (as explained here https://laravel.com/docs/8.x/billing#generating-invoice-pdfs), the pdf is created locally using a Cashier custom template, which is not exactly pretty AND needs to be localized. While if I login to Stripe, go ..

I’m trying to charge a customer in my Laravel app but it keeps saying $customer is null. Any idea what’s wrong? The error: Call to a member function checkout() on null refers to this line return$customer->checkout… However calling echo $id returns the customer ID so I see no issue why findBillable returns a null .. Read more I would like help because I still can’t find a solution on new cashier version v13$ paymentMethod = $request-> paymentMethod; returns an empty payment method, entering a specific card pm_card_visa works, but the default paymentMethod doesn’t work, what could be? Thank you in advance Sourc.. Read more I’m gonna setup subscription pricing model like this.$19.99/mo for the first three months $39.99/mo from the fourth month I’m using laravel-cashier or laravel-spark 2.0. How can I do this? Sourc.. Read more I just put my site in production, I use laravel cashier for payments with stripe and I need the webhooks, in local everything works great. In production I need to run this command: php artisan cashier:webhook There is no service that stays on like the queue:worker and that I have to quit, there it just .. Read more There are many functions in Laravel Cashier to get a lot of subscription information for a particular user. What if I need to get the list of all users who have subscribed in a given date range or who have cancelled in a given date range. User::subscription()->where doesn’t work Sourc.. Read more I have set ‘trial_days’ => 5, on spark.php but when I try to create a subscription, the trial period is not recognized (It goes ahead and charges the user as if the trial period does not exist). I have also set the trial days to 5 on the Sandbox Dashboard. What am I missing here? .. Read more I am using laravel cashier 13.4.4 and I have a problem with update subscription. In my configuration, my Billable model is not set to User but to Company model. Everything works fine, I mean – create/get/update customer, add/get payment methods, get and create subscription… But when I am trying to use in any way asStripeSubscription .. Read more Is the stripe_price within the [subscriptions] table supposed to be null once a user is subscribed to multiple prices? To re-create, I would subscribe a user to a base plan of$19.99 a year. Then subscription them to an additional price of $4.99 with a quantity on that can vary depending on what the user .. Read more lets say a monthly recurring payment on a subscription fails it retries automatically on next attempt but is there any way we can try for a charge on that failed payment of subscription when we update a card or retry with same card instead of waiting for stripe to charge automatically on next retry? Source: .. Read more I’m upgrading Stripe from Version 9 to Version 10, but this test returns this error, I tried to change the http status but nothing works. My test is here: public function a_item_created_event_will_not_create_a_customer_when_the_customer_creation_fails() {$handler = $this->fakeStripeRequests();$handler->expects(‘post’, ‘https://api.stripe.com/v1/customers’)->respondWith(500); $logger =$this->fakeLogger(); $item =$this->newItem()->create(); $user =$this->newUser($item)->create(); event(new Created($item, $user));$this->assertDatabaseMissing(‘customers’, [‘item_id’ => $item->id]);$logger->shouldHaveReceived(‘error’)->with(Mockery::type(ApiErrorException::class)); ..

I’m using Laravel Cashier v13 in my Laravel 8 API project with a Nuxt JS front-end. I’m a customer, have subscribed to a plan and am trying to download my invoice as a PDF as per the docs. I’ve set up a GET route in my api.php file and have got my SubscriptionInvoiceController looking like ..

I’m using Laravel Cashier, the Stripe integration version in my Laravel 8 project, my Laravel project is an API and has no front-end. I’d like to fetch back a boolean value to find out whether the user is subscribed with the subscribed method automatically via my User model and create a new key as part ..

I have made a subscription based service and when the user fills in their CC info and purchases the subscription they get redirected to a confirmation page. (See code below) public function store(Request $request) {$plan = Plan::where(‘stripe_plan_id’, $request->plan)->first(); auth()->user()->newSubscription($plan->name, $request->plan)->create($request->paymentMethod); Mail::to(auth()->user()->email)->send(new UserSubscribed(auth()->user(), \$plan)); return view(‘billings.confirmation’, compact(‘plan’)); } But I have two situations. First one ..

This is my first time using Stripe and I am faced with a problem that I cannot solve. I am using Laravel Cashier with Stripe Webhooks and did everything as described in the documentation , and so I think that I have nothing to show in the code. No event works, I always get this ..

Scenario: I’m using Stripe’s new custom checkout method in my Laravel application using Laravel Cashier Package so that Stripe uses all of payments securely. All working fine. I need to pass on the additional form data along with my products, which are multiple form fields, some Ids for relationships, some images etc. Followed this page ..

I am creating an appointment application where users billed per appointment, sometime the users will cancel the subscription. In that time we need to decrease the usage, is the right way to do it? if so is there any facility for that in Laravel Cashier? In the Stripe Documentation, it says about an Action ENUM, ..

I try to use a meteredPrice() function with Laravel Cashier. For what I need it – for example if I sign subscription in 01.06, I want to make payment at 01.07, so after 1 month. For this I tried to use meteredPrice() like at the documentation, but get an error "Call to undefined method LaravelCashierSubscriptionBuilder::meteredPrice()" ..