Polar supports free trial periods on subscriptions. Trial data is synced automatically whenever a subscription is created or updated via webhooks — you don’t need to manage trial state manually. Laravel Polar stores the trial end date in aDocumentation 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.
trial_ends_at column and exposes a set of methods to read and update it.
Where to configure trials: Define the trial period on your product in the Polar dashboard. The package picks it up automatically from the webhook — there’s nothing to configure in Laravel.
How trials work
When Polar creates a subscription with a trial period, it includes the trial end date in the webhook payload. Laravel Polar stores this automatically and keeps it up to date wheneverSubscriptionCreated or SubscriptionUpdated webhooks arrive.
You don’t need to configure trials in Laravel Polar — define the trial period on your product in the Polar dashboard, and the package keeps
trial_ends_at in sync automatically.Checking if a subscription is on trial
CallonTrial() on a subscription instance to check whether it is currently in the trialing state:
onTrial() returns false once the trial ends and the subscription transitions to active status.
You can also check trial status directly on the billable model without loading the subscription first:
Reading the trial end date
trialEndsAt() returns the trial end timestamp as a Carbon instance, or null if no trial is set:
Detecting an expired trial
hasExpiredTrial() returns true when a trial end date is recorded and that date is in the past. This is useful for showing a prompt after the trial ends but before the customer actively cancels:
trialing to active automatically.
Updating the trial period
You can extend or shorten the trial period programmatically by callingupdateTrial() with any DateTimeInterface: