Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation is designed to update an existing expense by removing its bank payment details and marking the expense as unpaid. It is useful in scenarios where a payment recorded against an expense needs to be reversed or corrected, such as when a payment was mistakenly applied or if the payment was canceled. For example, if an expense was marked as paid via bank transfer but the transfer failed or was refunded, this operation allows you to clear the payment information and reset the expense status accordingly.

Properties

Name Meaning
Account Id Identifier of the account associated with the expense.
Expense Id Identifier of the specific expense from which bank payment details will be removed.

Output

The node outputs JSON data representing the updated expense after removal of the bank payment details and marking it as unpaid. The structure typically includes fields reflecting the expense's current state, such as its ID, status (now unpaid), and absence of bank payment information. No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating requests to the external service managing expenses.
  • The node depends on a REST API endpoint that supports updating expense records.
  • Proper configuration of the base URL and authentication credentials within n8n is necessary for successful execution.

Troubleshooting

  • Common Issues:

    • Invalid or missing Account Id or Expense Id can cause the operation to fail.
    • Insufficient permissions or invalid API credentials may result in authorization errors.
    • Network connectivity issues can prevent communication with the external API.
  • Error Messages:

    • "Expense not found": Verify that the provided Expense Id exists and belongs to the specified Account Id.
    • "Unauthorized" or "Authentication failed": Check that the API key credential is correctly configured and has appropriate access rights.
    • "Invalid input": Ensure all required properties are provided and correctly formatted.

Resolving these errors typically involves verifying input parameters, checking credential validity, and ensuring network connectivity.

Links and References

  • Refer to the external expense management API documentation for details on expense updates and payment handling.
  • Consult n8n documentation on setting up API credentials and configuring HTTP request nodes for similar integrations.

Discussion