Credits
Credits are the platform’s internal currency: every session has a credit cost, and booking it means spending that amount. Customers therefore do not buy a session, they buy credits and later spend them freely in the planning calendar.
Setting a product’s credits
Credits are not created directly: they are carried by products. Two fields, in the sidebar of the product form, define everything:
- Credits — how many credits the purchase grants (decimals accepted). A product without credits is an ordinary product and has no effect on balances.
- Associated coach — optional. When set, the credits can only be used for that coach’s sessions. Left empty, they are universal and usable with any coach.
A 10-session pass is therefore a product worth 10 credits; a product bought in multiples grants that many times the ordered quantity. A product with a recurring billing interval becomes a subscription: its credits are granted again at every paid renewal.
How a balance grows
A balance is never typed in by hand: it only moves through these events.
- A purchase — as soon as the order turns "completed", the credits of every purchased product are added.
- A subscription — at every successful payment, the subscribed product’s credits are granted again. A failed payment grants nothing.
- The free credits on signup — the number set in the Booking tab of the settings is granted automatically when each account is created (0 = disabled).
- A cancellation — the credits of a booking cancelled, by the customer or from the planning calendar, are refunded to the balance they were taken from.
How a balance is spent
When a booking is made, the session’s cost is deducted. A customer may hold several balances at once — one per coach, plus the universal one — and the platform picks for them:
- the balance tied to the session’s coach is used first, if it covers the cost;
- otherwise the universal balance takes over;
- a session with no coach is always paid from the universal balance.
A balance may go negative, within the number of negative credits allowed (Booking tab of the settings). Beyond that, the customer’s booking is refused. A booking made from the planning calendar is never blocked by the balance: a warning is shown, and the shortfall is accepted.
An email warns the customer when their balance reaches the low-credit threshold. The threshold is set in the same settings: 0 alerts at a zero balance, -1 disables the email. The alert is only sent once per drop below the threshold.
Consulting the balances
On the admin side, the credit balances list one row per customer and coach, with the current balance, total earned and total used. Those rows are read-only, since a balance only changes through the events above. A customer’s record also shows their remaining credits.
Every movement is archived in a transaction history: purchase, subscription, booking, refund, free credits or adjustment, with the balance before and after. That is the record to check when a customer disputes their balance.
On the customer side, the balance appears in the site header, and the account’s "My credits" page details one card per balance (universal or per coach) plus the full history of movements.