REST Example: Create a Subscription with an Existing Plan {#rb-subs-migration-4b-plan-existing-code}
====================================================================================================

This example creates a subscription that uses an existing plan.  
Request

```
{
  "subscriptionInformation": {
    "planId": "6868912495476705603955",
    "name": "Subscription with plan id",
    "startDate": "2025-08-10",
    "originalTransactionId": "123456789",
    "originalTransactionAuthorizedAmount": "0.00"
  },
  "paymentInformation": {
    "customer": {
      "id": "C24F5921EB870D99E053AF598E0A4105"
    }
  }
}
```

Example Response to a Successful Request

```
{
    "_links": {
        "self": {
            "href": "/rbs/v1/subscriptions/1619214690",
            "method": "GET"
        },
        "update": {
            "href": "/rbs/v1/subscriptions/1619214690",
            "method": "PATCH"
        },
        "cancel": {
            "href": "/rbs/v1/subscriptions/1619214690/cancel",
            "method": "POST"
        }
    },
    "id": "1619214690",
    "status": "COMPLETED",
    "subscriptionInformation": {
        "code": "AWC-47",
        "status": "PENDING"
    }
}
```

Example Response to a Failed Request

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

