Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fitodac/laravel-mercadopago/llms.txt
Use this file to discover all available pages before exploring further.
Configuration Issues
Mercado Pago access token is not configured
Mercado Pago access token is not configured
MERCADOPAGO_ACCESS_TOKEN environment variable.Solution:-
Add the access token to your
.envfile: -
Clear the configuration cache:
-
Verify the configuration:
Package is installed but routes don't appear
Package is installed but routes don't appear
- Running
php artisan route:list --name=mercadopagoshows no routes - Requests to
/api/mercadopago/*return 404
-
Regenerate the package discovery cache:
-
Clear the route cache:
-
Verify routes are registered:
Demo Routes Issues
404 error on demo routes
404 error on demo routes
/api/mercadopago/health or /api/mercadopago/preferences return 404.Cause:
Demo routes are protected by the EnsureDemoRoutesEnabled middleware and only work when both conditions are met:MERCADOPAGO_ENABLE_DEMO_ROUTES=true- Application environment is
localortesting
-
Check your
.envfile: -
Clear configuration cache:
-
Verify the environment:
Route prefix conflicts with existing routes
Route prefix conflicts with existing routes
.env:config/mercadopago.php:Webhook Issues
Webhook returns 401 Unauthorized
Webhook returns 401 Unauthorized
Webhook signature header is malformed
Webhook signature header is malformed
x-signature header doesn’t contain the required ts and v1 parameters.Expected format:- Verify you’re receiving webhooks directly from Mercado Pago
- Check if a proxy or load balancer is modifying headers
- Ensure the webhook URL is configured correctly in Mercado Pago dashboard
Webhook not receiving notifications
Webhook not receiving notifications
-
Verify the webhook URL is publicly accessible:
- Must use HTTPS in production
- Must be reachable from Mercado Pago servers
-
For local development, use a tunnel service:
-
Configure the public URL in Mercado Pago:
-
Test the endpoint manually:
notification_url when creating preferences or payments to override the default webhook URL.SDK and API Errors
Mercado Pago PHP SDK is not installed
Mercado Pago PHP SDK is not installed
mercadopago/dx-php. Install it:SDK client class not found
SDK client class not found
-
Verify the SDK version:
-
Ensure you’re using version
^3.8: -
Clear composer cache:
422 Unprocessable Entity from Mercado Pago
422 Unprocessable Entity from Mercado Pago
- Invalid payload structure - Check the required fields in the API Reference
- Invalid email format - Ensure
payer.emailis valid - Invalid amount - Must be positive and properly formatted
- Invalid payment method - Verify the payment method ID is valid for your country
401 Unauthorized from Mercado Pago API
401 Unauthorized from Mercado Pago API
Testing Issues
Test users endpoint not working
Test users endpoint not working
/api/mercadopago/test-users.Solution:-
Ensure demo routes are enabled:
-
Use a valid
site_id:
MLA, MLB, MLC, MLM, MLU, MCO, MPECard token is invalid or expired
Card token is invalid or expired
- Generate the token immediately before creating the payment
- Don’t store tokens for later use
- Handle token expiration errors gracefully:
Need More Help?
If your issue isn’t listed here:- Check the Debugging guide for diagnostic techniques
- Enable detailed logging to capture error details
- Review the GitHub issues for similar problems
- Consult the official Mercado Pago documentation