Skip to main content

Create prepayment subscription

Zuora

Create prepayment subscription

Suppose you run a software company and have configured the following prepayment charge and drawdown charge in your product catalog:

Product: API Calls Prepayment Service 
Product rate plan: API Calls Monthly Prepayment Plan
Prepayment charge Drawdown charge
  • Charge name: Monthly Plan
  • Charge type: Recurring
  • Charge model: Flat Fee
  • List price: $20/Billing period
  • Billing period: Month
  • Prepaid UOM: Million calls
  • Prepaid units: 10
  • Validity period: Month
  • Charge name: Drawdown
  • Charge type: Usage
  • Charge model: Per unit
  • List price: $5
  • UOM: Million calls

Your customer is interested in subscribing to your monthly plan for 12 months. You can create this 12-month subscription for the customer through the Zuora UI or REST API.

Zuora UI

Follow the steps as described in Create a subscription

Select the desired product for this order. 

Create prepayment subscription.png

Update the charges for this product if needed. 

REST API

Use the Create an order operation to create the subscription. 

Determine the values of the following fields specific to prepayment charge and drawdown charge in the new subscription:

Sample request body:  Create a 12-month termed prepayment subscription for an existing customer.  

Request POST    /v1/orders
Request body
{
   "orderDate": "2022-01-01",
   "existingAccountNumber": "A00000010",
   "subscriptions": [
       {
           "orderActions": [
               {
                   "type": "CreateSubscription",
                   "triggerDates": [
                       {
                           "name": "ContractEffective",
                           "triggerDate": "2022-01-01"
                       },
                       {
                           "name": "ServiceActivation",
                           "triggerDate": "2022-01-01"
                       },
                       {
                           "name": "CustomerAcceptance",
                           "triggerDate": "2022-01-01"
                       }
                   ],
                   "createSubscription": {
                       "terms": {
                           "initialTerm": {
                               "period":12,
                               "periodType":"Month",
                               "termType": "TERMED"
                           },
                           "renewalSetting":"RENEW_WITH_SPECIFIC_TERM",
                           "renewalTerms":[{
                               "period":"12",
                               "periodType":"Month"
                           }]
                       },
//Add the prepayment charge and the drawdown charge to the subscription: 
                       "subscribeToRatePlans":[{
                           "productRatePlanId":"402880ed7e2ffb23017e30021f420011",
                           "chargeOverrides":[{
                               "productRatePlanChargeId":"402880ed7e2ffb23017e3002a1c60013",
                               "prepaidQuantity": 10,
                               "validityPeriodType": "Month"
                           },
                           { 
                               "productRatePlanChargeId":"4028818a7e2d8366017e2dae5980001e",
                               "drawdownRate":1
                           }
]
                       }]
                   }
               }
           ]
       }
   ],
   "processingOptions": {
       "runBilling": false,
       "collectPayment": false
   }
}

You can view the customer’s prepaid balance through the Zuora UI or Data Query

Notes and limitations

  • Evergreen term type is not supported. 
  • The subscription term should be one or multiple times of the validity period. See Create subscription with partial period for an exception. 
  • The subscription term type cannot be Day or Week when the validity period of the prepayment charge in it is Subscription Term.
  • If the Contract Effective Date and the Term Start Date are different, the difference must be one or multiple times of the validity period.