Actions22
Overview
This node integrates with the Distru API to manage various business operations related to inventory, orders, purchases, invoices, and payments. Specifically, the "Post Purchase Payment" operation allows users to create a payment record for a specific purchase in Distru.
Use cases include:
- Recording payments made against purchase orders to keep financial records up to date.
- Automating payment entries in Distru when payments are processed externally.
- Synchronizing payment data between Distru and other systems via n8n workflows.
For example, after receiving an invoice from a supplier, you can use this node to post the payment details directly to Distru, including payment method, amount, date, and description.
Properties
| Name | Meaning |
|---|---|
| Purchase ID | The unique identifier of the purchase to which the payment will be applied. |
| Payment Method ID | The identifier of the payment method used for the payment. |
| Amount | The payment amount. It will be rounded to 2 decimal places. |
| Payment Datetime | The date and time when the payment was made, in ISO 8601 format (e.g., 2020-01-01T00:00:00.000000Z). |
| Description | A textual description of the payment. |
| QuickBooks Deposit Account ID | Optional QuickBooks deposit account ID to associate with the payment. Cannot be used together with the name. |
| QuickBooks Deposit Account Name | Optional QuickBooks deposit account name to associate with the payment. Cannot be used together with the ID. |
Output
The node outputs JSON data representing the created payment object as returned by the Distru API. This includes all relevant details of the posted payment such as IDs, amounts, timestamps, and descriptions.
No binary data is output by this operation.
Dependencies
- Requires an API token credential for authenticating with the Distru API.
- The node uses the Distru public API endpoint, either production or staging based on configuration.
- No additional external dependencies are required beyond the API token.
Troubleshooting
- Missing API Token: If the API token is not set or invalid, the node will throw an error indicating that the Distru API token is not set.
- Invalid Purchase ID or Payment Method ID: Providing incorrect or non-existent IDs may cause the API request to fail. Verify these IDs exist in your Distru account.
- Conflicting QuickBooks Deposit Account Fields: Both QuickBooks deposit account ID and name cannot be provided simultaneously; doing so may result in an error.
- API Request Failures: Network issues or API downtime can cause failures. Check connectivity and Distru service status.
- Continue On Fail Behavior: If enabled, errors during execution will be captured in the output JSON under an
errorfield instead of stopping the workflow.
Links and References
- Distru API Documentation (general reference for API endpoints and data models)
- ISO 8601 Date Format (for formatting the payment datetime property)