Skip to content
Navigation

Schedules a subscription to renew on a lower tier or a shorter period from the end of its paid period; its current price takes the change back. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.

PUT
https://api.sherpo.io/customer/v1/stores/{store}/subscriptions/{subscription}/plan

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    A hostname of the store.

  • subscription
    string
    required
    minLength: 1

Request body JSON required

  • price
    object
    required

    The price it renews on from the end of its paid period; its current price takes a scheduled change back.

    • id
      string
      required
      maxLength: 512 · minLength: 1

Returns

200

Schedules a subscription to renew on a lower tier or a shorter period from the end of its paid period; its current price takes the change back. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.

JSON
  • display_status
    string
    required

    Its status as people read it: cancelling while it bills and is set to stop.

  • next_event
    required

    What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.

    One of the following:

    • object
    • null
  • renews_on_card
    boolean
    required

    Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.

  • actions
    object
    required

    The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.

    • cancel
      object
      required
      • period_end
        boolean
        required

        Stopping at the period's end.

      • now
        boolean
        required

        Its cancel ends it at once, every payment of it refunded.

    • resume
      boolean
      required

      Taking a stop back.

    • change_plan
      boolean
      required

      Scheduling another plan from plan_changes, or keeping the current one.

  • plan_changes
    array of
    object
    required

    The prices changeSubscriptionPlan schedules for it, ordered as offers are; empty unless actions.change_plan.

    • price_id
      string
      required
    • name
      string
      required

      The price's title, else its tier's name.

    • tier
      object
      required
      • id
        string
        required
      • product_id
        string
        required
      • rank
        number
        required
      • name
        string
        required
    • amount
      number
      required
    • currency
      string
      required
    • exponent
      required

      One of the following:

      • number
      • null
    • period
      object
      required
      • unit
        string
        required
      • multiplier
        number
        required
    • autorenew
      boolean
      required

      Whether the plan it schedules renews past its first period.

  • product
    required

    One of the following:

    • object
    • null
  • plan
    required

    One of the following:

    • object
    • null
  • current_period
    required

    Its latest paid period, whose end is when the next payment is due; null when none is paid.

    One of the following:

    • object
    • null
  • next_charge
    required

    What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it renews on; null unless it renews. A current_period that is a lead_in makes it the first.

    One of the following:

    • object
    • null
  • instrument_id
    required

    The saved payment method its renewals charge, as getBillingProfile names it.

    One of the following:

    • string
    • null
  • renews_here
    boolean
    required

    Whether the store bills it here, so its plan and card can change.

  • scheduled_change
    required

    The plan it renews on from effective_at, the end of its paid run, as the customer scheduled; null for none.

    One of the following:

    • object
    • null
  • id
    string
    required
  • product_id
    string
    required
  • status
    string
    required
  • cancel_at_period_end
    boolean
    required
  • cancel_reason
    required

    Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.

    One of the following:

    • string
    • null
  • cancel_code
    required

    How the store stopped it, when no one gave a reason in words: refund (its payments were refunded), dispute (a payment was disputed), upgraded (an upgrade replaced it), account_erased (the customer's account was erased) or seller_ended (the seller ended it); null otherwise.

    One of the following:

    • string
    • null
  • created_at
    required

    One of the following:

    • string
    • null
  • ended_at
    required

    One of the following:

    • string
    • null
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • detail
    string
    required
  • code
    optional
    string
  • context
    optional
    object
  • reached_core
    optional
    boolean
  • core_answer
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close