# In app subscriptions

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


**Important:**

These APIs operate asynchronously. When you receive a successful response code from an API call, it indicates only the successful submission of your request, not the completion of the operation.

Using In-app Subscriptions, you can track subscriptions you sell and service via in-app purchase channels such as Apple's App Store and Google's Play Store. Call [this API](/docs/api/in_app_subscriptions/process-purchase-command) to notify Chargebee of new subscription purchases. Chargebee responds by creating corresponding subscriptions. You can make the API call directly from the client-side application or from your server. In the case of the Apple App Store and Google Play Store integration, you can also configure Chargebee to receive server notifications from [Apple](https://developer.apple.com/documentation/appstoreservernotifications) and [Google](https://developer.android.com/google/play/billing/rtdn-reference#sub) to keep subscriptions up-to-date.

**Note:**

After creating a subscription in Chargebee using the [process purchase command](/docs/api/in_app_subscriptions/process-purchase-command) API, Chargebee manages it in real-time using notification events from [Apple](/docs/api/in_app_purchase_events) or [Google](/docs/api/in_app_purchase_events). To enable these notifications, generate a notification URL using these links - [Apple](https://www.chargebee.com/docs/2.0/mobile-app-store-product-iap.html#connection-keys_notification-url) and [Google](https://www.chargebee.com/docs/2.0/mobile-playstore-notifications.html) and configure it in their respective stores.

**In-app subscriptions are read-only**

The subscriptions created via the [Process Purchase Command API](/docs/api/in_app_subscriptions/process-purchase-command) are managed by Apple or Google in response to actions taken by your subscribers via their respective accounts. Chargebee only keeps track of these subscriptions: creating and modifying them in response to events happening against the original subscriptions. Consequently, these subscriptions cannot be modified by you via the Chargebee admin console or the [Subscriptions API](/docs/api/subscriptions).

## Sample In app subscription

```json
{
  "subscription_id": "1000000807994664",
  "customer_id": "customer-123",
  "plan_id": "app_store_plan_id-USD"
}
```

## In app subscriptions attributes

## Input Parameters

- `subscription_id` (required, string, max chars=100)
  The `id` of the [subscription](/docs/api/subscriptions/subscription-object#id) for which the receipt was sent.

- `customer_id` (optional, string, max chars=100)
  The `id` of the [customer](/docs/api/customers/customer-object#id) object to which the subscription belongs.

- `plan_id` (optional, string, max chars=100)
  The `plan_id` of the of the subscription.

- `store_status` (optional, enumerated string)
  The status of the subscription for the store
  Possible enum values:
    - `in_trial`
      When the subscription is in trial.
    - `active`
      When the subscription is active.
    - `cancelled`
      When the subscription is cancelled.
    - `paused`
      When the subscription is paused.

- `invoice_id` (optional, string, max chars=100)
  The `id` of the invoice generated in Chargebee

