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

MooseSaid's avatar

What is the best logic to create a credit system with Laravel and Stripe?

I have that project I'm working on, allow me to explain briefly what I want to achieve

What I have:

1- Stripe one time off payment working.

2- Spatie package that catches Stripe webhooks.

What I want:

1- I want the shop who makes a successful sell, gets credit on the account with the amount 'X', this amount 'X' is after Stripe takes it's part and also my platform.

2- The shop owner can withdraw his credit to his account.

What I have in mind: 1- once Stripe sends a successful payment webhook, a job will run to do the calculation and add the amount 'X' to shop table 'available_credit' column.

2- Some how figure out how to make payouts from my Stripe account to the shop owner.

3- Once money withdraw, a job fires to deduct the amount taken from the credit.

Please tell me your thoughts and what should I be careful about.

0 likes
1 reply

Please or to participate in this conversation.