Mindz icon

Mindz

Interact with Mindz API

Actions115

Overview

The MindzPay Invoice node's Create operation allows users to create a new invoice record within the MindzPay system. This node is useful for automating invoice generation tied to payments and clients in the MindzPay platform, streamlining financial workflows such as billing, accounting, and payment tracking.

Typical use cases include:

  • Automatically generating invoices when a payment is received.
  • Creating invoices linked to specific clients and payments for record-keeping.
  • Managing invoice statuses programmatically during order processing or subscription management.

For example, after a successful payment event, this node can be used to create an invoice with the exact amount, client ID, and payment ID, optionally attaching the invoice file in binary form.

Properties

Name Meaning
Account Key The key of the MindzPay account used to authenticate and identify the account under which the invoice is created.
Input Binary Field The name of the input property containing the invoice file in binary format. Only one file is allowed. Useful for uploading the actual invoice document.
NFe ID The unique identifier for the electronic invoice (NFe).
Status The status of the invoice. Possible values: Pendente (0), Em processo de emissão (1), Emitida (2), Falha ao emitir (3), Em processo de cancelamento (4), Cancelada (5), Falha ao cancelar (6), Não emitir (7), Enviado por email (8), Não emitida (9).
Payment ID The ID of the payment associated with this invoice.
Client ID The ID of the client to whom the invoice belongs.
Amount The monetary amount of the invoice, with two decimal precision.

Output

The node outputs JSON data representing the newly created invoice object as returned by the MindzPay API. This typically includes details such as invoice ID, status, amount, client information, payment association, and possibly timestamps or metadata related to the invoice creation.

If the invoice file is uploaded via the binary input field, the node may also handle binary data representing the invoice document, allowing downstream nodes to access or store the actual invoice file.

Dependencies

  • Requires an API authentication token credential configured in n8n to connect securely to the MindzPay API.
  • The node depends on the MindzPay service being accessible and the provided account key being valid.
  • Proper permissions on the MindzPay account are necessary to create invoices.
  • If uploading invoice files, the input data must contain the binary file under the specified property name.

Troubleshooting

  • Invalid Account Key or Authentication Failure: Ensure the account key is correct and the API credentials are properly set up in n8n.
  • Missing Required Fields: The node requires Payment ID, Client ID, and Amount to be provided. Omitting these will cause errors.
  • Binary File Issues: If specifying a binary input field, ensure the input data contains exactly one file under that property; otherwise, the upload will fail.
  • Status Value Errors: Use only the predefined status options; invalid status codes may cause the API to reject the request.
  • API Connectivity Problems: Network issues or MindzPay service downtime will prevent invoice creation. Check connectivity and service status.
  • Permission Denied: The authenticated user must have rights to create invoices in the MindzPay account.

Links and References


Note: The above summary is based solely on static analysis of the provided source code and property definitions.

Discussion