Change offer

Move a subscription to another offer.

Private API key only

Call this endpoint from your server with your private API key in the x-api-key header. A public key is refused with 401 and code 111022.

What changes

  • The period already paid runs to its end.
  • The next rebill is computed on the calendar of the new offer, from the end of that period, at the price of the new offer.
  • If the new offer has prorata enabled and a billing day, the first rebill is prorated.
  • If no rebill has been collected yet on the subscription, the discount of the new offer applies.
  • A paused subscription is priced on the new offer when it resumes.

Refused when

  • the subscription is not started, active, past_due or paused;
  • a rebill is being charged (409: retry once it has settled);
  • a failed rebill is still being retried;
  • the subscription already has this offer;
  • the new offer is inactive, has ended, or has another currency (open a new subscription instead);
  • the subscription has already reached the maximum number of billing cycles of the new offer;
  • the next rebill would fall after the end date of the new offer.

Result

The response gives the new offer and the next rebill. See Subscription lifecycle, Failed rebills and retries, Update the payment method.

Examples

"Move to another offer" is the request and response shown in the panels on the right.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Defaults to 6a1f3c9e8b2d4a7f1c0e5b93

Identifier of the subscription (subscription_id).

Body Params
string
required
Defaults to 6a0e8f514c2b7d9e1a3f6c48

Identifier of the new offer. No other field is accepted.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json