On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/recur-bill-getting-a-subscription-code.md)  
Filter  
FILTER BY TAG

Retrieving the Next Subscription Code {#recur-bill-getting-a-subscription-code}
===============================================================================

When you specify your subscription code, you can request the next consecutive alphabetical or numeric subscription code based on the last subscription code you specified. For example, if the last subscription code that you specified was `24B`, the system returns the code `24C`.  
Follow these steps to retrieve the next subscription code:

1. Send the request to the recurring billing endpoint:  
   Production: `GET https://api.cybersource.com/rbs/v1/subscriptions/code`  
   Test: `GET https://apitest.cybersource.test.com/rbs/v1/subscriptions/code`
2. 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-getting-a-subscription-code_d9e19}

REST Examples: Retrieving the Next Subscription Code {#recur-bill-get-a-subscription-code-examples}
===================================================================================================

Response to a Successful Request

```
{
    "code": "AWC-50",
}
```

Error Response

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

RELATED TO THIS PAGE

