Migrates a subscription to a different product.
In order to create a migration, you must pass the product_id or product_handle in the object when you send a POST request. You may also pass either a product_price_point_id or product_price_point_handle to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription.
Subscriptions should be in the active or trialing state in order to be migrated.
(For backwards compatibility reasons, it is possible to migrate a subscription that is in the trial_ended state via the API, however this is not recommended. Since trial_ended is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.)
Full documentation on how to record Migrations in the Advanced Billing UI can be located here.
Important note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product.
When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication.
See the 3D Secure Post-Authentication Flow article in the product documentation to learn how to manage the redirect flow.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The Chargify id of the subscription.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/1/migrations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "migration": { "product_id": 3801242, "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": true }}'