# Inqud Hosted

Users can be directed from your website or mobile application to the Inqud Hosted Page to complete subscription process.

## Prerequisites

* Your business account with Inqud is set up, complete with API tokens configured.
* The Crypto Recurring Project has been established and configured within the Inqud platform.
* Plans are created within project.

If you don't have the prerequisites in place yet, please refer to the following page:

{% content-ref url="/pages/yYjhesklLaLXq7JL6rwC" %}
[Get Started](/crypto-recurring/get-started.md)
{% endcontent-ref %}

{% hint style="info" %}
There are two types of recurring plans: On-demand and Subscription. The integration method is different for each type, ensuring that the specific needs of each plan are met efficiently.
{% endhint %}

For details about the different plan types, please refer to the following page:

{% content-ref url="/pages/ZyHwkRbonqS61xDcjF0P" %}
[Plan](/crypto-recurring/explore/plan.md)
{% endcontent-ref %}

### Plan link

{% hint style="success" %}
This step applies to both subscription and on-demand plans.
{% endhint %}

Once you have created a plan, you can share a link with the end user you want to subscribe. Each plan has a unique plan ID in the following format:

```
PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf
```

To create a link with this plan ID, use the following format:

```
https://recurring.inqud.com/plans/{planId}
```

For example, using the plan ID `PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf`, the link would be:

<pre><code><strong>https://recurring.inqud.com/plans/PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf
</strong></code></pre>

Optionally, you can pass an `orderId` within the  plan link to later distinguish between subscriptions and authorizations.

To create a link with this plan ID and order ID , use the following format:

```
https://recurring.inqud.com/plans/{planId}?orderId={orderId}
```

For example, using the plan ID `PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf`  and order ID `order28126`, the link would be:

<pre><code><strong>https://recurring.inqud.com/plans/PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf?orderId=order28126
</strong></code></pre>

You can share this link with your end user to allow them to subscribe to the plan directly.

### Subscription plan integration

{% hint style="info" %}
You can use "hourly" subscription plans for testing purposes
{% endhint %}

After sharing the plan link with the user and they subscribe, you will begin receiving **Subscription** webhook notifications. If you included an `orderId` in the plan link, the created **Subscription** will have this ID specified. Webhooks are triggered by any change in subscription status, so ensure you handle all subscription statuses appropriately.\
\
Subscription webhook details:

{% content-ref url="/pages/YvOC3gaXHmAdrEDrHD0A" %}
[Subscription Web Hook](/crypto-recurring/integration/web-hooks/subscription-web-hook.md)
{% endcontent-ref %}

{% hint style="info" %}
The Subscription object and its status provide all the information you need to integrate with Inqud Recurring Subscription. Inqud will handle all recurring charge processing for you.
{% endhint %}

### On demand plan integration

After sharing the plan link with the user and they authorize spending, an **Authorization** object is created. You can receive webhook notifications for new **Authorizations**. If you included an `orderId` in the plan link, the created **Authorization** object will have this ID specified. Webhooks are triggered by any change in authorization status, so ensure you handle all authorization statuses appropriately.

Authorization webhook details:

{% content-ref url="/pages/Baek9DS4PHkG1eREs95T" %}
[Authorization Web Hook](/crypto-recurring/integration/web-hooks/authorization-web-hook.md)
{% endcontent-ref %}

You can check the current **transferable authorization balance** via the Inqud API:\
\
[Authorizations API](https://apireference.inqud.com/#tag/crypto-recurring-authorizations/operation/user_crypto-recurring_get-authorization-balance)\
\
Once you have an authorization with the status '**GRANTED**,' you can create **Invoice** to charge the user via the Inqud API:\
\
[Invoices API](https://apireference.inqud.com/#tag/crypto-recurring-invoices/operation/user_crypto-recurring_create-invoice)\
\
As invoices are processed asynchronously, you can track their status either by polling the API or by receiving invoice notifications through Webhooks.

Invoice webhook details:

{% content-ref url="/pages/nfqvU3G3WEkL7L8IkyXo" %}
[Invoice Web Hook](/crypto-recurring/integration/web-hooks/invoice-web-hook.md)
{% endcontent-ref %}


---

# 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/integration/inqud-hosted.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.
