Subscriptions

Preview a subscription price change

Changed on

Shows what moving a subscription to another price of the same product would charge the buyer now, with proration for the rest of the current period. Pass the returned proration_date to POST /subscriptions/{id}/change_price so the charge matches this preview. Refuses with the reason the price is not eligible.

get/subscriptions/{id}/price_change_preview

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Query parameters

price_variant, string required

The price variant (price_...) to move to. It must be a recurring, fixed price of the same product and currency.

Response

The proration preview

object required
object, 'subscription_price_change_preview' required
price_variant, string required

The price variant previewed

amount_due, integer required

What the buyer is charged now, in the smallest currency unit

currency, string required
proration_date, integer nullable required

Unix time the proration was priced at. Null when the price bills on a different interval, which restarts the billing cycle and is priced when the change happens.

next_billing_at, string date-time nullable required

Changes