Overview
This node integrates with the Cielo Payments API, a popular payment processing service in Brazil. It supports creating, capturing, canceling, and consulting credit card payments. The node is useful for automating payment workflows such as charging customers, confirming payment captures, voiding transactions, or checking payment statuses within an n8n workflow.
Practical examples:
- Create Payment: Automatically charge a customer's credit card when they place an order.
- Capture Payment: Confirm and capture a previously authorized payment for fulfillment.
- Cancel Payment: Void a payment if an order is canceled or refunded.
- Consult Payment: Retrieve the status and details of a specific payment transaction.
Properties
| Name | Meaning |
|---|---|
| Payment ID | The unique identifier of the payment to capture, cancel, or consult. |
| Valor (em centavos) | The amount in cents to capture or cancel for the specified payment. |
Note: These properties are shown only for the operations "capture", "cancel", and "consult". For "cancel" and "capture", both Payment ID and Valor (em centavos) can be provided; for "consult", only Payment ID is required.
Output
The node outputs JSON data representing the response from the Cielo Payments API for the selected operation:
- For create, it returns the created payment details including authorization and transaction info.
- For capture and cancel, it returns the updated payment status after the operation.
- For consult, it returns the current payment information and status.
The output JSON structure directly reflects the Cielo API response, which typically includes fields like payment status, amounts, transaction IDs, and customer/payment details.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Cielo Payments API.
- The node uses the Cielo sandbox URL by default but can be configured via credentials.
- HTTP requests are made to the Cielo API endpoints for each operation.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication errors.
- Providing incorrect or non-existent Payment IDs will result in not found or invalid request errors.
- Amount values must be correctly specified in cents; otherwise, the API may reject the request.
Error messages:
- Errors thrown include a prefix "Erro na operação Cielo:" followed by the original error message.
- If the API returns an error object, it is stringified and included in the error message.
Resolution tips:
- Verify that the API credentials are correctly set up in n8n.
- Double-check the Payment ID and amount values before running the node.
- Consult Cielo API documentation for specific error codes and meanings.