REST Example: Create a Subscription with a One-Time Plan {#rb-subs-migration-4a-plan-one-time-code}
===================================================================================================

This example creates a subscription with a one-time plan.  
Request

```
{
  "planInformation": {
    "billingPeriod": {
      "length": "1",
      "unit": "M"
    },
    "billingCycles": {
      "total": "24"
    }
  },
  "subscriptionInformation": {
    "name": "Subscription with one-time plan",
    "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/1619214861",
            "method": "GET"
        },
        "update": {
            "href": "/rbs/v1/subscriptions/1619214861",
            "method": "PATCH"
        },
        "cancel": {
            "href": "/rbs/v1/subscriptions/1619214861/cancel",
            "method": "POST"
        }
    },
    "id": "1619214861",
    "status": "COMPLETED",
    "subscriptionInformation": {
        "code": "AWC-49",
        "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": "planInformation.billingPeriod.length",
            "reason": "MAX_LENGTH"
        }
    ]
}
```

