changeSubscription

Upon opening Connect, the user will be directed to the 'Add Data' page where they have the option to select a different plan or purchase an add-on. Upon successful purchase, if a callbackUrl was provided, users will be redirected back to it when clicking the Continue button.

changeSubscription.jpg

The request expects a changeSubscription object that defines the subscription to change.

Creating a Connect Session with changeSubscription intent

$ curl --request "POST" \
--url "https://api.gigs.com/projects/${GIGS_PROJECT}/connectSessions" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${GIGS_TOKEN}" \
--data '{
  "callbackUrl": "https://example.com",
  "intent": {
    "type": "changeSubscription",
    "changeSubscription": {
      "subscription": "sub_0U32VAxJ0Z7P8Y40mBAnOP9LPhEr"
    }
  },
  "user": "usr_0U2ViuFW0Z7P8Y2S1L76mfADMT6m"
}'

Note: Please confirm that the subscription actually offers alternative plans and/or purchasable add-ons. Redirecting the user to a subscription without any options for changes or add-ons will cause Connect to open in the change plan view without displaying any alternative plans or add-ons. This might confuse users.

Where to go from here