HostBill icon

HostBill

Consume HostBill API (v.0.1.3)

Overview

This node allows you to interact with the HostBill API, specifically to set the status of an order. It is useful in automated workflows where you need to update the state of orders based on business logic or external triggers. For example, you might use this node to automatically mark an order as "Active" after payment confirmation, set it to "Pending" while awaiting further action, or flag it as "Fraud" if suspicious activity is detected.

Practical examples:

  • Automatically cancel orders that have not been paid within a certain timeframe.
  • Set new orders to "Pending" until manual review is completed.
  • Mark orders as "Active" once provisioning is successful.

Properties

Name Type Meaning
Order ID Number The unique identifier of the order whose status you want to change.
Status Options The new status to assign to the order. Possible values: Active, Pending, Cancelled, Fraud.

Output

The output is a JSON object (or array of objects) representing the result of the status update operation for each input item. The structure typically includes fields returned by the HostBill API after updating the order status, such as confirmation of the update or error messages.

If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message for the failed item.

Example output:

[
  {
    "orderId": 123,
    "status": "Active",
    "result": "success"
  }
]

Or, in case of error:

[
  {
    "error": "Order not found"
  }
]

Dependencies

  • External Service: Requires access to a HostBill instance with API enabled.
  • API Credentials: You must configure valid HostBill API credentials in n8n under the name hostBillApi.
  • n8n Configuration: No additional environment variables are required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Invalid Credentials: If your API credentials are incorrect or missing, the node will throw an authentication error.
    • Order Not Found: Providing an invalid Order ID will result in an error message indicating the order could not be found.
    • Insufficient Permissions: The API user may lack permission to update order statuses.
  • Error Messages:

    • "Order not found": Check that the Order ID exists in HostBill.
    • "Authentication failed": Verify your API credentials in n8n.
    • "Missing required parameter": Ensure all required properties (Order ID and Status) are provided.

Links and References

Discussion