Actions37
- Contact Actions
- Invoice Actions
- Item Actions
- Payment Actions
- Estimate Actions
- Tax Actions
- Bank Account Actions
Overview
This node integrates with the Alegra API to manage payments. Specifically, the "Get" operation under the "Payment" resource retrieves detailed information about a specific payment by its ID. This is useful in scenarios where you want to fetch payment details for record-keeping, auditing, or further processing within an automation workflow.
Practical examples include:
- Automatically retrieving payment details after a transaction is recorded elsewhere.
- Fetching payment data to update internal accounting systems.
- Using payment information to trigger notifications or follow-up actions.
Properties
| Name | Meaning |
|---|---|
| Payment ID | The unique identifier of the payment to retrieve. This is required to specify which payment's details to fetch. |
Output
The output is a JSON object representing the payment details as returned by the Alegra API. It typically includes fields such as payment date, bank account, payment method, type, associated invoices, currency, client/contact info, observations, annotations, exchange rate, categories, and retentions if applicable.
No binary data output is produced by this operation.
Example structure (simplified):
{
"id": "string",
"date": "YYYY-MM-DD",
"bankAccount": "string or object",
"paymentMethod": "string",
"type": "string",
"invoices": [ /* array of invoice references */ ],
"currency": { "code": "string" },
"client": "string or object",
"observations": "string",
"anotation": "string",
"exchangeRate": "number",
"categories": [ /* array of category objects */ ],
"retentions": [ /* array of retention objects */ ]
}
Dependencies
- Requires an API key credential for authenticating with the Alegra API.
- The node uses HTTP requests to the Alegra API endpoints.
- Proper configuration of the API environment URL and credentials in n8n is necessary.
Troubleshooting
Common issues:
- Invalid or missing Payment ID will cause the API call to fail.
- Incorrect or expired API credentials will result in authentication errors.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors from the API are wrapped and surfaced as node operation errors with descriptive messages.
- If the payment ID does not exist, the API likely returns a "not found" error.
Resolutions:
- Ensure the Payment ID is correct and exists in Alegra.
- Verify that the API key credential is valid and has proper permissions.
- Check network connectivity and API endpoint accessibility.
Links and References
- Alegra API Documentation (Unofficial): https://developer.alegra.com/
- n8n HTTP Request Node Documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/