Skip to content

Subscription

A recurring agreement to bill (receivable) or be billed (payable) for Prices, period after period. Each period's charge is an Invoice that points back at it.

PackBilling
Versionv1 (latest)
URNurn:postware:billing:subscription
Identityidentifiers
Status categoriespending, trialing, active, past_due, paused, cancelled

Fields

FieldTypeReqNotes
directionenum(receivable|payable)yesreceivable = our customer; payable = a vendor we pay; default receivable
counterpartyRef<Organization | Person>yes
itemsobject[]yes{price: Ref<Price>, quantity: decimal}
statusStatus(pending|trialing|active|past_due|paused|cancelled)yes
current_periodPeriodnothe period being billed now; absent while pending
started_atdatetimeno
trial_enddatetimeno
cancel_atdatetimenoscheduled end; when set the subscription does not renew
ended_atdatetimeno
referencestringnothe customer's PO or reference, copied onto generated invoices

Events

subscription.cancelled when status.category becomes cancelled; subscription.activated when status.category becomes active; subscription.past_due when status.category becomes past_due.