Prerequisites
Before you begin, ensure you have:- PHP
^8.2 - Laravel
^12.0 - A MercadoPago account with API credentials
Installation
Install the package
Add the package to your Laravel project using Composer:The package uses Laravel’s auto-discovery, so the service provider will be registered automatically.
Verify package registration
Confirm the package is installed and routes are registered:You should see routes like
mercadopago.preferences.store and mercadopago.webhooks.store.Publish configuration (optional)
If you want to customize the configuration file:This creates
config/mercadopago.php in your project.Using services in your own controllers
While demo routes are helpful for testing, in production you should inject services into your own controllers:Next steps
Creating Preferences
Learn about all preference options and customization
Processing Payments
Process direct payments with tokenized cards
Handling Webhooks
Receive and validate payment notifications
Testing
Set up local testing with test users