Subscription
Billing state for the account behind the current brand. An account is the billing container: it holds one subscription and owns one or more brands.
GET /subscription/status
json
{
"subscribed": true,
"on_trial": false,
"status": "active",
"plan": { "id": 3, "name": "Solo", "slug": "solo", "popular": true },
"interval": "month",
"next_billing_date": "2026-09-14T00:00:00.000000Z",
"on_grace_period": false,
"trial_ends_at": null
}| Field | Notes |
|---|---|
status | trialing, active, cancelled, or the raw Stripe status |
interval | month or year, null with no subscription |
on_grace_period | Cancelled but still paid up to next_billing_date |
GET /subscription/plans
Plans available to subscribe to, with their Stripe price ids.
json
[
{
"id": 3,
"name": "Solo",
"slug": "solo",
"popular": true,
"features": { "brands": 1, "storage_limit": 5 },
"prices": [
{ "stripe_id": "price_...", "interval": "month", "amount": 29.0, "currency": "EUR" },
{ "stripe_id": "price_...", "interval": "year", "amount": 290.0, "currency": "EUR" }
]
}
]POST /subscription/checkout
Start a Stripe Checkout session.
bash
curl -X POST https://api.postlyra.com/subscription/checkout \
-H "Authorization: Bearer $POSTLYRA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"plan_id": 3, "interval": "month"}'json
{ "url": "https://checkout.stripe.com/c/pay/..." }Send the user to url. interval must be month or year.
POST /subscription/switch
Change plan on an existing subscription. Same body as checkout.
json
{ "message": "Plan updated successfully." }Returns 422 No active subscription found. if there is nothing to switch.
Cancelling
There is no cancel endpoint. Cancel from Studio, under Billing, which opens the Stripe billing portal.
Public plans
GET /public/plans needs no authentication. It is what a pricing page reads, cached for 5 minutes, and it returns prices in cents:
json
{
"plans": [
{
"slug": "solo",
"location": "default",
"popular": true,
"sort_order": 1,
"name": { "en": "Solo" },
"description": { "en": "For one person running their own social media." },
"prices": {
"monthly": { "amount": 2900, "currency": "EUR" },
"yearly": { "amount": 29000, "currency": "EUR" }
},
"features": { "brands": 1, "storage_limit": 5 }
}
],
"generated_at": "2026-08-15T09:00:00+00:00"
}Only plans that are active, visible, and have both a monthly and a yearly price appear.