# Plan

The Plans section of the Inqud Crypto Project allows you to create and manage payment plans tailored to your business needs. Plans provide a structured framework for handling cryptocurrency payments, making it easy to manage subscriptions and on-demand payments.

There are two plan types.

### Subscription Plan

Designed for recurring payments, subscription plans are ideal for services that require periodic billing, such as memberships, software as a service (SaaS), or any other regular payment schedules with fixed amount.

### Subscription Plan parameters

| Parameter name | Descirption                                                                                                                                 | Values (Examples)                      |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| Name           | Plan name                                                                                                                                   | "Premium access"                       |
| Period         | An interval of time between payments                                                                                                        | Hourly, Daily, Weekly, Monthly, Yearly |
| Status         | Plan status                                                                                                                                 | Active, On\_Hold, Canceled             |
| Amount         | Plan amount (actual payment amount will be calculated based on user selected cryptocurrency)                                                | 20                                     |
| Currency       | Plan currency (actual payment currency will be user selected cryptocurrency)                                                                | "USD"                                  |
| Grace period   | Additional time provided to a customer after their subscription has expired to renew or make a payment without losing access to the service | 24 hours                               |

### On-demand Plan

On-demand plans are perfect for one-time payments or flexible payment schedules that are triggered by specific user actions. This type of plan is suitable for businesses that charge per transaction or offer pay-as-you-go services.

### On-demand Plan parameters

| Parameter name | Descirption | Values (Examples)          |
| -------------- | ----------- | -------------------------- |
| Name           | Plan name   | "My Taxi"                  |
| Status         | Plan status | Active, On\_Hold, Canceled |

### Plan link

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:

```
https://recurring.inqud.com/plans/PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf
```

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

### Plan link parameters

Plan link accepts following query parameters:

| Paramter name | Description                | Values (Examples) |
| ------------- | -------------------------- | ----------------- |
| orderId       | Merchant supplied order ID | qwerty12345       |

Example:

```
https://recurring.inqud.com/plans/PLAN-195cd70d-4d82-41d6-90aa-897c28126ddf?orderId=qwerty12345
```

### Plan statuses

**ACTIVE**

* **Description**: New subscriptions and authorizations can be made to the plan.
* **Implications**:
  * Customers can sign up for the plan.
  * Payments will be processed as scheduled.
  * The plan is fully operational and available to users.

**ON\_HOLD**

* **Description**: New authorizations and subscriptions cannot be made to the plan, but all existing ones remain active.
* **Implications**:
  * No new customers can subscribe to the plan.
  * Existing subscriptions will continue to function as normal.
  * Current subscribers will still have their payments processed and receive services.

**CANCELLED**

* **Description**: New authorizations and subscriptions cannot be made to the plan, and all existing ones will be terminated after the current active subscription ends.
* **Implications**:
  * No new subscriptions or authorizations are allowed.
  * Existing subscriptions will continue until the end of their current billing cycle.
  * After the current active subscription period ends, all subscriptions will be terminated, and no further payments will be processed.
