AppsPayments

Billing in your apps · Autessa Payments

Entitlements and one-time payments

The Autessa Payments service gives apps you build a small billing API: Payments.plans() lists offered plans, Payments.entitlement() says whether the signed-in person is paying, Payments.checkout() starts checkout for a plan or a one-time amount, Payments.manageBilling() opens their billing page and Payments.onEntitlementChange() tells you when it changes.

Goes beyond a typical invoicing or payments tool
Start free
Payments serviceSAMPLE
const billing = await Payments.entitlement();
// { isPaying, status, plan, currentPeriodEnd,
//   trialEnd, cancelAtPeriodEnd }

if (!billing.isPaying) {
  const { available, plans } = await Payments.plans();
  if (available) await Payments.checkout({ planId: plans[0].id });
}

// one-time payment
await Payments.checkout({ amountCents: 2500,
  description: 'Workshop seat' });

Payments.onEntitlementChange(refresh);

The problem it solves

A stored “paid” flag is always wrong eventually

Renewals, failures, trials and cancellations change who is paying every day. Entitlement reads the live status, so your app never drifts out of sync with billing.

What you get

  • entitlement() returns isPaying, status, plan, currentPeriodEnd, trialEnd and cancelAtPeriodEnd; pass refresh: true to check again.
  • isPaying is true for Active, Free trial and Payment overdue subscriptions.
  • plans() returns available: false with a plain reason when Payments is off or not ready, so the app can hide billing cleanly.
  • checkout({ planId }) for a plan, or checkout({ amountCents, description }) for a one-time payment.
  • onEntitlementChange(callback) fires after the person returns from checkout; it returns a function that stops listening.

How it works

How does entitlements and one-time payments work in Autessa Payments?

  1. Import it

    import { Payments } from ‘../autessa’ (included in every app).

  2. Check entitlement

    Gate features on isPaying or plan.

  3. Start checkout

    For a plan, or a one-time amount and description.

  4. React to changes

    Subscribe with onEntitlementChange.

Every option

Methods

OptionWhat it does
Payments.plans()Offered plans, or available: false with a reason.
Payments.entitlement()Live billing status for the signed-in person.
Payments.checkout()Plan checkout or one-time payment.
Payments.manageBilling()Opens Manage subscription.
Payments.onEntitlementChange()Listener for subscription changes.

Permissions

Who can do what?

WhoCan
App buildersUse the service in app code.
App visitor (signed in)Pay and subscribe.

Connected

How it connects to the rest of Autessa Payments

FAQ

Questions about entitlements and one-time payments

Can an app take a one-time payment?

Yes. Call Payments.checkout with amountCents and a description instead of a planId.

Is a customer with a failed card still “paying”?

Yes, while Autessa retries. isPaying is true for Payment overdue, and false once the subscription ends.

What if Payments is not set up yet?

plans() returns available: false with a plain reason, so your app can hide billing.

Autessa Payments

Try entitlements and one-time payments in Autessa Payments

The Autessa Payments service gives your app plans(), entitlement(), checkout() for plans or one-time amounts, manageBilling() and a change listener, so you never store a paid flag.

Start free

100% customizable, code and all

Make Autessa Payments fully your own.

Use it out of the box, then change anything. Ask Autobot, Autessa’s AI builder, for a new field, screen, report, workflow or agent and it builds it into your copy of the app. Or open the code and edit it yourself. Nothing is locked: the app, its data and its code are yours.

Start free and make it yours