codeplugtech/creem-payments

Laravel Package for Creem.io Payments

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/codeplugtech/creem-payments

0.0.3 2026-02-11 13:12 UTC

This package is auto-updated.

Last update: 2026-02-11 13:44:30 UTC


README

  1. Add the Billable trait to your billable model definition.
use Codeplugtech\CreemPayments\Billable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Billable;
}
  1. Add API Keys to your .env file
CREEM_API_KEY=YOUR_API_KEY
CREEM_SANDBOX=true
CREEM_WEBHOOK_SECRET=YOUR_WEBHOOK_KEY
  1. You can create a checkout session using the code below:
$user->subscription()->createCheckoutSession([
    'product_id' => 'prod_123',
    'customer_email' => $user->email,
     // other parameters
]);

or via the static method:

use Codeplugtech\CreemPayments\CreemPayments;

CreemPayments::createCheckoutSession([
    'product_id' => 'prod_123',
    'customer_email' => 'test@example.com'
]);
  1. Exclude creem/* from CSRF protection in bootstrap/app.php file for Laravel 11
->withMiddleware(function (Middleware $middleware) {
    $middleware->validateCsrfTokens(except: [
        'creem/*',
    ]);
})