Subscription groups
Switch a subscription to another plan
https://rcur.app/api/v2/subscriptions/{subscriptionId}/plan
Switching right away prorates what is left of the running period, starts a new period today and charges the difference through the mandate. Switching at the next payment keeps the current plan until then. A switch planned earlier is replaced.
Requires your API key as Authorization: Bearer <key>. See authentication.
Path parameters
-
subscriptionIdstring required
Request body
application/jsonThe plan to switch to and when. Check the amount first with GET on the same path.
-
planstringId of the template to switch to, from the options
-
timingstringimmediate prorates the running period and charges the difference now; next_payment keeps the current plan until the next payment
One of
immediatenext_payment -
settlementnumberOptional. The amount you expect to be charged for a switch right away; the switch is refused when it is different now
Responses
201 The subscription is switched, or the switch is planned SubscriptionPlanChange object
-
statusstring requiredOne of
scheduledappliedcancelled -
timingstring requiredOne of
immediatenext_payment -
directionstring requiredOne of
upgradedowngradeinterval -
fromstring required -
tostring required -
effective_onstring requiredToday for a switch right away, otherwise the date of the next payment
-
currencystring -
old_amountstring -
new_amountstring -
creditstringCredit for the unused part of the running period (switch right away)
-
settlementstringAmount charged for the switch (switch right away)
-
credit_leftstringCredit that stays on the subscription for the next payments
404 Resource not found Error object
-
statusinteger required -
errorstring required
422 Validation error ValidationError object
-
statusinteger required -
errorstring required -
fieldsobject