---
page_title: Attach Add On
product: Juspay Billing
page_source: https://juspay.io/in/docs/juspay-billing/docs/billing/attach-add-on
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fjuspay-billing%2Fdocs%2Fbilling%2Fattach-add-on
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/juspay-billing/llms.txt
---

## API Version: default


# Add ons




## **Overview** 



Add-ons in Juspay Billing are an extension to the core recurring billing product that enable merchants to attach **temporary or supplementary services/products**  to an existing billing plan without creating a separate mandate.

While Juspay Billing handles the primary recurring charge lifecycle, add-ons allow merchants to introduce **flexible, time-bound, and dynamic charges**  within the same billing framework.

Instead of creating a new temporary mandate for every additional service, merchants can define and manage add-ons directly through the Juspay dashboard and associate them with existing billing plans.


---



#### **Key Concept** 



Add-ons are designed for use cases where:

* The additional service is **not required for the full duration**  of the billing cycle
* Charges are **variable or intermittent**
* Merchants need **dynamic augmentation of an active subscription**


#### Configuring add ons against a plan



* Navigate to the **Plan Management**  module in the dashboard.
* Create Add-ons under the **Add-ons section** .
* Attach the created Add-ons to the relevant **Plans** .
* Once attached to a plan, Add-ons can be used in billing flows in either of the following ways:
  
  * Via the **Attach Add-on API** , by passing the `billing_execution_id`.
  * During **Order Creation (Billing setup)**  through **Payment Rules** .

> **Note**
> * Only Add-ons attached to a Plan in the dashboard are valid for use.
> * If an Add-on is not attached to the Plan, any API request referencing it will fail.

## Endpoints:
- Sandbox: https://sandbox.juspay.in/billing

- Production: https://api.juspay.in/billing

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
- Value: Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Required
## Headers:

#### Content-Type:
- Value: application/x-www-form-urlencoded
- Tags: String
## Sample Code Snippets:
### Sample Request:

#### Update Attached Add ons API Request Code Snippet:

```update attached add ons api request
curl --location 'https://sandbox.juspay.in//billing' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
    "command": "update_attached_add_ons",
    "billing_execution_info_id": "12b7ffb1173446c0bdb1d91b42513298",
    "add_on_info": [
        {
            "metric_id": 4,
            "quantity": 3
        },
        {
            "metric_id": 3
        }
    ]
}'
```

#### Add ons request during order create Code Snippet:

```add ons request during order create
curl --location 'https://sandbox.juspay.in/billing/ecr/orders' \
--header 'version: 2018-07-01' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic N0JBRDA4OUExRjYwNEYwREEyNDlCNjY3QTVCMUQzM0Q6' \
--data '{
    "order_id": "1775717809",
    "amount": "1",
    "currency": "INR",
    "customer_id": "cth_rPj21roNSjEbumSy",
    "options.create_mandate": "REQUIRED",
    "mandate.max_amount": "100",
    "metadata.auto_refund_post_success": true,
    "gateway_id": "27",
    "metadata.BILLDESK:gateway_reference_id": "dfe",
    "payment_rules": "{\"payment_flows\":{\"billing_creation\":{\"status\":\"REQUIRED\",\"info\":{\"plan_id\":\"test07\", \"add_on\": [{\"metric_id\": 3, \"quantity\": 2}, {\"metric_id\": 2}]}}}}",
    
```

### Sample Response:

#### Update Attached Add ons API Response:
```plaintext
{
    "list": [
        {
            "status": "INACTIVE",
            "pricing_tier": {
                "unit_amount": 0,
                "up_to": "INFINITY",
                "flat_fee": 1
            },
            "name": "addOn1",
            "metric_id": 1,
            "description": "sample add on metric"
        },
        {
            "status": "ACTIVE",
            "pricing_tier": {
                "unit_amount": 0,
                "up_to": "INFINITY",
                "flat_fee": 7
            },
            "name": "addOn2",
            "metric_id": 2,
            "description": "sample add on metric"
        },
        {
            "status": "ACTIVE",
            "pricing_tier": {
                "unit_amount": 0,
                "up_to": "INFINITY",
                "flat_fee": 14
            },
            "name": "addOn3",
            "metric_id": 3,
            "description": "sample add on metric"
        },
        {
            "status": "ACTIVE",
            "pricing_tier": {
                "unit_amount": 0,
                "up_to": "INFINITY",
                "flat_fee": 4
            },
            "name": "addOn4",
            "metric_id": 4,
            "description": "sample add on metric"
        }
    ],
    "total": 4,
    "object": "list"
}
```

## Body Parameters:
### Basic Parameters:

#### command:
- Value: update_attached_add_ons
- Tags: String

#### billing_execution_info_id:
- Value: unique billing execution info identifier
- Tags: String

#### add_on_info:
- Value:
  - **Metric_id**:
    - Description: Unique id against the add on ( can be found against metric id on Juspay Dashboard)
    - Value: 4
    - Tags: Number, Required
  - **Quantity**:
    - Description: In case you have a use case where we want to give a quantity against add ons too. So the biling value will become the product of price defined in the add on and quantity
    - Value: 4
    - Tags: Number, Required
  - **Start Date**:
    - Description: Required in EPOCH format 
      
      By Default - It will be taken  as Current date only if not passed
    - Value: 1775798403
    - Tags: String
  - **End Date**:
    - Description: Required in EPOCH format 
      
      By Default - It will be taken  as Mandate end date if not passed.
    - Value: 1775798403
    - Tags: Object
- Tags: Object
## API Responses:
### 200:

#### payment:
- Value:
  - **Authentication**:
    - Value:
      - **Method**:
        - Value: GET
        - Tags: String
      - **Url**:
        - Value: https://sandbox.juspay.in/v2/pay/start/eulerqa_sandbox/mozFS1mNCmY96k3aHHp?cardIssuerBankName%3DUPI_COLLECT%26cardType%3DUPI%26paymentMethod%3DUPI_COLLECT%26paymentMethodType%3DUPI
        - Tags: String
    - Tags: Object
- Tags: Object

#### status:
- Value: PENDING_VBV
- Tags: String

#### txn_uuid:
- Value: mozFS1mNCmY96k3aHHp
- Tags: String

#### offer_details:
- Value:
  - **Offers**:
    - Tags: Array
- Tags: Object

#### order_id:
- Value: Ord_1765191076
- Tags: String

#### txn_id:
- Value: suc-Ord_1765191076-1
- Tags: String


---

## See Also

- [Webhooks - Billing](https://juspay.io/in/docs/juspay-billing/docs/billing/webhooks-billing)
- [List Add ons](https://juspay.io/in/docs/juspay-billing/docs/billing/list-add-ons)
