Actions5
- Pagamento Actions
Overview
This node integrates with the Mercado Pago payment platform to search for payments based on various criteria. It is useful for retrieving lists of payments filtered and sorted by date, status, or customer reference, enabling users to monitor transactions, generate reports, or trigger workflows based on payment data.
Typical use cases include:
- Fetching all payments made by a specific customer identified by their WhatsApp number.
- Filtering payments within a certain date range and sorting them by creation or approval date.
- Limiting the number of results returned for pagination or performance reasons.
- Filtering payments by their current status (e.g., approved, pending, refunded).
For example, a business could use this node to retrieve all approved payments from the last month for a particular client to reconcile accounts or trigger shipment processes.
Properties
| Name | Meaning |
|---|---|
| Ordenação | Parameter to sort the list of payments. Options: Data de Criação (date_created), Data de Aprovação (date_approved), Última Atualização (date_last_updated), ID, Data de Liberação (money_release_date) |
| Critério | Sort order direction. Options: Ascendente (asc), Descendente (desc) |
| WhatsApp do Cliente | Customer's WhatsApp number used to search for payments (e.g., 11999999999) |
| Intervalo | Date type to filter payments by. Options: Data de Criação (date_created), Data de Aprovação (date_approved), Data de Liberação (money_release_date) |
| Data de Início | Start date for filtering (format: yyyy-MM-dd'T'HH:mm:ssz) |
| Data de Fim | End date for filtering (format: yyyy-MM-dd'T'HH:mm:ssz) |
| Status | Payment status to filter by. Optional. Options: Pendente (pending), Aprovado (approved), Autorizado (authorized), Em Processamento (in_process), Em Mediação (in_mediation), Rejeitado (rejected), Cancelado (cancelled), Reembolsado (refunded), Estornado (charged_back) |
| Limite | Maximum number of results to return (1-100) |
| Deslocamento | Number of records to skip for pagination |
Output
The node outputs an array of JSON objects representing payments matching the search criteria. Each item contains detailed payment information as returned by the Mercado Pago API, including fields such as payment ID, status, dates, amounts, and possibly embedded PIX QR code data if applicable.
If the payment includes PIX details, additional fields like pix_qr_code, qr_code_base64, and pix_ticket are added to the output JSON for further processing or display.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Mercado Pago with a valid access token.
- The node expects proper configuration of the Mercado Pago API credentials in n8n.
- Uses Mercado Pago's REST API endpoints to perform payment searches.
- Network connectivity to
https://api.mercadopago.comis required.
Troubleshooting
- Missing or invalid access token: The node throws errors if the access token is missing, empty, or too short. Ensure that the API key credential is correctly set up and contains a valid token.
- Invalid date formats: The start and end dates must follow the ISO 8601 format (
yyyy-MM-dd'T'HH:mm:ssz). Incorrect formats will cause errors. - Empty or missing required parameters: Parameters like sort field, sort criteria, WhatsApp number, date range, and limit are mandatory. Omitting these will result in operation errors.
- Limit and offset validation: The limit must be between 1 and 100; offset must be zero or positive. Values outside these ranges cause errors.
- API URL errors: If the constructed API URL is invalid or contains reserved characters, the node will throw an error indicating the problem.
- API response errors: Errors returned by the Mercado Pago API (e.g., invalid credentials, unauthorized access) are caught and reported with descriptive messages.
- Network issues: Connectivity problems to the Mercado Pago API endpoint will cause request failures.
To resolve these issues:
- Verify API credentials and tokens.
- Check parameter values and formats carefully.
- Ensure network access to Mercado Pago API.
- Review error messages for hints on misconfiguration.
