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

thebigk's avatar
Level 13

How to I use Laravel Cashier to charge one time payments using Stripe?

Ok, my requirements are super simple - I don't want multiple payment related columns added to my User table and I've no plan to enable recurring payments / subscriptions to the users.

In fact, I'm creating a "guest" checkout page where a person can simply make a purchase without signing up on the site first.

However, with Cashier, I'm finding it really difficult to achieve this simple task. The flow I want to achieve is this -

  1. User (guest or member ) lands on the purchase page
  2. They see purchase options and make the payment.
  3. They are then shown "Thank you" page and an invoice is sent to their email ID.

I'm using Stripe to make the payment. How should I go about this?

0 likes
1 reply
Sti3bas's avatar
Sti3bas
Best Answer
Level 53

@thebigk you don't need Cashier for this, use Stripe API directly:

\Stripe\Stripe::setApiKey('sk_test_1234');

// `source` is obtained with Stripe.js; see https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token
\Stripe\Charge::create([
  'amount' => 2000,
  'currency' => 'usd',
  'source' => 'tok_visa',
  'description' => 'My First Test Charge (created for API docs)',
]);

https://stripe.com/docs/api/charges/create

2 likes

Please or to participate in this conversation.