Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

stevenh's avatar

Stripe - charge user whenever an event is triggered

Hi all,

I have a question about stripe and single charges. Is it possible to store a user's credit card once and then charge that card multiple times later, whenever a particular event is triggered. Is there a simple way to do this in with Cashier?

The Laravel documentation for Cashier on Payment Methods for Single Charges says:

"Due to Stripe limitations, you may not use the stored default payment method of a customer for single charges. You must allow the customer to enter their payment method details using the Stripe.js library."

https://laravel.com/docs/6.x/billing#storing-payment-methods

But the documentation for Cashier on Single Charges then says:

"If you would like to make a "one off" charge against a subscribed customer's payment method, you may use the charge method on a billable model instance. You'll need to provide a payment method identifier as the second argument:"

// Stripe Accepts Charges In Cents...
$stripeCharge = $user->charge(100, $paymentMethod);

https://laravel.com/docs/6.x/billing#simple-charge

Reading the stripe documentation, it seems that there is no problem to charge a user later when they are offline, using their saved payment method:

"The Setup Intents API lets you save a customer’s card without an initial payment. This is helpful if you want to onboard customers now, set them up for payments, and charge them in the future—when they’re offline.

Use this integration to set up recurring payments or to create one-time payments with a final amount determined later, often after the customer receives your service."

https://stripe.com/docs/payments/save-and-reuse#php

I'm confused :( ... should I use Cashier and create a subscription for the user that does not charge a subscription? Then make one-off charges using the charge method when needed?

Any help would be very much appreciated!

0 likes
2 replies
troehrkasse's avatar

This is confusing to me as well!

Currently, I've been using Stripe API to make one-off charges against a customer's saved payment method. It works fine, Stripe allows it with no issues. The problem is that our invoicing stuff is a bunch of custom code that is pretty messy, so I've been looking at upgrading to Cashier to make things more simple. We have to be able to do one-off charges, though... it doesn't make sense why Laravel says "due to Stripe limitations" when Stripe doesn't seem to have any such limitation.

fylzero's avatar

@stevenh The section saying you must allow the customer to enter payment method via Stripe.js is referring to single use token for a one time charge. In other words. A one time entry, one time use transaction.

You can store the payment method and "tokenize" the card in your system and bill one off charges from that token as much as you want.

Just follow this section to get the payment method stored... yes, follow storage for subscriptions. If you read the whole section it tells you this is for storing payments for future use.

https://laravel.com/docs/6.x/billing#storing-payment-methods

Then bill the card as needed with this...

https://laravel.com/docs/6.x/billing#simple-charge

Works fine.

25 likes

Please or to participate in this conversation.