Subscriptions
Wiederkehrende Abrechnung
Wofür sie gedacht ist
Define recurring plans and track customer subscriptions with trial, active, past due and cancelled states, including the next invoice date. It does not create invoices by itself.
Was das Paket leistet und was nicht
Recurring plans and customer subscriptions with a trial, active, past due and cancelled flow. It records the next invoice date; it does not create invoices on its own.
Modelle
subscriptions_plan
A recurring offer customers can subscribe to
Lesegruppe: subscriptions.user. Schreibgruppe: subscriptions.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
name | text | none | nein | subscriptions.user | im Klartext | Plan name, for example Team yearly |
code | text | none | nein | subscriptions.user | im Klartext | Short code of the plan |
interval | select (monthly, quarterly, yearly) | none | nein | subscriptions.user | im Klartext | How often the customer is billed: monthly, quarterly, yearly |
price | money | none | nein | subscriptions.user | im Klartext | Standard price per billing interval (minor currency units, e.g. cents) |
trial_days | number | none | nein | subscriptions.user | im Klartext | Length of the free trial in days |
active | bool | none | nein | subscriptions.user | im Klartext | Whether new customers can pick the plan |
subscriptions_subscription
A customer's recurring subscription to a plan
Lesegruppe: subscriptions.user. Schreibgruppe: subscriptions.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
customer_id | ref → party | none | nein | subscriptions.user | im Klartext | The customer who subscribed |
plan_id | ref → subscriptions_plan | none | nein | subscriptions.user | im Klartext | The plan subscribed to |
started_on | date | none | nein | subscriptions.user | im Klartext | Date the subscription began (YYYY-MM-DD) |
trial_ends_on | date | none | nein | subscriptions.user | im Klartext | Date the free trial ends (YYYY-MM-DD) |
next_invoice_on | date | none | nein | subscriptions.user | im Klartext | Date the next invoice is due (YYYY-MM-DD) |
recurring_amount | money | none | nein | subscriptions.user | im Klartext | Amount billed each interval after discounts (minor currency units, e.g. cents) |
currency | text | none | nein | subscriptions.user | im Klartext | ISO 4217 currency code, for example EUR |
seats | number | none | nein | subscriptions.user | im Klartext | Number of licences or users covered |
cancel_reason | longtext | none | nein | subscriptions.user | im Klartext | Why the customer cancelled |
state | select (trial, active, past_due, cancelled) | none | nein | subscriptions.user | im Klartext | Subscription status: trial, active, past_due, cancelled |
Workflows
subscriptions_subscription
| Aktion | Bewegt | Wer sie ausführen darf | Freigabe |
|---|---|---|---|
subscriptions_subscription.activate | state: trial → active | subscriptions.manager | nein |
subscriptions_subscription.mark_past_due | state: active → past_due | subscriptions.manager | nein |
subscriptions_subscription.recover | state: past_due → active | subscriptions.manager | nein |
subscriptions_subscription.cancel_trial | state: trial → cancelled | subscriptions.manager | ja |
subscriptions_subscription.cancel | state: active → cancelled | subscriptions.manager | ja |
subscriptions_subscription.cancel_overdue | state: past_due → cancelled | subscriptions.manager | ja |
Berechtigungsgruppen
Von dieser App verwendete Gruppen:
subscriptions.managersubscriptions.user
Freigabeschritte
Schritte, die ein Agent nur vorschlagen kann:
subscriptions_subscription.cancel_trialsubscriptions_subscription.cancelsubscriptions_subscription.cancel_overdue
Was Agenten tun können und was nicht
Ein Agent kann Datensätze dieser App lesen, durchsuchen, anlegen und aktualisieren sowie Aktionen ausführen, die keine Freigabe brauchen, und zwar innerhalb der Berechtigungsgruppen seines Tokens.
Diese Schritte kann er nur vorschlagen, und eine Person muss sie freigeben: subscriptions_subscription.cancel_trial, subscriptions_subscription.cancel, subscriptions_subscription.cancel_overdue, subscriptions_plan.delete, subscriptions_subscription.delete.
Abhängigkeiten
base
Installation
Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:
obop modules install-from subscriptionsErfordert eine Datenbank und Administratorrechte.
Selbst bauen
Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden