Skip to main content
POST
Preview a subscription update
Click the base URL in the API playground and select the Sandbox host for test data or the Production host for live data. Use credentials from the same environment.

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Path Parameters

subscriptionId
string<uuid>
required

The unique identifier of the subscription whose update will be previewed.

Body

application/json
planIdentifier
string
required

The identifier of the proposed new plan.

Example:

"new_plan_enterprise"

chargePeriod
enum<string>
required

The proposed charging period for the subscription.

Available options:
ONE_TIME,
MONTHLY,
YEARLY,
WEEKLY,
DAILY,
TWENTY_EIGHT_DAYS,
THREE_MONTHS,
SIX_MONTHS
Example:

"YEARLY"

features
object[] | null

List of proposed features and quantities for the subscription.

Example:
ipAddress
string | null

The IP Address of the customer, for location-based pricing.

Example:

"103.154.35.20"

trialEnd
string | null

The proposed trial end. Accepts "now" or a future ISO 8601 datetime.

Example:

"2027-12-31 23:59:59"

Response

The proposed update was priced successfully; no changes were applied.

currency
string

ISO 4217 currency code for all amounts in the response.

Example:

"USD"

recurringAmount
number

The subscription's new recurring amount in the currency's major unit.

Example:

50

recurringAmountUnits
integer

The subscription's new recurring amount in the currency's minor unit.

Example:

5000

amountChargedImmediately
number

Amount that would be charged immediately in the currency's major unit. This is non-zero only when the update uses immediate invoicing.

Example:

39.5

amountChargedImmediatelyUnits
integer

Amount that would be charged immediately in the currency's minor unit.

Example:

3950

nextInvoice
object | null

Preview of the next provider invoice. null for billing methods that do not provide invoice previews.