PreviewOptions
Use the PreviewOptions object with the amend() and subscribe() calls to specify whether the call should return an actual subscription or amendment, or a preview of what the subscription or amendment would be if activated. This is useful when you want to see what charges would be for a customer considering an order (such as a new order, upgrade/downgrade, adding a product, or adding additional units). You can also use this to debug during implementations or when writing new business logic with the Z-Commerce API.
Supported Calls
Fields
All field names are case sensitive.
Name | Required? | Type | Allowable Values | Description |
---|---|---|---|---|
EnablePreviewMode | No | Boolean | True or False | Specifies whether the call should create a subscription/amendment, or whether it should return a preview of the order. Used with either NumberOfPeriods or PreviewThroughTermEnd. |
NumberOfPeriods | No | Integer | Positive integer greater than 0 | Specifies the number of periods to show in a preview. Usage Notes:
|
PreviewThroughTermEnd | No | Boolean | True or False | Requests to preview the charge through the end of the subscription term. This option is valid for termed subscriptions only, not Evergreen subscriptions. Usage Notes:
|
PreviewType | No | String | InvoiceItem ChargeMetrics InvoiceItemChargeMetrics | The type of preview you will receive from a preview request. Usage Notes:
|
IncludeExistingDraftInvoiceItems | No | Boolean | true or false | Specifies whether to include draft invoice items in amendment previews. Values:
Usage Notes: This field is only applicable if the |