> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/billing/choose-plan.md).

# Choose plan

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: iOS. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/billing/choose-plan.md).
{% endhint %}

Buy a Snapfix plan for one of your sites as an App Store in-app purchase. The screen offers the two products it asks the App Store for, "Snapfix - Fix" and "Snapfix - Plan"; the code also knows "Per User" and "Snapfix Pro", but never asks for them \[[ASK-145](https://github.com/snapfix/docs/blob/main/ASK.md#ask-145-should-the-ios-plan-screen-sell-per-user-and-snapfix-pro)] (ios @ aa31967ac8, `SnapFix/IAPPlanVC.swift:26-30`, `:77`).

* **Where:** iOS: side menu "Settings" opens the profile pages on their "Settings" tab ([Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md)), whose "Subscriptions" row opens this screen full screen at its first card (`SnapFix/New Profile/Profile Settings/ProfileSettingVC+Subscription.swift:162-187`; `SnapFix/Storyboards/ProfileSB.storyboard:1837-1901`). The row shows only when the paywall answer has a site with in-app purchase on (`SnapFix/New Profile/Profile Settings/View Model/ProfileSettingViewModel.swift:188-199`). The "Settings" tab in the task tab bar opens the group settings, not this screen (`SnapFix/Storyboards/NewHomeSB.storyboard:2821-2828`).
* **Who:** signed-in users who see the row. The sites to buy for come from the [paywall](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actionpaywall) answer, which lists the sites where the user is in a group or is an admin, so a member who does not administer a site can start a purchase for it \[[ASK-144](https://github.com/snapfix/docs/blob/main/ASK.md#ask-144-who-may-buy-an-in-app-plan-for-a-site-and-who-sets-the-in-app-purchase-switch)]. Only sites whose customer type is `0` or churned can be bought for (`SnapFix/SelectParentSubscription.swift:123-136`).
* **Feature:** [In-app purchase](https://docs.snapfix.com/product/features/billing/in-app-purchase.md)

No live pass covered this screen; the passes check the web only. The rest of this page is from the code.

Other code that opens this screen never runs:

* The planner tab's lock: the task tab bar opens this screen for a tab item tagged 100, and no tab item has that tag \[[ASK-146](https://github.com/snapfix/docs/blob/main/ASK.md#ask-146-is-the-ios-planner-tab-lock-still-meant-to-exist)] (`SnapFix/TaskTabVC.swift:336-346`).
* The free-limit popup (`SubscriptionPopupVC`): its only opener is commented out, and the check before it always returns false (`AppUtility.swift:3876-3887`).
* The older "My Settings" page (`MySettingsVC`): nothing opens it any more.
* The "Per User" info button on the Settings tab: it sits in an older subscription block that the storyboard hides and nothing shows ([Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md)). That block's "Per User" and "Snapfix Pro" rows also have "Buy Monthly" buttons with no action \[[ASK-145](https://github.com/snapfix/docs/blob/main/ASK.md#ask-145-should-the-ios-plan-screen-sell-per-user-and-snapfix-pro)] (`ProfileSB.storyboard:1619`, `:1705-1772`).

## Layout

1. **Header.** A back button and the title "Choose your plan" (`SnapFix/Localization/en.lproj/Localizable.strings:322`).
2. **Plan cards.** A row of cards that swipes sideways, "Snapfix - Fix" first, then "Snapfix - Plan", each only when the App Store returns it. Each card shows:
   * the plan's name;
   * its price as the store's currency symbol, a space, the amount and " / Month" (and " / Year" for a yearly price, which neither plan has) (`IAPPlanVC.swift:83-117`);
   * a description from the string file, which starts "Best for: Smaller teams and properties who want to get started with Snapfix and manage tasks more efficiently." (Fix) or "Best for: Teams or properties that need more flexibility, structure, and visibility across users and departments." (Plan) and lists the plan's features (`Localizable.strings:1963`, `:1975`);
   * "Buy Monthly", and "Buy Annual" only for a plan with a yearly price, so never today;
   * "By continuing, you are agreeing to these Terms. See the Privacy, Fair Use, Acceptable Use and Security policies.", where each name opens its page on snapfix.com (`SnapFix/SelectPlanIAPCell.swift:22-72`).
3. **Restore.** "Already purchased?" and "Restore Purchases" (`Localizable.strings:1988-1989`).

## Inputs

| Field | Type              | Required               | Default | Rules and messages                                                                                                                                          |
| ----- | ----------------- | ---------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Site  | Choice in a sheet | Yes, before a purchase | None    | The user's sites from the paywall answer, sorted by name. A site whose customer type is neither `0` nor churned gets the full-access alert and no purchase. |

## Actions

| Action                         | Who                  | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | API                                                                                                        |
| ------------------------------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Open the screen                | Signed-in user       | Shows "Please Wait..." and asks the App Store for the two products; the cards appear when it answers. When the Settings page passed no sites, the screen asks for them itself. If the store request fails, "Please Wait..." stays up and no cards show. The screen adds itself as a payment queue observer each time it opens and never removes itself (`IAPPlanVC.swift:61-80`, `:362-366`).                                                                                                                                                  | [`POST ?action=paywall`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actionpaywall) |
| "Buy Monthly" or "Buy Annual"  | Signed-in user       | Offline: the alert "Error" with "You must be connected to the Internet to carry out this task. Please connect and try again." Online: opens the site sheet.                                                                                                                                                                                                                                                                                                                                                                                    | None                                                                                                       |
| Pick a site                    | Signed-in user       | A site whose customer type is `0` or churned closes the sheet and starts the purchase: "Please Wait..." shows, the product is loaded, and Apple's purchase sheet opens. If the product cannot be loaded, "Something went wrong. Please try again." opens and "Please Wait..." stays up; if the device does not allow payments, nothing more happens and "Please Wait..." stays up too (`IAPPlanVC.swift:222-268`). The purchase carries the ID of the user's group membership in that site, read from the device (`AppUtility.swift:249-261`). | None                                                                                                       |
| Purchase completes             | Signed-in user       | Closes the screen, logs an analytics event, has Apple check the App Store receipt and finishes the transaction. The receipt check sends the app's App Store shared secret; its result sets a flag that only commented-out code reads, and posts an in-app notification. Nothing about the purchase goes to Snapfix's servers \[[ASK-143](https://github.com/snapfix/docs/blob/main/ASK.md#ask-143-how-does-an-app-store-purchase-reach-a-sites-plan)] (`IAPPlanVC.swift:275-308`, `AppUtility.swift:3897-3935`).                               | None                                                                                                       |
| Purchase fails or is cancelled | Signed-in user       | "Purchase cancelled!", for every failure, not only a cancel (`IAPPlanVC.swift:309-315`).                                                                                                                                                                                                                                                                                                                                                                                                                                                       | None                                                                                                       |
| "Restore Purchases"            | Signed-in user       | Offline: the same "Error" alert. Online: asks the App Store to restore completed purchases and finishes them. Nothing shows, whatever the result (`IAPPlanVC.swift:351-360`).                                                                                                                                                                                                                                                                                                                                                                  | None                                                                                                       |
| Terms links                    | Anyone on the screen | Open the Snapfix terms, fair use, acceptable use, security and privacy pages in the browser.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | None                                                                                                       |
| Back                           | Anyone on the screen | Closes the screen.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | None                                                                                                       |

* The Settings tab also asks the App Store to restore completed purchases each time it loads, and shows nothing (`ProfileSettingVC+Subscription.swift:15-17`, `:307-309`).
* "Per User" would skip the site sheet and buy for the site selected in the app, or show the full-access alert, but its card never shows (`IAPPlanVC.swift:203-211`).

## States

* **Loading:** "Please Wait..." while the products load, and again while a purchase starts. The cards stay hidden until the store answers.
* **Empty:** when the App Store returns neither product, the screen shows no cards and no message. The built-in list of plans in the code never shows in its place (`IAPPlanVC.swift:127-153`).
* **Error:** the alerts in [Actions](#actions): offline, product not found and "Purchase cancelled!". A failed product request shows nothing.
* **No permission:** users with no site that allows in-app purchase do not see the Settings row. Sites that already have full access are refused in the site sheet.
* **Offline (mobile):** the Settings row, the buy buttons and "Restore Purchases" check the connection first; loading the products does not.

## Dialogs and sheets

* **Site sheet:** the header "Select preferred Snapfix account for purchase", set in the code in English, and one row per site with its image and name (`SelectParentSubscription.swift:100-122`).
* **Full-access alert:** "The '{site}' Account you are currently using already has full access. You do not need to purchase a separate ‘{plan}’ subscription.", with "Ok"; `{plan}` is the card's name (`Localizable.strings:28`). The sheet stays open.
* **Alerts:** "Purchase cancelled!" and "Something went wrong. Please try again." with "Ok", and the offline alert "Error" (`Localizable.strings:1227`, `:1511`, `:820`).
* **Apple's purchase sheet:** the system sheet that takes the payment.

## Platform differences

* **Android:** the plan screen `InAppPlanActivity` is in the manifest, but every place that opened it is commented out, so Android sells no plans in the app \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] (android @ 86068bfeea, `app/src/main/AndroidManifest.xml:187`; `app/src/main/java/gmail/com/snapfixapp/activity/BusinessListingActivity.java:958-966`, `app/src/main/java/gmail/com/snapfixapp/fragment/JobChatFragment.java:5085-5091`, `:10537-10543`, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:385-395`, `app/src/main/java/gmail/com/snapfixapp/dialog/TaskLimitReachedDialog.kt:70`). Its Settings tab shows "Upgrade your Snapfix" instead, under the same paywall condition; a tap opens the "Upgrade your Snapfix" sheet, whose "Get in touch" opens <https://snapfix.com/sales> ([Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md); `MyProfileActivity.kt:798-801`, `:2521-2545`, `app/src/main/java/gmail/com/snapfixapp/bottomSheet/UpgradeSnapfixBottomSheet.kt:33-36`). The older rows with "Buy Monthly" are commented out of the layout (`app/src/main/res/layout/layout_content_profile_settings.xml:399-532`).
* **Free-limit dialogs:** on free or churned sites over the free limit, the web and Android refuse task status changes; iOS never does, because its check returns false first \[[ASK-20](https://github.com/snapfix/docs/blob/main/ASK.md#ask-20-should-ios-enforce-the-free-plan-limit-on-status-changes)]. Android's dialog button "See subscriptions options" opens <https://snapfix.com/sales> (`TaskLimitReachedDialog.kt:67-72`); the web's opens the pricing page ([Your subscription](https://docs.snapfix.com/how-the-apps-work/screens/billing/subscription.md#dialogs-and-sheets)).
* **Web:** no in-app purchase. Sites pay through Stripe: [Your subscription](https://docs.snapfix.com/how-the-apps-work/screens/billing/subscription.md) and [Snapfix payment](https://docs.snapfix.com/how-the-apps-work/screens/billing/payment-page.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/billing/choose-plan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
