Package Information
Available Nodes
Documentation
n8n-nodes-mercadopago
The official Mercado Pago community node for n8n
Connect your workflows to Mercado Pago β create payment links, configure automated reports, and download your financial data, all without leaving n8n.
β¨ What can you do with this node?
| Resource | What you get |
|---|---|
| π³ Payments | Create Checkout Preference links with items, back URLs, expiration dates and more |
| π Reporting | Configure, list and download Release & Settlement reports |
πΊοΈ Operations at a glance
π³ Payments
| Operation | Method | Description |
|---|---|---|
| Create Payment Link | POST |
Generate a Checkout Preference link to accept payments |
π Reporting β Release Reports
| Operation | Method | Description |
|---|---|---|
| List Release Reports | GET |
List generated report files (supports pagination & returnAll) |
| Configure Release Report | POST / PUT |
Create or update preferences β columns, frequency, SFTP delivery |
| Get Release Report Config | GET |
Read the current configuration for your account |
| Download Release Report | GET |
Download a specific report file as CSV |
π Reporting β Settlement Reports
| Operation | Method | Description |
|---|---|---|
| List Settlement Reports | GET |
List generated settlement report files |
| Configure Settlement Report | POST / PUT |
Create or update preferences β columns, frequency, SFTP delivery |
| Get Settlement Report Config | GET |
Read the current configuration for your account |
| Download Settlement Report | GET |
Download a specific settlement report file as CSV |
π‘ Smart configure: The Configure operations are upsert β they automatically create the config if it doesn't exist yet, or update it if it does. No need to know what state you're in.
π Quick start
1. Install the node
In your n8n instance go to Settings β Community Nodes β Install and enter:
@mercadopago/n8n-nodes-mercadopago
2. Set up your credential
- In n8n go to Credentials β New β search for MercadoPago API
- Paste your Access Token (found in the Mercado Pago Developer Portal)
- Click Test credential β you'll get a green β if it's valid
Optional β SFTP delivery: If you want reports delivered automatically to an SFTP server, create a MercadoPago SFTP credential with the connection details and attach it to the node.
3. Build your first workflow
Trigger β MercadoPago (Create Payment Link) β Send email with payment URL
Schedule β MercadoPago (List Release Reports) β Filter β Save to Google Sheets
π Operation details
π³ Create Payment Link
Creates a Checkout Preference β a hosted payment page with your items.
Required:
- At least one Item (title, quantity, currency, unit price)
Optional fields:
external_referenceβ your internal order ID (max 64 chars)notification_urlβ HTTPS webhook for payment status updatesback_urlsβ redirect URLs for success / pending / failureauto_returnβ auto-redirect after approved paymentexpiration_date_from/expiration_date_toβ limit when the link is validstatement_descriptorβ text on the buyer's bank statement (max 13 chars)binary_modeβ only approved/rejected (no pending)
π Configure Release Report
Sets up automatic Release Report generation for your account. Works as an upsert β safe to run multiple times.
Required:
- Columns β at least one column key (e.g.
DATE,SOURCE_ID,NET_CREDIT_AMOUNT) - File Name Prefix β prefix for generated file names
- Frequency β hour (0β23), interval value, and type (
daily/weekly/monthly)
Optional:
- SFTP credential for automatic file delivery
separator,display_timezone,report_translation- Email notification list
- Boolean flags:
include_withdrawal_at_end,check_available_balance,compensate_detail,execute_after_withdrawal,scheduled
π Configure Settlement Report
Same as Configure Release Report but for Settlement Reports. Supports a different set of columns and fewer boolean flags.
β¬οΈ Download Report (Release or Settlement)
Downloads a generated report file by name.
- Returns a JSON object with a
contentfield containing the raw CSV string - Pipe this into a Write Binary File node or a Code node to process it
π Credentials
MercadoPago API (required)
| Field | Description |
|---|---|
| Access Token | Your Bearer token from the Mercado Pago Developer Portal |
Get your token at: mercadopago.com.br/developers β Your integrations β Credentials
MercadoPago SFTP (optional)
Only needed if you configure SFTP delivery for reports.
| Field | Description |
|---|---|
| Server | SFTP hostname or IP |
| Username | SFTP login |
| Password | SFTP password (stored encrypted) |
| Remote Dir | Destination directory on the SFTP server |
| Port | Default: 22 |
ποΈ Architecture
The node follows a modular handler pattern where each operation lives in its own file.
credentials/
MercadoPagoApi.credentials.ts β API access token credential
MercadoPagoSftp.credentials.ts β Optional SFTP credential
nodes/MercadoPago/
MercadoPago.node.ts β Node definition, UI properties, request wrapper
MercadoPago.node.json β Metadata (categories, docs links)
icon-mercadopago.svg
icon-mercadopago.dark.svg
operations/
index.ts β Handler registry + shared types (HandlerCtx)
utils.ts β Shared parsing helpers
createPaymentLink.ts
listReleaseReports.ts
configureReleaseReport.ts β Upsert: POST β fallback PUT on 409
getReleaseReportConfig.ts
downloadReleaseReport.ts
listSettlementReports.ts
configureSettlementReport.ts β Upsert: POST β fallback PUT on 409
getSettlementReportConfig.ts
downloadSettlementReport.ts
tests/operations/ β Vitest unit tests (one per operation)
How operations work:
execute() in MercadoPago.node.ts
βββ builds HandlerCtx (credential, request wrapper, helpers)
βββ dispatches to operations[operationName](ctx)
βββ handler validates input β builds body β calls ctx.request()
βββ makeRequest() adds Auth header, handles httpRequest
π οΈ Development
Prerequisites
- Node.js >= 20.15
- npm
Commands
npm install # Install dependencies
npm run build # Compile TypeScript β dist/
npm run test:unit # Run unit tests once
npm run test # Run tests in watch mode
npm run test:coverage # Generate coverage report
npm run lint # ESLint
npm run format # Prettier
Adding a new operation
- Create
nodes/MercadoPago/operations/myOperation.ts - Implement the handler using
HandlerCtx - Register it in
operations/index.ts - Add UI properties to
MercadoPago.node.ts - Write tests in
tests/operations/myOperation.test.ts
π€ Contributing
Contributions are welcome! Read CONTRIBUTING.md to learn about the development process, branching model, and how to submit a pull request.
π License
MIT β maintained by the Tech Stuff IXF team at Mercado Pago.