Payment Integration
upLegal integrates with MercadoPago, Chile’s leading payment processor, supporting:- Credit and debit cards (Visa, Mastercard, American Express)
- Chilean local payment methods
- Secure 3D authentication
- Real-time payment status updates
Payment Flow
Booking Creation
When a client books a consultation, the backend:
- Creates an
appointmentsrecord with statuspending_payment - Generates a MercadoPago preference
- Returns a
payment_linkto redirect the client
MercadoPago Redirect
Client is redirected to MercadoPago’s secure checkout:On MercadoPago, clients can:
- Enter card details
- Select payment method
- Apply discount codes (if available)
- Review total amount
Payment Processing
MercadoPago processes the payment and determines the outcome:
- Approved: Payment successful
- Pending: Awaiting confirmation (e.g., bank transfer)
- Rejected: Payment failed
Return to upLegal
MercadoPago redirects back to upLegal with payment status:
?status=approved→ Success page?status=pending→ Pending page?status=rejectedor?status=failure→ Failure page
Payment States
The platform displays different UI based on payment status:Success State
PaymentSuccess Component
Displays when payment is approved:
- Green checkmark icon
- “¡Pago Completado!” title
- Total amount paid
- Transaction ID
- Payment date and time
- Payment method (Tarjeta de crédito/débito)
- “Volver al inicio” button
- “Ver recibo” button (if receipt_url available)
An email confirmation is automatically sent with payment details and appointment information.
Pending State
PaymentPending Component
- Amber clock icon
- “Pago en Proceso” title
- Amount being processed
- Transaction ID
- Date initiated
- Status: “En proceso”
- “Verificar estado” button
- “Volver al inicio” button
- Warning box explaining the delay
Pending payments typically occur with bank transfers or when additional verification is needed. Most card payments are instantly approved or rejected.
Failure State
PaymentFailure Component
| MercadoPago Status | User-Friendly Message |
|---|---|
cc_rejected_bad_filled_security_code | El código de seguridad de la tarjeta es incorrecto |
cc_rejected_insufficient_amount | Fondos insuficientes en la tarjeta |
cc_rejected_bad_filled_date | La fecha de vencimiento es incorrecta |
cc_rejected_other_reason | La tarjeta fue rechazada. Por favor, intenta con otro medio de pago |
| Default | El pago no pudo ser procesado. Por favor, inténtalo nuevamente |
- Red X icon
- “Pago Rechazado” title
- Amount that failed
- Specific error message
- Transaction ID (if available)
- “Reintentar pago” button
- “Volver al inicio” button
- Support contact suggestion
Payment Logging
All payment events are logged for analytics and debugging:started: When payment link is generatedcompleted: When payment succeedsfailed: When payment is rejectedpending: When payment needs confirmation
Price Calculation
Payments include two components:| Component | Calculation | Amount |
|---|---|---|
| Lawyer fee | $60,000 × 1.5 | $90,000 |
| Service fee | $90,000 × 0.10 | $9,000 |
| Total | $99,000 |
Webhook Handling
The backend receives MercadoPago webhooks for status updates: Webhook Eventspayment.created: New payment initiatedpayment.updated: Payment status changedpayment.approved: Payment successfulpayment.rejected: Payment failed
- Verify webhook signature
- Fetch payment details from MercadoPago
- Update appointment status in database
- Send email notifications
- Create calendar events
- Update lawyer’s availability
- Approved
- Pending
- Rejected
- Appointment status →
confirmed - Email sent to client with meeting link
- Email sent to lawyer with client details
- Calendar invite created for both parties
- Analytics event fired
Refund Policy
upLegal offers refunds in specific cases:Automatic Refunds
Lawyer No-Show- If lawyer doesn’t join within 15 minutes of start time
- Full refund processed automatically
- Email notification sent to client
- If lawyer cancels more than 24 hours before
- Full refund processed
- Client can rebook with another lawyer
- Full refund
- Priority booking offered
- Lawyer may face penalties
Client-Requested Refunds
More than 24 hours before- Full refund minus processing fee (2%)
- Cancellation confirmed via email
- 50% refund
- Lawyer compensated for reserved time
- No refund
- Exception: Technical issues on platform’s side
Refunds are processed back to the original payment method within 5-10 business days.
Security Measures
PCI Compliance
upLegal never stores card details. All payment data is handled by MercadoPago’s PCI-compliant infrastructure.
3D Secure
Card payments require 3D Secure authentication for added security.
SSL Encryption
All payment communication is encrypted with TLS 1.3.
Fraud Detection
MercadoPago’s machine learning detects suspicious transactions.
Testing Payments
MercadoPago provides test cards for development: Approved Payment- Card: 5031 7557 3453 0604
- CVV: 123
- Expiry: Any future date
- Card: 5031 4332 1540 6351
- CVV: 123
- Expiry: Any future date
- Card: 5031 7557 3453 0604
- CVV: 123
- Amount ending in .01 (e.g., $10,000.01)
Currency
All transactions on upLegal are in Chilean Pesos (CLP):- No decimal places (CLP is not subdivided)
- Formatted with dot separators: $50.000
- Currency code: CLP
- Symbol: $
Payment Receipt
Clients receive a payment receipt via:- Email: PDF attachment with full details
- In-app: Link to view/download receipt
- MercadoPago: Available in client’s MercadoPago account
- upLegal logo and details
- Transaction ID
- Payment date and time
- Lawyer name and details
- Consultation date and duration
- Price breakdown (lawyer fee + service fee)
- Total paid
- Payment method
- Legal footer
Next Steps
After Payment
Receive confirmation email with meeting link and calendar invite
Leave a Review
After the consultation, share your experience