Laravel Polar is a first-class Laravel package that connects your application to Polar.sh — the billing platform built for developers. With a singleDocumentation Index
Fetch the complete documentation index at: https://danestvesllc-2b77d201.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Billable trait you unlock checkout sessions, subscription management, webhooks, license keys, usage-based billing, and more, all with a fluent PHP API that feels right at home in Laravel.
Installation
Install the package and run the setup command to get your application connected to Polar.sh in minutes.
Configuration
Configure your access token, webhook secret, environment, and other options.
Billable Trait
Add the Billable trait to any Eloquent model to unlock the full billing API.
Webhooks
Handle real-time billing events from Polar.sh using typed Laravel events.
Get started in 4 steps
Add the Billable trait
Apply the
Billable trait to your User model (or any model that should be billed).Explore by feature
Checkout
One-time payments, multi-product checkouts, embedded checkout, and reusable checkout links.
Subscriptions
Create, cancel, resume, and swap subscription plans. Supports multiple subscription types per user.
Orders & Invoices
Retrieve order history, issue refunds, and generate downloadable PDF invoices.
License Keys
Issue, validate, and manage license keys as a product benefit.
Usage Billing
Track metered usage events and charge customers based on actual consumption.
Discounts
Create coupon codes and apply discounts to checkouts and subscriptions.