Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Expenses → Remove Bank Payment Details From Expense And Mark It As Unpaid

AI-generated

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 made in error or needs to be reprocessed.

Practical examples include:

  • A finance team correcting an expense record after a payment cancellation.
  • Automating workflows that handle refund processes by resetting payment status on expenses.
  • Integrations where external systems notify n8n to revert payment information on specific expenses.

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 object after removal of bank payment details and marking it as unpaid. This typically includes the expense's current state, reflecting the absence of payment information and an updated payment status.

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.

Troubleshooting

  • Common issues:

    • Invalid or missing Account Id or Expense Id can cause the operation to fail.
    • Authentication errors if the API key or credentials are not set correctly.
    • Network or API endpoint unavailability may result in request failures.
  • Error messages and resolutions:

    • "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 valid and properly configured.
    • "Invalid input" — Ensure all required properties (Account Id and Expense Id) are provided and correctly formatted.

Links and References

  • Refer to the external API documentation for expense management to understand the exact fields affected by this operation.
  • n8n documentation on how to configure API credentials and use HTTP request nodes for custom integrations.

Discussion