Mindz icon

Mindz

Interact with Mindz API

Actions116

Overview

The MindzPay Invoice node's Update operation allows users to modify existing invoices within the MindzPay system. This includes updating invoice details such as status, amount, associated client or payment IDs, and attaching a new invoice file in binary form if needed.

This node is beneficial in scenarios where invoice information changes after creation, for example:

  • Correcting invoice amounts or client details.
  • Updating the invoice status to reflect its current state (e.g., from pending to issued).
  • Associating payments or reissuing invoices with updated files.

Practical examples:

  • A business updates an invoice amount after a discount is applied.
  • Marking an invoice as "Emitted" once it has been successfully processed.
  • Uploading a revised invoice PDF file to replace the original.

Properties

Name Meaning
Account Key The key of the MindzPay account used to authenticate and identify the account for the invoice update.
Input Binary Field The name of the input property containing the invoice file in binary format. Only one file allowed.
Invoice ID The unique identifier of the invoice to be updated.
NFe ID The NFe (Nota Fiscal Eletrônica) ID associated with the invoice.
Status The current status of the invoice. Options include:
- Não Alterar (Do not change)
- Pendente (Pending)
- Em processo de emissão (In process of issuance)
- Emitida (Issued)
- Falha ao emitir (Failed to issue)
- Em processo de cancelamento (In process of cancellation)
- Cancelada (Cancelled)
- Falha ao cancelar (Failed to cancel)
- Não emitir (Do not issue)
- Enviado por email (Sent by email)
- Não emitida (Not issued)
Payment ID The identifier of the payment linked to this invoice.
Client ID The identifier of the client related to the invoice.
Amount The monetary amount of the invoice, supporting two decimal places.

Output

The node outputs JSON data representing the updated invoice object returned by the MindzPay API. This typically includes fields such as invoice identifiers, status, amounts, client and payment associations, timestamps, and any other metadata provided by the API response.

If a binary invoice file is provided via the "Input Binary Field," the node processes this file to update the invoice document accordingly.

Dependencies

  • Requires an active connection to the MindzPay API using an API authentication token or OAuth2 credential configured in n8n.
  • The "Account Key" must be valid and authorized to perform invoice updates.
  • If uploading a binary invoice file, the input data must contain the specified binary property with a valid file.

Troubleshooting

  • Invalid Account Key or Authentication Failure: Ensure the provided account key is correct and that the API credentials are properly configured in n8n.
  • Invoice Not Found: Verify the Invoice ID exists in the MindzPay system before attempting an update.
  • Invalid Status Value: Use only the predefined status options; "Não Alterar" can be used to leave the status unchanged.
  • Binary File Issues: When specifying the binary field, ensure the input contains exactly one valid file; multiple files or missing files will cause errors.
  • API Rate Limits or Network Errors: Check network connectivity and API usage limits if requests fail intermittently.

Links and References

Discussion