On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/rb-cre-follow-on-subs-w-exist-trans.md)  
Filter  
FILTER BY TAG

Creating a Follow-on Subscription from an Existing Transaction {#rb-cre-follow-on-subs-w-exist-trans}
=====================================================================================================

You can create a subscription using an existing successful transaction by specifying its request ID in the path. This method eliminates the need to provide a customer token.  
You can use an existing or one-time plan.  
Follow these steps to create a subscription from an existing transaction:

1. Create the request with the required API fields.

2. Send the request to one of these endpoints:  
   Production: `POST https://api.cybersource.com/rbs/v1/subscriptions/follow-ons/{requestId}`  
   Test: `POST https://apitest.cybersource.test.com/rbs/v1/subscriptions/follow-ons/{requestId}`

3. Verify the responses to make sure that the request was successful. A 200-level HTTP response code indicates success. See the [Transaction Response Codes](https://developer.cybersource.com/api/reference/response-codes.md "").

   #### ADDITIONAL INFORMATION

   The start date must be in coordinated universal time (UTC) in this format: YYYY-MM-DDThh:mm:ssZ. The T separates the date and the time. The Z indicates UTC. For example, `2023-08-11T22:47:57Z` indicates August 11, 2023, at 22:47:57 (10:47:57 p.m.). For subscriptions created on the start date, set the time to the current time and day in your time zone.
   {#rb-cre-follow-on-subs-w-exist-trans_steps_d12_ssd_t2c}

Required Fields {#rb-cre-follow-on-subs-w-exist-trans-reqd-fields}
==================================================================

These fields are required for creating a subscription from an existing transaction:

subscriptionInformation.name
:

subscriptionInformation.startDate
:
{#rb-cre-follow-on-subs-w-exist-trans-reqd-fields_ul_sk1_13d_t2c}

Optional Fields
---------------

subscriptionInformation.code
:

clientReferenceInformation.code
:
Merchant reference number.

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: Creating a Follow-on Subscription from an Existing Transaction {#rb-cre-follow-on-subs-w-exist-trans-ex}
======================================================================================================================

Request

```
{
    "clientReferenceInformation":{
      "code":"ORDER123"
    },
    "subscriptionInformation": {
        "planId":"1619214515",
        "name": "SubNameFOOTPTesting",
        "startDate": "2023-04-15T17:01:42Z"
    }
}
```

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"
    }
}
```

Response to a Failed Request

```
{
    "status": "NOT_FOUND",
    "reason": "INVALID_DATA"
}
```

RELATED TO THIS PAGE

