Kiwify icon

Kiwify

Interagir com a API da Kiwify

Overview

The node integrates with the Kiwify API to perform various operations related to sales, products, affiliates, webhooks, payouts, and account details. Specifically, for the "Reembolsar Venda" (Refund Sale) operation, it allows users to refund a specific sale by its ID, optionally specifying a PIX key for the refund.

This node is beneficial in scenarios where you need to automate management of your Kiwify store data, such as:

  • Automatically refunding sales based on external triggers or conditions.
  • Querying detailed sales information.
  • Managing webhooks and affiliates programmatically.
  • Retrieving sales statistics and balances.

Practical example:
You can use this node to automatically refund a sale when a customer requests it via a form submission, passing the sale ID and optionally a PIX key for the refund transaction.


Properties

Name Meaning
ID Da Venda (saleId) The unique identifier of the sale to be consulted or refunded. Required for "getSale" and "refundSale" operations.
Chave PIX (pixKey) Optional PIX key used for processing the refund payment. Only applicable for the "refundSale" operation.

Output

The node outputs JSON data corresponding to the response from the Kiwify API for the selected operation.

For the "Reembolsar Venda" operation, the output JSON contains details about the refund request result, such as confirmation of the refund status and any relevant metadata returned by the API.

No binary data output is produced by this node.


Dependencies

  • Requires an API key credential for authenticating with the Kiwify API.
  • The node uses OAuth token retrieval internally by exchanging client credentials.
  • Requires network access to https://public-api.kiwify.com.
  • No additional environment variables are needed beyond the configured API credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Providing an incorrect sale ID may result in "not found" errors.
    • If the PIX key is invalid or not associated properly, the refund might fail or be rejected.
    • Network connectivity issues can prevent API calls from succeeding.
  • Error messages:

    • Errors thrown by the node include the message from the Kiwify API. For example, "Sale not found" indicates an invalid sale ID.
    • Authentication errors typically mention invalid client credentials or token issues.
    • To resolve, verify API credentials, ensure the sale ID exists, and confirm the PIX key format if used.
  • Handling failures:

    • The node supports continuing on failure, allowing workflows to handle errors gracefully.

Links and References

Discussion