MercadoPago API

Finance / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

MercadoPago is a leading payment platform in Latin America, and its API lets you integrate payment processing, refunds, and subscription billing into your app. You can accept credit cards, bank transfers, and local payment methods across Argentina, Brazil, Mexico, and more. It is widely used by e-commerce developers who need to handle payments for Spanish and Portuguese-speaking markets.

💡

Beginner Tip

Use the sandbox credentials provided in your MercadoPago developer account to test payments without real money; switch to production credentials only when you are ready to go live.

Available Data

MercadoPago data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from MercadoPago",
    "description": "Mercado Pago API reference - all the information you need to develop your integrations",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

id Unique identifier for the created payment transaction.
status Current payment status: approved, pending, rejected, or in_process.
status_detail More specific reason for the current status, useful for debugging rejected payments.
transaction_amount The amount that was charged in the currency of the transaction.
currency_id ISO 4217 currency code for the transaction (e.g., BRL, ARS, MXN).

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.mercadopago.com.br/developers/es/reference";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Access token is missing, expired, or from the wrong environment
Include your access token as a Bearer token in the Authorization header and confirm you are using the right environment credentials.
400 Bad Request with invalid_param Required payment fields are missing or have incorrect values
Review the MercadoPago API reference for the required fields and ensure amounts are provided as numbers in the correct currency.
503 Service Unavailable Temporary service disruption on MercadoPago servers
Implement retry logic with exponential backoff; check the MercadoPago status page for ongoing incidents.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →