Skip to content
Fluxer API

Deployment availability

A self-hosted instance serves the routes below only while its premium mode is mirror or Stripe is set up. When the instance doesn't serve one, the API returns 404 NOT_FOUND, the same as for an unknown path.

Three flags in the instance features object of the unauthenticated instance discovery document decide which of these routes an instance serves. A change to them applies without a restart, and both Stripe flags also need premium_enabled.

FlagTrue when
premium_enabledThe instance premium mode is mirror
stripe_enabledBilling is switched on, a Stripe secret key is set and at least one currency has monthly and yearly prices
stripe_serviceableA Stripe secret key is set

When billing is switched off, stripe_serviceable stays true and people can still manage their existing subscriptions.

These routes need premium_enabled.

MethodRouteOperation
GET/v1/gifts/{code}Get gift
POST/v1/gifts/{code}/redeemRedeem gift
GET/v1/users/@me/giftsList current user gifts

These routes need stripe_enabled.

MethodRouteOperation
POST/v1/stripe/checkout/subscriptionCreate subscription checkout
POST/v1/stripe/checkout/giftCreate gift checkout
GET/v1/premium/price-idsGet price IDs

These routes need stripe_serviceable. Receive Stripe webhook also needs a Stripe webhook secret.

MethodRouteOperation
POST/v1/stripe/webhookReceive Stripe webhook
GET/v1/premium/current-subscription-priceGet current subscription price
POST/v1/premium/customer-portalCreate customer portal
POST/v1/premium/grace/endEnd premium grace period
POST/v1/premium/cancel-subscriptionCancel subscription
POST/v1/premium/reactivate-subscriptionReactivate subscription
POST/v1/premium/change-subscriptionChange subscription billing cycle
POST/v1/premium/cancel-pending-subscription-changeCancel pending subscription change

Every instance serves Get premium state and Set premium perks disabled. In the everyone premium mode, every account on a self-hosted instance has premium, and is_premium stays true even when premium_perks_disabled is true.

Other flags in instance discovery, such as voice_enabled, emails_enabled and discovery_enabled, don't remove routes.