Use the REST API to Validate Migrated Subscriptions {#rb-subs-migration-5-validate-rest-api}
============================================================================================

> IMPORTANT
> To validate the migration, compare the new ` Cybersource ` subscription details to the export file you created in [Task 3: Export Current Subscriptions to a File](/docs/cybs/en-us/recurring-billing/migration/all/rest/recurring-billing-migrate/rb-subs-migration-3-export.md "").

1. Follow these steps to use the `Cybersource` REST API to validate the migrated subscriptions:
2. Follow these steps if you want to validate a specific subscription:
   1. To obtain the details of a specific subscription, see [Retrieving a Subscription](https://developer.cybersource.com/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/recur-bill-getting-a-subscription.md "") in the *Recurring Billing Developer Guide*. The subscription details are returned in the response message.
   2. Compare the subscription details to the corresponding subscription details that you exported to a file in [Task 3: Export Current Subscriptions to a File](/docs/cybs/en-us/recurring-billing/migration/all/rest/recurring-billing-migrate/rb-subs-migration-3-export.md ""). The subscription details are returned in the response message.
3. Follow these steps if you want to validate a list of all subscription details:
   1. To obtain a list of all subscription details, see [Retrieving a List of Subscriptions](https://developer.cybersource.com/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/recur-bill-getting-all-subscriptions.md "") in the *Recurring Billing Developer Guide*. The list of subscription details is returned in the response message.
   2. Compare the `Cybersource` subscription details in the list to the subscription details in the export file from [Task 3: Export Current Subscriptions to a File](/docs/cybs/en-us/recurring-billing/migration/all/rest/recurring-billing-migrate/rb-subs-migration-3-export.md "").
4. (Optional) Complete these steps if you want to **cancel** a pending, active, suspended, or delinquent subscription:
   1. In the subscription details, find the subscription ID.
   2. Send the message to one of these endpoints, replacing the `{id}` portion of the URL with the value of the subscription ID:
      * Production: `POST ``https://api.cybersource.com``/rbs/v1/subscriptions/{id}/cancel`
      * Test: `POST ``https://apitest.cybersource.com``/rbs/v1/subscriptions/{id}/cancel`
   3. Check the response message to verify that the request was successful. A 200-level HTTP response code indicates success.
5. (Recommended in your test environment) Send test transactions to validate proper setup.

