Renew, Suspend, or Resume Subscriptions

When a subscription expires or before it expires, you can renew the subscription.

If an end subscriber requests to suspend or pause a subscription, you can use the "Pause a subscription" operation to do it.

When a subscription is in the Suspended status, the only action you can take is to resume a suspended subscription with the "Resume a subscription" operation.

In this guide, you will learn:

  • How to renew a subscription through API
  • How to suspend a subscription through API
  • How to resume a subscription through API

Step 1. Generate an OAuth token

See Create an OAuth token for details.

Step 2. Renew, suspend, or resume a subscription using the "Create an order" operation

Renew a subscription

The following cURL code sample renews the subscription A-S00000272:

Copy
Copied
curl --location --request POST 'https://rest.zuora.com/v1/orders' \
--header 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
--header 'Content-Type: application/json' \
--data-raw '{
  "description": "Renew a subscription",
  "existingAccountNumber": "A00000521",
  "orderDate": "2023-01-01",
  "subscriptions": [
    {
      "orderActions": [
        {
          
          "triggerDates": [
            {
              "name": "ContractEffective",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "ServiceActivation",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "CustomerAcceptance",
              "triggerDate": "2022-01-01"
            }
          ],
          "type": "RenewSubscription"
        }
      ],
      "subscriptionNumber": "A-S00000272"
    }
  ]
}'

Suspend a subscription

The following cURL code sample suspends the subscription A-S00000272 from 2022-01-01:

Copy
Copied
curl --location --request POST 'https://rest.zuora.com/v1/orders' \
--header 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
--header 'Content-Type: application/json' \
--data-raw '{
  "description": "Suspend a subscription",
  "existingAccountNumber": "A00000521",
  "orderDate": "2023-01-01",
  "subscriptions": [
    {
      "orderActions": [
        {
          "suspend": {
            "suspendPolicy": "Today"
          },
          "triggerDates": [
            {
              "name": "ContractEffective",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "ServiceActivation",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "CustomerAcceptance",
              "triggerDate": "2022-01-01"
            }
          ],
          "type": "Suspend"
        }
      ],
      "subscriptionNumber": "A-S00000272"
    }
  ]
}'

Resume a subscription

The following cURL code sample resumes the suspended subscription A-S00000272 from 2022-10-01:

Copy
Copied
curl --location --request POST 'https://rest.zuora.com/v1/orders' \
--header 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
--header 'Content-Type: application/json' \
--data-raw '{
  "description": "Resume a subscription",
  "existingAccountNumber": "A00000521",
  "orderDate": "2022-01-01",
  "subscriptions": [
    {
      "orderActions": [
        {
          "resume": {
            "extendsTerm": true,
            "resumePolicy": "SpecificDate",
            "resumeSpecificDate": "2022-10-01"
          },
          "triggerDates": [
            {
              "name": "ContractEffective",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "ServiceActivation",
              "triggerDate": "2022-01-01"
            },
            {
              "name": "CustomerAcceptance",
              "triggerDate": "2022-01-01"
            }
          ],
          "type": "Resume"
        }
      ],
      "subscriptionNumber": "A-S00000272"
    }
  ]
}'

Other options

If you want to perform only one action on a single subscription for each request, you can also use the Subscription API operations to renew, suspend, or resume a subscription.

Renew a subscription

You can use the Renew a subscription to renew a subscription.

The following cURL code sample renews the subscription A-S00000272:

Copy
Copied
curl -i -X PUT \
  'https://rest.zuora.com/v1/subscriptions/A-S00000272/renew' \
  -H 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "collect": false,
    "creditMemoReasonCode": "Unsatisfactory service",
    "runBilling": true
  }'

Suspend a subscription

You can use the Suspend a subscription to suspend a subscription.

The following cURL code sample suspends the subscription A-S00000272 in 10 days (starting from the day you make this request):

Copy
Copied
curl -i -X PUT \
  'https://rest.zuora.com/v1/subscriptions/A-S00000272/suspend' \
  -H 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "collect": false,
    "contractEffectiveDate": "2022-02-01",
    "creditMemoReasonCode": "Unsatisfactory service",
    "extendsTerm": true,
    "resume": true,
    "resumePolicy": "SpecificDate",
    "resumeSpecificDate": "2023-01-01",
    "runBilling": true,
    "suspendPeriods": 10,
    "suspendPeriodsType": "Day",
    "suspendPolicy": "FixedPeriodsFromToday"
  }'

Resume a subscription

You can use the Resume a subscription to resume a suspended subscription.

The following cURL code sample resumes the subscription A-S00000272 on 2022-10-01:

Copy
Copied
curl -i -X PUT \
  'https://rest.zuora.com/v1/subscriptions/A-S00000272/resume' \
  -H 'Authorization: Bearer 39cdc89ece8741fb97b8a2477622bc09' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "collect": false,
    "contractEffectiveDate": "2022-02-01",
    "creditMemoReasonCode": "Unsatisfactory service",
    "extendsTerm": true,
    "resumePolicy": "SpecificDate",
    "resumeSpecificDate": "2022-10-01",
    "runBilling": true
  }'

Step 3. Verify the result

After the preceding API calls are done, you can verify the result in the Zuora UI.

To verify the result through the Zuora UI, you can search the subscription by ID at the All Subscriptions page by navigating to Customers > Subscriptions in the Zuora UI. By clicking the subscription, you will be able to find the status of the subscription, which allows you to verify if the subscription has been suspended, resumed, or renewed.