Cancel application subscription

Flow

When users uninstall an app, a cancel subscription flow should be implemented

Step by step

Uninstall app

The user clicks on uninstall app in the app market

Uninstall webhook

The billing app should listen to the webhook signaling an uninstall app event. More about the app uninstall webhooks can be found here: https://developers.intandem.tech/reference/app-uninstalled

Stop payments

The billing app cancels the user subscription payment

Update Subscription

The billing app updates inTandem that the app subscription has expired.

An example of a subscription expiration API call:

curl --location --request PUT 'https://api.vcita.biz/business/subscriptionsmng/v1/subscriptions/{subscription id}' \
--header 'Authorization: Bearer {business API token}' \
--header 'Content-Type: application/json' \
--data '{
  "subscription":
  {
    "purchase_state": "expired"
  }
}'

Response example:

{
  "success": true,
  "data": {
    "subscription":
         {
           "is_active": true,
           "uid": "123",
           "display_name": "Quickbooks",
           "updated_at": "2024-07-31T06:36:30.828Z",
           "created_at": "2024-07-31T06:36:30.828Z",
           "purchasable_uid": "1234",
           "purchase_state": "exipred",
           "cancellation_date": "2024-07-31T06:36:30.828Z",
           "expiration_date": "2024-07-31T06:36:30.828Z",
           "buyer_uid": "12345",
           "business_uid": "123456",
           "purchase_price": 10,
           "purchase_currency": "USD",
           "payment_type": "monthly",
           "bundled_from_subscription_uid": ""
        }
  }
}