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

ajck's avatar
Level 1

Using Cashier with a different table, other than users (L5.4)?

Is there an easy way that works, to apply Cashier to a table other than users? I'm just using Cashier for subscriptions, and although I have a users table, it's not users that will subscribe, only organisations (held in their own table).

I am assuming I modify the references to user and change them to organisation, here I'm billing with Stripe): https://laravel.com/docs/5.4/billing#stripe-configuration i.e. the migration to modify users table gets changed to orgs, the Billable model references Orgs instead of Users and the API key in services.php also references the Org model:

'stripe' => [
    'model'  => App\Org::class,
    'key' => env('STRIPE_KEY'),
    'secret' => env('STRIPE_SECRET'),
],

then to create a subscription I would do:

$org= Org::find(1);

$org->newSubscription('main', 'premium')->create($stripeToken);

Anything else I'm missing?

Thanks, Alex

0 likes
2 replies
Youssef_'s avatar

@ajck Hello, did you manage to fix this ? I'm having the same issue. Thanx!

Please or to participate in this conversation.