The Billing tab is FocusFlow’s financial management layer for personal trainers. It gives coaches a single dashboard to define their service tiers, see at a glance which athletes are current on their subscriptions and which are approaching renewal, and keep an accurate record of who has paid and when. Coaches can configure as many subscription plans as their business requires, assign each athlete to the appropriate tier, and override renewal dates manually — all without leaving the app.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/piratta/gymApp/llms.txt
Use this file to discover all available pages before exploring further.
Coach Platform Profile
Each coach account has aCoachProfile that captures the coach’s own subscription plan within the FocusFlow platform, along with the financial parameters that determine their payout:
| Field | Description |
|---|---|
planName | The coach’s FocusFlow subscription tier — "Bronce", "Plata", "Oro", or "Elite". |
monthlyCost | Monthly cost the coach pays to the platform (in €). |
maxAthletes | Maximum number of athletes permitted under this plan. |
payoutRate | Percentage of athlete fees the coach retains. |
platformCommission | Platform commission percentage deducted from athlete payments. |
nextBillingDate | ISO date string for the coach’s own next platform billing cycle. |
Athlete Subscription Fields
The billing-relevant fields on each athlete’sClientProfile are:
planType
planType
The subscription tier this athlete is currently enrolled in — for example,
"Mensual" (1 month, €39), "Trimestral" (3 months, €99), "Semestral" (6 months, €179), or "Anual" (12 months, €299). Coaches can define custom plan names, prices, and durations from the Planes de Suscripción section at the top of the Billing tab.lastPaymentDate
lastPaymentDate
An ISO string recording the date of the athlete’s last confirmed payment. Used as the baseline date from which
nextExpirationDate is calculated when a payment is recorded.nextExpirationDate
nextExpirationDate
The next renewal date in
YYYY-MM-DD format. This field can be automatically computed from lastPaymentDate + planType.months, or overridden manually via the inline date picker in the billing table. It drives the payment status colour coding in the UI.renewalMode
renewalMode
Controls how the subscription is renewed:
"auto"— The subscription is expected to renew automatically. Displayed as 🔄 Automática in the billing table."manual"— The coach must confirm each renewal cycle. Displayed as 👤 Manual. Useful for athletes on one-off or irregular plans.
Subscription Plans
Coaches define their own service tiers in the Planes de Suscripción bento grid. The default plans shipped with FocusFlow are:| Plan | Duration | Price |
|---|---|---|
| Mensual | 1 month | €39 |
| Trimestral | 3 months | €99 |
| Semestral | 6 months | €179 |
| Anual | 12 months | €299 |
localStorage under the key fit_subscription_plans and can be created, edited, or deleted at any time via the Nuevo Plan button. Each plan carries a name, price, months, and a short description shown to athletes.
Payment Status
The billing table uses three visual states to indicate where each athlete stands:Pagado (Paid)
Displayed in green (
emerald). The athlete’s nextExpirationDate is in the future. Their access is active and the account shows Active 🟢.Pendiente (Pending)
Displayed in amber. The
nextExpirationDate is approaching within the current week. A visual warning prompts the coach to follow up or confirm payment.Vencido (Overdue)
Displayed in red. The
nextExpirationDate is in the past — the subscription has lapsed. The coach can manually pause the athlete’s access while awaiting payment.nextExpirationDate (or the computed date from lastPaymentDate + plan months) against today’s date.
Recording a Payment
Locate the athlete in the billing table
Open the Facturación tab. The Administración de Cuentas de Atletas table lists every athlete with their current plan, renewal mode, estimated monthly cost, and next expiration date.
Confirm the plan assignment
If the athlete has changed tier, update the Plan Facturación Asignado dropdown. The estimated cost column recalculates immediately based on the selected plan’s price.
Update the expiration date
Click the inline date picker in the Próximo Vencimiento column and set the new renewal date. This directly updates
nextExpirationDate on the ClientProfile. The lastPaymentDate field is updated in the athlete profile (accessible from the client edit view) to today’s ISO timestamp.Confirm renewal mode
Set Modo Renovación to
Automática if the athlete has an ongoing subscription, or Manual if each cycle requires individual confirmation.Access Control — Pause & Resume
If an athlete’s payment lapses and you need to restrict access while awaiting resolution, the billing table includes a Pausar / Activar toggle per athlete. Pausing setsisPaused: true on the User record, immediately preventing the athlete from logging in. Reactivating restores access in one click.
Income Summary
The Resumen General dashboard KPI panel surfaces an estimated monthly income figure derived from the sum of all active athletes’ plan prices:FocusFlow’s billing module is a tracking and recording tool — it does not process actual payments or integrate with payment gateways such as Stripe, PayPal, or Square. All payments are confirmed and recorded manually by the coach. For actual payment collection, coaches should use their preferred external payment method and then update FocusFlow to reflect the confirmed payment date.