Payment Configuration Overview
Payment settings are part of your professional settings and control:- Whether deposits are required for bookings
- The deposit amount patients must pay
- Payment confirmation workflow
Payment Fields in Professional Settings
The payment configuration is stored in yourProfessionalSettings:
/workspace/source/schemas/professional_settings.ts:16-17
Configuring Deposit Requirements
Enabling Deposits
Control whether patients must pay a deposit when booking:- Deposits Required
- No Deposits
Set
requires_deposit: true to mandate upfront paymentWhen enabled:- Patients must pay before confirming a reservation
- You must specify a
deposit_amount - Bookings are marked as pending until payment is confirmed
/workspace/source/server/src/modules/professional-settings/dto/update-professional-setting.dto.ts:41-47
Setting Deposit Amount
When deposits are enabled, specify the amount:Settings Interface Implementation
The deposit configuration is managed in the settings UI:/workspace/source/app/core/admin/components/professional-settings/ProfessionalSettings.tsx:68-75
Validation Logic
The form validates deposit settings before allowing save:/workspace/source/app/core/admin/components/professional-settings/ProfessionalSettings.tsx:101-106
The save button is automatically disabled if you have
requires_deposit: true but deposit_amount is not set or is less than 1.Payment Integration
Mercado Pago Connection
Zenda uses Mercado Pago as the payment processor. When a patient books a session that requires a deposit:- The reservation is created with status
PENDING - Patient is redirected to Mercado Pago for payment
- After successful payment, reservation status updates to
CONFIRMED - You receive notification of the confirmed booking
Reservation with Payment
When creating a reservation with payment, the system uses:/workspace/source/server/src/modules/reservations/dto/create-reservation.dto.ts:5-13
The
deposit_amount from your professional settings is automatically included in the reservation creation payload when deposits are required.Payment Workflow
For Reservations with Deposits
For Reservations without Deposits
Ifrequires_deposit is false:
- Patient selects time slot
- Reservation is immediately confirmed
- No payment processing occurs
- Appointment appears in your calendar
Managing Payment Status
View payment status for reservations:- Payment confirmed - Deposit was successfully received
- Payment pending - Awaiting payment completion
- No payment required - Deposit not configured
- Dashboard appointment cards
- Reservation history table
- Individual reservation details
Payment Status in Reservations
The reservation history displays payment status:/workspace/source/app/core/admin/components/reservations/HistoryReservations.tsx:68
Duration and Deposit Section
The settings UI combines session duration and payment configuration in one section:/workspace/source/app/core/admin/components/professional-settings/ProfessionalSettings.tsx:118-125
This section allows you to configure:
- Session duration (15-180 minutes)
- Deposit requirement toggle
- Deposit amount input
Payment Alerts
The dashboard includes a payment alerts section:/workspace/source/app/core/admin/components/home/DashboardAdmin.tsx:106-109
This section notifies you of:
- Pending payments awaiting confirmation
- Failed payment attempts
- Payment-related issues requiring attention
Best Practices
Set Appropriate Deposits
Choose deposit amounts that balance commitment and accessibility
Clear Communication
Ensure patients understand deposit requirements before booking
Monitor Pending Payments
Regularly check dashboard alerts for payment issues
Update Settings as Needed
Adjust deposit requirements based on your practice needs
Common Scenarios
Scenario 1: Requiring Deposits
Scenario 2: No Deposits
Scenario 3: Partial Deposits
The deposit amount should be in the smallest currency unit (e.g., cents for USD, centavos for ARS).
Validation Errors
Common validation errors:| Error | Cause | Solution |
|---|---|---|
| Deposit invalid | requires_deposit: true but deposit_amount < 1 | Set deposit amount to at least 1 |
| Settings not saved | Validation failed | Check all required fields are valid |
| Amount too low | deposit_amount: 0 with deposits enabled | Increase deposit to minimum of 1 |
State Management
Payment settings are managed through theProfessionalSettingsStore:
/workspace/source/store/ProfessionalSettingsStore.ts:31-40
Changes to payment settings are:
- Validated client-side
- Sent to server via PATCH request
- Persisted to database
- Updated in local state and localStorage
Next Steps
Schedule Management
Configure your working hours and availability
View Reservations
See payment status for all appointments