# Invoice

The Invoice page of the Inqud Recurring Project allows you to manage and view invoices associated with your subscriptions and authorizations. Invoices are generated for each payment cycle or on demand, providing detailed records of the amount due and the currency.

### **What is an Invoice?**

An invoice is a statement of the amount due for a subscription or authorization. The specified currency in the invoice will be converted to the actual authorization cryptocurrency for payment processing.

{% hint style="info" %}
Currently, invoices for on-demand plans can only be created by merchants and exclusively via API. For subscription plans, invoices are automatically scheduled by Inqud.
{% endhint %}

### Invoice parameters

| Parameter name | Description                 | Value (example)               |
| -------------- | --------------------------- | ----------------------------- |
| planName       | Name of plan                | "Test plan"                   |
| clientOrderId  | Merchant supplied order ID  | "order1234"                   |
| status         | Invoice status              | NEW, PENDING, SUCCESS, FAILED |
| currency       | Invoice currency            | "USD"                         |
| amount         | Invoice amount              | 100                           |
| paymentIntents | Array of payment intent IDs |                               |

### Invoice statuses

**NEW**

* **Description**: The invoice has been generated and is newly issued.
* **Implications**:
  * The amount due and currency have been specified.
  * The invoice is awaiting payment.

**PENDING**

* **Description**: The payment process has been initiated but is not yet completed.
* **Implications**:
  * The payment intent is created, and the system awaits its completion.
  * The status will be updated to SUCCESS once the payment intent succeeds.
  * The status will remain PENDING if the payment intent fails and there is room for retry.
  * The status will be updated to FAILED if the payment intent fails and there is no room for retry.

**SUCCESS**

* **Description**: The payment has been successfully processed and confirmed.
* **Implications**:
  * The amount due has been paid in full.
  * The payment is created, and the merchant's balance is updated.

**FAILED**

* **Description**: The payment process was unsuccessful.
* **Implications**:
  * The payment could not be completed.

### Invoice status transitions

<img src="/files/tQBvVjlNu9OoJniZd4sr" alt="" class="gitbook-drawing">


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inqud.com/crypto-recurring/explore/invoice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
