Upgrade Subscription
POST/UpgradeSubscriptionNow
This endpoint allows for calculation of the price of a prorated product upgrade and then processes the transaction immediately using the Stripe API. It is intended to be used by an application to give the buyer an exact representation of the price they will pay to review without being charged. This method requires that the tenant already owns a time‐based subscription product and is choosing a higher priced time‐based subscription product.
The remaining value of an existing subscription period is used to offset the price of the upgraded subscription period. For example, imagine 10 days of a 30‐day period of an owned license costing $100 has elapsed and the upgrade is to a monthly product costing $500. The fraction of the remaining period is (30 – 10) / 30 = 0.67. The remaining value of the owned product is 0.67 * $100 = $66.67.
The prorated price of the upgrade will be $500 ‐$66.67 = $433.33. Upon execution of this calculation the owned product period is reduced to the execution date/time and the status is set to Partial Refund and the upgraded product is effective immediately.
- OwnedProductId - is the existing subscription product identifier owned by this Tenant
- UpgradeProductId - is the new, higher‐priced subscription product that will be purchased to replace
- StripeCustomerId - is the customer id value identifying this Tenant to Stripe.
- PaymentMethodId - is the preferred payment method id for this Tenant for this purchase. If omitted an attempt will be made to use the default payment method defined within Stripe for the specified StripeCustomerId. If no such default is defined within Stripe for this customer an error will be returned.
- SavePaymentMethodToCustomer - will indicate that we should persist the specified payment method for this purchase back to the Stripe account under the StripeCustomerId context provided.
- TenantId - identifies the tenant that exists within the context of the SystemTenantId context identified by the api key provided in the header. This is also used to invoke the GetTenant webhook to retrieve a list of TenantUsers to notify upon transaction completion.
- Qty - is the quantity of this product desired. If omitted this defaults to 1. If provided this number must be less than or equal to 100.
- Autorenew - specifies the intent to renew this product in perpetuity. It has no effect on the immediate purchase.
- Timezone - specifies the Tenant’s preferred time zone in order to express periods of time in their context. If omitted this will default to Eastern Standard Time. If specified it must be one of the following values: Eastern Standard Time, Central Standard Time, US Mountain Standard Time, Mountain Standard Time, Pacific Standard Time or Alaskan Standard Time.
- PreferredPaymentDayOfMonth - allows a tenant to specify the day of the month on which subsequent renewal payments are processed. If omitted the day of the month of the EffectiveAt date will be used.
- NotifyTenantUsers - will execute the Get Tenant webhook and notify related TenantUsers (defaults to false).
Request
Responses
- 200
OK