Overview
While Pagosapp comes with a predefined set of common payments, you can add your own custom payments to track any financial obligation. Custom payments support both monthly recurring payments and specific month-based payments.Payment Structure
Each payment in Pagosapp follows this structure defined insrc/constants/payments.constants.js:
Types of Payments
- Monthly Payments
- Specific Month Payments
Monthly payments occur every month throughout the year.
Example Structure
Default Monthly Payments
The application includes these monthly payments by default:- Universidad
- UTE Salto
- UTE Mdeo
- OSE
- Cardio
- Gastos comunes Salto
- Gastos comunes Mdeo
- OCA
- Cable
- Netflix
- Centro MΓ©dico
- Veterinaria
- TelΓ©fono
- Caja Profesional
- Sereno
Adding Custom Payments
Payments are managed through theItemsContext provider in src/states/ItemsContext.jsx:19-30:
Adding a Monthly Payment
To add a payment that occurs every month:When a payment includes βmensualβ in the
meses array, itβs automatically converted to mensual: true with an empty meses array.Adding a Specific Month Payment
To add a payment for specific months:Valid Month Names
Payments must use the Spanish month names as defined insrc/App.jsx:12-25:
Removing Payments
To remove a payment from the system:Removing a payment will delete it from all months. Any associated data like due dates and payment status will be retained in localStorage until explicitly cleared.
Payment Display Logic
Payments are filtered and displayed per month using this logic insrc/components/Mes.jsx:10-14:
- Itβs marked as
mensual: true, OR - The month name is included in the
mesesarray
Data Persistence
Custom payments are stored in localStorage:Storage Behavior
- Initial Load: Uses predefined constants from
payments.constants.js - After Modifications: All changes are saved to localStorage
- Persistence: Custom payments persist across browser sessions
- Reset: Using the Reset button clears all custom payments and reverts to defaults
Example Use Cases
Personal Subscriptions
Personal Subscriptions
Add monthly subscriptions like:
Seasonal Payments
Seasonal Payments
Track seasonal obligations:
Quarterly Obligations
Quarterly Obligations
Manage quarterly payments:
Annual Events
Annual Events
Remember annual payments:
Best Practices
Descriptive Names
Use clear, descriptive names that immediately identify the payment. Avoid abbreviations that might be unclear later.
Consistent Naming
Maintain a consistent naming convention across all your custom payments for easier management.
Review Regularly
Periodically review your payment list to remove outdated payments and add new obligations.
Backup Before Reset
Before using the Reset button, note down your custom payments as they will be permanently deleted.
Accessing the Context
TheItemsContext provides these functions to any component:
- items: Array of all payments (default + custom)
- addItem(payment): Add a new payment
- removeItem(payment): Remove an existing payment
Integration with Other Features
Once a custom payment is added:- Due Dates: Set due dates just like default payments
- Status Tracking: Visual indicators work automatically
- Month Display: Appears in appropriate months based on configuration
- Payment Marking: Can be marked as paid/unpaid
- Details Modal: Accessible through click interaction
Custom payments have access to all the same features as default payments, including due date management, status tracking, and payment date recording.
Related Features
Payment Tracking
Learn how to track your custom payments
Due Dates
Set due dates for custom payments