Overview
The Payment Service (jea-pagos) manages payment methods available throughout Sistema de Ventas. It provides a centralized payment method registry used by sales, purchase, and order services.
Key Features
Multiple Payment Methods
Support for diverse payment options including cash, cards, transfers, and mobile payments
Centralized Management
Single source of truth for payment methods across all services
Service Integration
Integrated with sales, purchases, and orders via Feign clients
Simple Configuration
Easy payment method setup and management
Payment Method Entity
The payment method entity is simple and focused:Supported Payment Methods
Sistema de Ventas supports a wide range of payment options common in Peru:Cash
EfectivoTraditional cash payments
Credit Card
Tarjeta de créditoCredit card transactions
Debit Card
Tarjeta de débitoDebit card payments
Bank Transfer
Transferencia bancariaDirect bank transfers
Check
ChequeCheck payments
Mobile Payment
Yape, Plin, BIMPopular Peruvian mobile payment apps
Available Endpoints
The Payment Service provides simple CRUD operations:| Method | Endpoint | Description |
|---|---|---|
| GET | /formapago | List all payment methods |
| GET | /formapago/{id} | Get payment method by ID |
| POST | /formapago | Create new payment method |
| PUT | /formapago/{id} | Update payment method |
| DELETE | /formapago/{id} | Delete payment method |
Payment Method Management
Creating Payment Methods
Create new payment methods with a simple request:Standard Payment Methods
For a typical Peruvian business, create these payment methods:Custom Payment Methods
Add custom payment methods for specific business needs:- Store credit or gift cards
- Corporate accounts
- Payment plans or installments
- Third-party payment processors
Service Integration
Payment methods are integrated across multiple services:Sales Service Integration
- Record payment method for each transaction
- Generate payment-specific invoices
- Track payment method usage
- Support payment reconciliation
Purchase Service Integration
Purchase orders reference payment methods to:- Track supplier payment methods
- Plan cash flow
- Generate payment reports
- Manage accounts payable
Order Service Integration
Customer orders link to payment methods for:- Payment method selection at checkout
- Payment processing integration
- Order fulfillment workflows
- Customer payment preferences
Payment Method Usage Analytics
Track payment method usage across the system:Sales by Payment Method
Analyze which payment methods are most popular:- Transaction count per payment method
- Revenue by payment method
- Average transaction value
- Trends over time
Payment Method Performance
Evaluate payment method effectiveness:- Processing time
- Success rates
- Customer preferences
- Regional variations
Mobile Payment Integration
Peru has seen rapid adoption of mobile payment platforms:Yape
- BCP (Banco de Crédito del Perú) mobile payment
- QR code-based transactions
- Instant transfers
- Popular for retail transactions
Plin
- Multi-bank mobile payment platform
- Person-to-person and business payments
- QR code support
- Growing merchant adoption
BIM
- BBVA Continental mobile payment
- Card-free transactions
- Integration with bank accounts
- Business payment support
Mobile payments require additional integration with payment provider APIs for real-time processing. The Payment Service stores the method configuration while actual processing may occur in external systems.
Payment Security
Best Practices
PCI Compliance
PCI Compliance
For credit and debit card payments, ensure PCI DSS compliance. Never store full card numbers or CVV codes in the system.
Transaction Records
Transaction Records
Maintain detailed transaction records linking payments to sales, purchases, and orders for audit and reconciliation.
Access Control
Access Control
Restrict payment method management to authorized personnel. Changes should require proper authorization.
Payment Verification
Payment Verification
Implement verification workflows for high-value transactions and non-cash payment methods.
Cash Management
For cash payments (Efectivo):Cash Handling Procedures
- Count cash at transaction time
- Provide receipts immediately
- Maintain cash drawer accountability
- Perform regular cash reconciliation
Cash Flow Tracking
- Monitor daily cash receipts
- Track cash payments to suppliers
- Maintain minimum cash reserves
- Schedule bank deposits
Bank Transfer Processing
For bank transfers (Transferencia bancaria):Transfer Requirements
- Provide bank account details
- Generate payment references
- Verify transfer receipt
- Reconcile bank statements
Transfer Tracking
- Record transfer reference numbers
- Monitor pending transfers
- Confirm payment receipt
- Update transaction status
Payment Reconciliation
Reconcile payments across different methods:Daily Reconciliation
- Compare recorded payments to actual receipts
- Verify payment method totals
- Identify discrepancies
- Resolve payment issues
Monthly Reconciliation
- Bank statement reconciliation
- Credit card processor statements
- Mobile payment platform reports
- Supplier payment verification
Reporting Capabilities
Payment method data enables various reports:- Payment Method Distribution - Breakdown of payments by method
- Cash Flow Analysis - Track cash in and out by payment type
- Payment Trends - Usage patterns over time
- Regional Preferences - Payment method preferences by location
- Customer Segments - Payment preferences by customer type
Future Enhancements
Potential payment service enhancements:Advanced Features
- Payment method fees and surcharges
- Multi-currency support
- Payment installment plans
- Automatic payment routing
- Real-time payment processing integration
Integration Opportunities
- Payment gateway integrations
- Accounting system synchronization
- Digital wallet support
- Cryptocurrency options
- International payment methods
Best Practices
Standard Naming
Standard Naming
Use consistent naming conventions for payment methods across the system. This improves reporting and user experience.
Active Methods Only
Active Methods Only
Only create payment methods that are actually available to customers. Remove or deactivate unused payment methods.
Method Documentation
Method Documentation
Document requirements and procedures for each payment method, especially for staff training.
Regular Review
Regular Review
Periodically review payment method usage and consider adding new methods based on customer demand.
Next Steps
API Reference
Detailed payment API documentation
Sales Management
Process sales with payment methods
Purchase Orders
Manage supplier payments
Analytics & Reporting
Payment method analytics