A guide to treatment packages
How to control treatment packages in an aesthetic clinic?
Control packages by defining the offer, recording the sale in the client profile and using one session only on the right appointment; Bia keeps balance, expiry, states and idempotency, but it does not replace billing or payment reconciliation.
A package looks simple when the clinic sees only its total sessions. The routine must answer which offer was sold, which price the client bought, which appointment used a session, what remains and what happens when someone retries or uses an expired package. Bia separates the catalog from the sale and keeps those answers in the client profile. This guide describes the real workflow and its boundaries: it does not invent a received payment, recurring charge, refund or guaranteed renewal.
- Catalog with package or monthly-plan type and up to 365 sessions
- Sale stored as a snapshot of name, total and price
- Used balance against purchased sessions in the client profile
- Appointment use protected by an idempotency key
- Expiry compared with the clinic's local date
- Active, finished, expired and canceled states with audit
1. Separate the offer from a package already sold
Start with the service catalog. The team stores a name, type, session count, total price, per-session price and, when relevant, an active base service. Package and monthly plan are offer types, not recurring billing. The clinic remains responsible for the commercial agreement.
An active item appears in a new sale; a disabled item stops being offered without disappearing from history. The name is unique in the clinic, and the base service must belong to the same tenant and be active. This prevents a package from pointing to another operation or a retired service.
The catalog accepts one to 365 sessions. Choose a count reception can explain and review both prices before publishing. Bia stores catalog data for the next sale; it does not choose discounts, approve promotions or decide that an offer is recurring.
- Package and monthly plan are catalog types, not automatic charges.
- Name and base service are validated on the server.
- Disabled items remain recorded for operational history.
2. Record the sale in the client profile
In the client profile, reception selects an active package and records access to its sessions. The sale copies name, total and price into its own record. If the catalog changes tomorrow, the package the client bought does not silently change with the future offer.
The operation confirms that the client belongs to the clinic and requires front-desk permission. The list shows active catalog items and records a sale; it is not a public payment screen. Recording a package does not prove that a card, transfer or cash payment was received.
After the sale, check name, total and expiry when present. Invoice, payment method, subscription and refund policy belong in the workflow that actually has those fields. Do not fill this page with a contract the code does not provide.
- The sale keeps a snapshot of name, total and price at that time.
- Client and package must belong to the same clinic.
- A recorded sale is not payment or refund confirmation.
3. Read balance as purchased and used sessions
The client profile shows purchased sessions, used sessions, progress and current state. The server returns the counter after each operation, so the clinic does not rely on a browser-only calculation. A ten-session sale starts at the purchased total and decreases when a valid appointment is linked to the package.
When one or two sessions remain, the operation attempts a deduplicated package-ending notice. It helps reception talk to the client, but it does not create a renewal or guarantee acceptance. The deduplication key prevents repeated notices for the same package.
The final use changes the state to finished, and later uses are rejected. Do not correct a balance with an invented number to hide a missed use. Review the record and audit before creating another sale.
- Balance is purchased sessions minus sessions actually used.
- A one- or two-session notice supports follow-up, not renewal.
- Finished state blocks use beyond the total.
4. Use one session on the right appointment
A use requires an existing appointment for the same client. Reception selects the package in the client profile linked to that appointment and sends the operation identifier. The server confirms the relationship before changing balance; another client's package or another tenant's appointment is rejected.
The same completion cannot deduct the package session twice because the operation uses an idempotency key.
The transaction locks the package, checks expiry and balance, increments sessionsUsed and stores package, client, appointment, state, total and responsible user. An exact retry returns the stored result; a different combination becomes a conflict instead of a second use.
- A session is used only by an appointment for the same client.
- Locks and the idempotency key protect concurrent attempts.
- Every use leaves an audit and package-use record.
5. Check expiry before promising balance
A package may have no expiry or a civil date set by the clinic. When listing and before use, the server compares that date with the tenant's local day. The server's UTC midnight must not end a package before the day the clinic still considers valid.
When the date passes, active becomes expired and the transition is audited. The check also runs inside the use operation. If the local day changes between reading and updating, the system does not force a use outside the window.
Before confirming a session, read expiry, state and balance together. The application does not extend a date, turn balance into money or reopen a package automatically. A tolerance is an approved policy, not an assumed behavior.
- Civil dates are compared in the clinic time zone.
- Expiry is audited and blocks later use.
- A package without a date does not expire automatically.
6. Distinguish active, finished, expired and canceled
Active means a use may happen when appointment, expiry and balance allow it. Finished means every session was used. Expired means the date passed. Canceled is a management decision that does not delete the record. The profile keeps these states separate so balance is not confused with administration.
Cancellation preserves name, total, used sessions, expiry and audit. It requires management permission and locks the row before updating, so a cancellation concurrent with a use does not overwrite a completed operation. A second cancellation is rejected.
Do not use package state to represent payment, clinical authorization or appointment attendance. Session use and appointment completion are related but separate contracts. The package records the use requested by the team; other states stay in their own workflows.
- Each state answers a different operational question.
- Cancellation preserves the record and historical balance.
- Payment, appointment completion and package state are separate.
7. Review the package when the balance is low
When the notice says one or two sessions remain, open the profile and compare used appointments. Check name, client, dates and responsible user against reception records. The notice is deduplicated and created outside the main transaction as best effort; notification downtime is not an automatic renewal.
Renewal is a human conversation. The clinic may offer another package, change the future offer or accept that the client will not continue. The application does not charge, schedule recurrence or record a sale until the team chooses an item. Do not sell revenue recovery that the code does not measure.
If the count looks wrong, do not compensate in the next sale. Check the audit, appointment and idempotencyKey. A conflict may mean a retry, wrong package or wrong client; each case needs an explicit correction.
- Low balance guides follow-up but does not create a sale.
- Compare profile, appointment and audit.
- Do not compensate a suspect use in another sale.
8. Close the routine without promising billing or refunds
In the weekly close, review active, expired, finished and canceled packages. Check balance and used appointments. The API applies tenant, client linkage and permissions on the server; hiding a button would not be isolation. History remains available so the owner can explain the operation without rewriting it.
The sale uses a snapshot, use uses a transaction and idempotency, expiry uses the clinic time zone and cancellation is audited. These solve traceability, not the whole financial process. Recurring billing, reconciliation, refunds, invoices and commissions belong where those contracts actually exist.
The useful result is a sentence reception can repeat: which package was sold, how many sessions remain, which appointment used the last one and which state needs a decision. Bia organizes that snapshot and prevents silent retries; it does not invent payment, renewal or clinical outcome.
- Read package records alongside real financial records.
- Tenant isolation and permissions are checked on the server.
- Recurring billing, refunds and invoices remain outside this routine.
What package control does — and what stays separate
Bia records offers, sales, balance, expiry, idempotent use and states. This page does not promise billing, recurring charges, refunds, reconciliation or automatic renewal.
- The catalog supports package or monthly-plan types, but monthly plan does not create recurring billing.
- The sale stores name, total and price, but does not confirm receipt or payment method.
- Use requires an appointment for the same client and does not complete the appointment by itself.
- Expiry, balance and states block invalid use; without a date there is no automatic expiry.
- Cancellation preserves history but does not refund money or reopen sessions.
Frequently asked questions
Questions about packages and sessions
Does editing the catalog change a sold package?
No. The sale stores the name, total and price from that moment. Edits apply to future sales.
Can a retry deduct two sessions?
Not for the same operation. The appointment and idempotency key find the stored use; conflicts are rejected.
What happens after the final session?
The used count reaches the total and the package becomes finished. Another use is blocked.
Does a monthly plan charge automatically?
No. Monthly plan is a catalog type. Recurring billing, payment and reconciliation remain outside this flow.
Does cancellation delete the package?
No. It remains canceled with balance, dates and audit. Cancellation is not a refund.
Test the complete path before the first sale
Create a test service and package, record a fictional client and check sale, appointment and balance before using the live routine.
Create my account