On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-plans-intro/recur-bill-amending-a-plan.md)  
Filter  
FILTER BY TAG

Amending a Plan {#recur-bill-amending-a-plan}
=============================================

Amend a plan by entering one of two values in the processingInformation.subscriptionBillingOptions.applyTo field. Possible values:

* `ALL`: change is applied to all subscriptions (existing and new).
* `NEW` (default): change is applied to new subscriptions only.

You can also make changes to individual subscriptions. See [Amending a Subscription](/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/rb-amend-subs.md "").  
For a **draft** plan, you can amend all plan information.  
For an **active** plan, you can amend only the information in these fields:

* planInformation.billingPeriod
* planInformation.billingCycles
* orderInformation.amountDetails.currency
  IMPORTANT You cannot amend an inactive plan. To make changes, move the plan to active or draft status.  
  Follow these steps to amend a plan:

1. Include any optional fields.
2. In the endpoint path, include the plan ID that you received when you retrieved a list of plans.
3. Send the request to the Recurring Billing endpoint:  
   Production: `PATCH https://api.cybersource.com/rbs/v1/plans/{id}`  
   Test: `PATCH https://apitest.cybersource.test.com/rbs/v1/plans/{id}`
4. Verify that the request was successful. A 200-level HTTP response code indicates success. For information about response codes, see [Transaction Response Codes](https://developer.cybersource.com/api/reference/response-codes.md "").{#recur-bill-amending-a-plan_d9e19}

Optional Fields for Amending a Plan {#recur-bill-amend-plan-opt-fields}
=======================================================================

These fields are optional for amending a plan:

orderInformation.amountDetails.billingAmount
:

orderInformation.amountDetails.setupFee
:

planInformation.billingCycles.total
:
Only increases to the number of billing cycles are allowed.

planInformation.code
:

planInformation.description
:

planInformation.name
:

processingInformation.subscriptionBillingOptions.applyTo
:
Default value is `NEW`.

Related Information
-------------------

* [API field reference guide for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md "")

REST Example: Amending a Plan {#recur-bill-amend-a-plan-examples}
=================================================================

Request

```
{
    "planInformation": {
        "name": "AmendPlan",
        "description": "Amend Plan 1610394600",
        "billingPeriod":{
            "length": "4",
            "unit": "M"
        },
        "billingCycles":{
            "total": "7"
        }
    },
    "orderInformation": {
        "amountDetails": {
            "billingAmount": "38.00",
            "setupFee": "35"
        }
    },
    "processingInformation": {
        "subscriptionBillingOptions": {
            "applyTo": "all"
        }
    }
}     
```

Response to a Successful Request

```
{
    "_links": {
        "self": {
            "href": "/rbs/v1/plans/6183561970436023701960",
            "method": "GET"
        },
        "update": {
            "href": "/rbs/v1/plans/6183561970436023701960",
            "method": "PATCH"
        },
        "activate": {
            "href": "/rbs/v1/plans/6183561970436023701960/activate",
            "method": "POST"
        }
    },
    "id": "6183561970436023701960",
    "submitTimeUtc": "2023-04-13T21:39:34.993Z",
    "status": "COMPLETED",
    "planInformation": {
        "code": "1616024773",
        "status": "DRAFT"
    }
}           
```

Error Response

```
{
    "status": "NOT_FOUND",
    "reason": "INVALID_DATA",
    "message": "One or more fields in the request contains invalid data.",
    "details": [
        {
            "field": "subscriptionInformation.planId",
            "reason": "NOT_FOUND"
        }
    ]
}          
```

RELATED TO THIS PAGE

