Laravel MercadoPago
A Laravel package for integrating Mercado Pago payment gateway with reusable services and demo endpoints.Overview
Laravel MercadoPago provides a clean, decoupled integration with the Mercado Pago payment platform. Built for Laravel 12, this package leverages auto-discovery and dependency injection to make payment processing straightforward and maintainable.Quick Start
Get up and running with your first payment in minutes
Installation
Install and configure the package in your Laravel project
API Reference
Explore all available services and methods
Configuration
Configure credentials and environment settings
Key Features
Auto-Discovery
Automatic Laravel service provider registration
Reusable Services
Dedicated services for preferences, payments, refunds, customers, and cards
Webhook Validation
HMAC signature validation for secure webhook handling
Demo Endpoints
JSON endpoints for development and testing
Environment Config
Flexible configuration via environment variables
Test Users
Test user creation for QA automation
What’s Included
This package provides:- PreferenceService - Create payment preferences for checkout flows
- PaymentService - Process and retrieve payment information
- CustomerService - Manage customer records
- CardService - Handle customer payment cards
- RefundService - Process full and partial refunds
- PaymentMethodService - List available payment methods
- WebhookService - Handle and validate Mercado Pago webhooks
- TestUserService - Create test users for development
Requirements
- PHP
^8.2 - Laravel
^12.0 - Mercado Pago SDK
^3.8
Quick Example
Getting Started
Next Steps
Create Preferences
Learn how to create payment preferences
Process Payments
Handle direct payment processing
Handle Webhooks
Implement webhook notifications
Production Deployment
Deploy securely to production