Premium

Switches a running subscription to a longer term, charged now; the paid days left are kept on top. Stripe completes it or returns the page to confirm the payment at, PayPal returns an approval url. Rejections carry a slug such as term_switch_price_changed when the price shown is no longer the price charged.

Changed on
post/api/premium/subscription/{externalId}/term

Request

  • Base URL
    https://sky.coflnet.com (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header Authorization
    • or API key in header GoogleToken

Path parameters

externalId, string required

External id of the subscription as listed by the subscription endpoint

Request body

SubscriptionTermSwitchArgs required

Body of a request to switch a subscription to a longer term.

weeks, integer required

The new term in weeks (13 or 52), one of the offered terms.

declaration, SubscriptionDeclarationArgs

The user's early performance declaration for a subscription checkout. Same fields as the declaration of Coflnet.Sky.Api.Models.PurchaseArgs; the legal texts are filled in by the server.

expectedChargedNow, number double nullable

The price shown to the buyer (chargedNow of the chosen term). A switch that would charge another amount is refused.

Response

OK

SubscriptionTermSwitchResponse required

Outcome of a switch to a longer term.

switched, boolean required

True once the new term is paid and granted.

status, string nullable

completed, payment_required, approval_required or processing.

approvalUrl, string nullable

Where to send the buyer to pay or approve (Stripe or PayPal), null otherwise.

weeks, integer required

Length of the new term in weeks.

productSlug, string nullable

Slug of the new plan.

chargedNow, number double required

What is charged now.

currency, string nullable

Currency of the prices (ISO code).

taxTreatment, string nullable

How tax relates to the prices: included, net or none.

promotionCode, string nullable

Code of the promotion applied, null without one.

accessUntil, string date-time required

When the access ends once the switch is paid.

firstRenewalAt, string date-time required

When the first 4 week cycle after the new term is charged.

renewsAsProductSlug, string nullable

Slug of the 4 week plan the subscription continues as.

renewalPrice, number double required

What each 4 week cycle after the new term charges.

renewalWeeks, integer required

Length of the continuation cycle in weeks.

Changes