---
page_title: Update a subscription
product: LotusPay
platform: Web
page_source: https://juspay.io/in/docs/lotuspay/web/core-resources/update-a-subscription
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Flotuspay%2Fweb%2Fcore-resources%2Fupdate-a-subscription
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/lotuspay/llms.txt
---

## API Version: default


# **Update a subscription** 



Updates an existing independent subscription to match the specified parameters.

**ARGUMENTS** 


| Argument | Description |
|---|---|
| id REQUIRED	 | The identifier of the subscription to update. Must not be a plan subscription. Must be in pending_customer_approval or active status. |
| amount optional	 | The amount to charge on a recurring basis. A positive integer in paisa (one hundredth of a Rupee). e.g. 100 means Rs 1. Should be less than or equal to mandate's maximum_amount or equal to mandate's collection_amount. Must be less than or equal to Rs 1 crore (1 billion paisa). |
| metadata optional	 | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
| name optional	 | The name of the subscription. This will be set as the description on each ACH debit created. Must not exceed 255 characters. |


**Returns**  Returns an updated subscription object.## Endpoints:
- Sandbox: https://api-test.lotuspay.com/v1/subscriptions/{ID}

- Production: https://api.lotuspay.com/v1/subscriptions/{ID}

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Auth example
- Value:  sk_test_XjIHowXWSI23uvjepz2X82
## Sample Code Snippets:
### Sample Request and Response:

#### Request:
```Shell
$ curl https://api-test.lotuspay.com/v1/subscriptions/SB004433221AA \
   -u sk_test_XjIHowXWSI23uvjepz2X82: \
   -d amount=50000 \
   -d name="Order 321"
```

#### Response:
```json
{
    "id": "SB004433221AA",
    "object": "subscription",
    "amount": 50000,
    "count": 2,
    "created": 1530224170,
    "day_of_month": 23,
    "interval": "month",
    "interval_count": 2,
    "livemode": false,
    "metadata": {
    },
    "month": null,
    "name": "Order 321",
    "start_date": "2018-12-02",
    "status": "active",
    "customer": "CU0012345ABCDE",
    "mandate": "MD0011DD22RR33",
    "plan": null
  }
```

## API Responses:


---

## See Also

- [Retrieve a subscription](https://juspay.io/in/docs/lotuspay/web/core-resources/retrieve-a-subscription)
- [Cancel a subscription](https://juspay.io/in/docs/lotuspay/web/core-resources/cancel-a-subscription)
