Actions34
- Customer Actions
- Customer Xdrs Actions
- Customer Extensions Actions
- Account Actions
- Invoice Actions
- DID Numbers Actions
- Billing sessions Actions
- Rate Management Actions
Overview
The PortaOne node for n8n allows you to interact with the PortaOne API, specifically to apply adjustments to invoices. The "Apply Adjustment" operation on the "Invoice" resource lets you modify an invoice by adding or subtracting a specified amount, optionally including comments and refund details. This is useful in scenarios such as issuing credits, correcting billing errors, or processing refunds directly within your automated workflows.
Practical examples:
- Automatically refund a customer a specific amount after a support ticket is resolved.
- Apply a credit adjustment to an invoice if a service outage occurred.
- Add internal notes or visible comments when making manual billing corrections.
Properties
| Name | Meaning |
|---|---|
| Authentication | The authentication method to use. Options: Token Authentication, Basic Authentication. |
| Invoice ID | The unique identifier of the invoice to which the adjustment will be applied. |
| Amount | An amount of adjustment (positive or negative) to apply to the invoice. |
| AdditionalFields | Optional collection of extra fields: - Internal Comment: An internal note not visible to customers. - Refund To Cc: Amount to refund to credit card (for fully paid invoices only). - Visible Comment: A comment visible to the customer. |
| Simplify | Whether to simplify the output data. If enabled, the response will be reduced to essential information. |
| SimplifyPath | Path to the property that should be returned if simplification is enabled. |
Output
- The node outputs a
jsonobject containing the result of the adjustment operation. - If "Simplify" is enabled, the output will be limited to the property specified by "SimplifyPath" (if provided), or otherwise a simplified version of the response.
- If "Simplify" is disabled, the full API response from PortaOne is returned.
- No binary data is produced by this operation.
Dependencies
- External Services: Requires access to the PortaOne API.
- API Credentials: You must provide either a PortaOne Token or Basic Authentication credentials, configured in n8n's credentials section.
- n8n Configuration: Ensure the appropriate credentials are set up and selected via the "Authentication" property.
Troubleshooting
Common Issues:
- Invalid Credentials: If authentication fails, ensure the correct credential type is selected and the credentials are valid.
- Missing Required Fields: If "Invoice ID" or "Amount" is missing, the node will throw an error indicating required parameters are not provided.
- Insufficient Permissions: The user associated with the credentials may lack permission to adjust invoices.
- Incorrect Invoice ID: Providing a non-existent or incorrect Invoice ID will result in an error from the PortaOne API.
Error Messages:
- "Authentication failed" – Check your credentials and authentication method.
- "Required parameter missing: Invoice ID/Amount" – Ensure all mandatory fields are filled.
- "Invoice not found" – Verify the Invoice ID exists in PortaOne.
