> 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/payment-page.md).

# Snapfix payment

{% 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: web. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/billing/payment-page.md).
{% endhint %}

A customer opens a payment link from the Snapfix team, signs in, picks the Snapfix account to pay for, chooses the package's items, adds invoice details and pays by card or SEPA Direct Debit through Stripe.

* **Where:** web, the web\_payments app at package.snapfix.com. `/single/:id` sells one price (`:id` is the price's ID) and `/multi/:id` a package with optional items (`:id` is the package's ID) (web\_payments @ 7c2c3ddffd, `src/app/app-routing.module.ts:6-7`). Any other path shows "404" and "Page not found" (`:8`). The Snapfix team sends the link. The production build uses Stripe's live mode and the other builds its test mode (`src/environments/environment.prod.ts:7`, `src/environments/environment.ts:11`).
* **Who:** anyone with the link. A `single` link needs a sign-in first. A `multi` link needs one too, unless the package has its own Stripe customer: then "Continue to Payment Screen" skips the sign-in. Signed-in buyers pay for one of their sites where they are an admin.
* **Feature:** [Payment links](https://docs.snapfix.com/product/features/billing/payment-links.md)

No live pass opened this page: the passes do not open payment pages, and the QA site has no payment link. The rest of this page is from the code.

Single-price links cannot be paid today: the page keeps no package for them and sends the package ID as the text "undefined", which the server refuses with "invalid package".

## Layout

1. **Header.** "< Back to Snapfix.com", a link to the marketing site, above the card; in the card, the Snapfix logo and a progress bar that fills from 0 to 100 as the steps advance (`src/app/pages/auth/auth.component.html:1-5`, `src/app/pages/auth/pay/pay.component.html:2-5`). The page also shows the app version, with "TEST" before it in every build except production (`auth.component.html:9-12`).
2. **Title.** "Your Snapfix subscription", or "Your Snapfix item" ("Your Snapfix items" when the package has more than one item) when no price recurs. A `single` link, and a `multi` link where the buyer signs in on the page, always read as a subscription. The title is hidden on the sign-in, register and verification steps. "Package not found" replaces it when the link cannot be used (`pay.component.html:10-18`).
3. **Step.** One step at a time (see [Steps](#steps)), with a back arrow where the step allows going back.
4. **Footer.** "Need help?" and "Contact support", a link to the support site, and "Log out" while someone is signed in, except on the sign-in and register steps (`pay.component.html:191-200`).

### Steps

```mermaid
flowchart TD
    A["Open the link"] --> B{"Link type"}
    B -->|"multi"| C["Read the package"]
    C -->|"signed in"| E["Package items"]
    C -->|"not signed in"| L["Sign in"]
    B -->|"single, signed in"| R["Read the price"]
    B -->|"single, not signed in"| L
    L -->|"no account"| G["Register: stops, no code is sent"]
    L -->|"signed in, multi"| E
    L -->|"signed in, single"| R
    L -->|"Continue to Payment Screen"| E
    R --> F["Choose Snapfix account"]
    E -->|"signed in"| F
    E -->|"guest"| H["Invoice details"]
    F --> H
    H --> I["Payment"]
    I --> J["Success"]
```

1. **Sign in.** "Thank you for choosing Snapfix." On a package with its own Stripe customer, the button "Continue to Payment Screen" comes next, then "OR". Then "If you wish, you can login or register for the Snapfix app as part of the payment process.", although only those packages can be paid without signing in. Then "Email address", the note "Note: If you use a phone number to log into Snapfix, go here to add your email address." with a link to the web app, and "Continue". An address whose check returns an email shows "Log into your Snapfix account." and "Password"; any other answer opens the register step (`pay.component.ts:72-93`, `pay.component.html:32-113`).
2. **Register.** "No Snapfix account found, please register first.", the fields in [Inputs](#register), "Register", and "By signing up you agree to our terms of service & fair usage policy." with links to both pages. "Register" asks for a verification code, but both sign-up routes return before doing any work, so no code is sent, a notice shows the server's message, and the verification step never opens.
3. **Package items** (`multi` only). "Configure and review your subscription ." ("choices" in place of "subscription" when no item recurs), one row per item, the totals and "Continue".
4. **Choose Snapfix account** (signed in). "Choose your Snapfix account", "You are part of multiple Snapfix Accounts. Make sure to select the correct one you’d like to add the subscription to." (the sentence ends after "the correct one" when nothing recurs), the sites and "Continue", which stays disabled until a site is chosen. When the server returns one admin row and it is live, the page picks that site and skips the step (`src/app/pages/auth/pay/components/parent-list/parent-list.component.ts:53-64`, `parent-list.component.html:1-26`).
5. **Invoice details.** "Add your invoice details.", the fields in [Inputs](#invoice-details) and "Continue".
6. **Payment.** "Subscription start date" (on `multi` links that the page treats as a subscription), "Please provide your CC details" (card) or "Please provide your payment details" (SEPA), the payment fields, "Accept Terms and Conditions", the totals and the pay button.
7. **Success.** Replaces the steps; see [States](#states).

Back arrows: the password step goes back to the email; the register step to the sign-in; the payment step to the invoice details; the account step (on `multi` links) to the items. The invoice details go back to the items on a `multi` link where the page picked the site for the buyer, and to the account step otherwise, guests included; on a `single` link where the page picked the site there is no back arrow (`pay.component.ts:193-239`). The verification step has its own back arrow to the register form.

The page keeps the sign-in in the browser, so a buyer who signed in on an earlier visit skips the sign-in step. "Log out" and a successful payment both clear it (`pay.component.ts:170-187`).

## Inputs

### Sign in

| Field           | Type     | Required                             | Default | Rules and messages                                                                                                                                                                                           |
| --------------- | -------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| "Email address" | Email    | Yes                                  | Empty   | "Continue" stays disabled until the value is an email address. Enter also continues. The field locks once the password step shows.                                                                           |
| "Password"      | Password | Yes, once the address has an account | Empty   | "Login" stays disabled until both fields are filled. Enter also logs in. The eye button shows or hides the text. The field asks the browser for a new password, not the saved one (`pay.component.html:79`). |

### Register

| Field                     | Type                | Required | Default | Rules and messages                                                                                                                                                                                                                                                                                                                 |
| ------------------------- | ------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "First name", "Last name" | Text                | Yes      | Empty   | "Register" stays disabled while either is empty; no message shows.                                                                                                                                                                                                                                                                 |
| "Account name"            | Text                | No       | Empty   | Sent as the new account's name when filled.                                                                                                                                                                                                                                                                                        |
| "Phone number"            | Phone, with country | No       | Empty   | Shown only when the server's SMS sign-up switch is on ([`GET /web-gsm-status`](https://docs.snapfix.com/engineering-reference/api/auth.md)). The note under it reads "Phone phone number is only used for login, password reset and inviting new users."                                                                           |
| "Password"                | Password            | Yes      | Empty   | The check needs 8 characters or more, with a digit, a lowercase letter and an uppercase letter. The hint, "Must be 8 characters minimum, and contain at least one number and one uppercase letter.", leaves out the lowercase rule (`src/app/pages/auth/pay/components/pay-user-register/pay-user-register.component.ts:193-204`). |
| Updates checkbox          | Checkbox            | No       | Off     | "Snapfix can send me account and product updates via email", plus " or SMS" when the phone field shows. Sent as 1 or 0.                                                                                                                                                                                                            |

The verification step, which the page never reaches today, says "Verify your account" and where the code went, has the field "Enter code here", "Resend verification code" (blocked for 59 seconds after each request) and "Verify Account" (disabled below six characters), and a help popover (see [Dialogs and sheets](#dialogs-and-sheets)).

### Package items

| Field     | Type         | Required                      | Default                            | Rules and messages                                                                                                                                                                                                                 |
| --------- | ------------ | ----------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Each item | Checkbox row | Mandatory items are always on | Mandatory items on, the others off | A tap toggles an optional item. The row shows the item's name and its price times the quantity, with " / {interval}" for a recurring item (`src/app/pages/auth/pay/components/package-prices/package-prices.component.html:1-42`). |
| Quantity  | Stepper      | Only on editable items        | The item's default quantity        | "−" and "+" work only on a selected item, between the item's minimum and maximum. The number itself cannot be typed.                                                                                                               |

"Continue" stays disabled until at least one item is selected.

### Invoice details

| Field                                           | Type           | Required       | Default                                                 | Rules and messages                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------- | -------------- | -------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Snapfix business account"                      | Read-only text | Not applicable | The chosen site's name                                  | Shown to signed-in buyers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| "Address 1", "Address 2", "Postal code", "City" | Text           | No             | The chosen site's basic address, or its invoice address | No rules. The invoice address goes to the server only when "Address 1" is filled (`src/app/pages/auth/pay/components/pay-package-payment/pay-package-payment.component.ts:349-359`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| "Country \*"                                    | Select         | Yes            | The chosen site's country                               | No message; "Continue" stays disabled while it is empty. The United States, the United Kingdom and Ireland come first, then every country by name, those three included. Guests get the list from authpy, signed-in buyers from php-apis (`src/app/pages/auth/pay/components/pay-business-detail/pay-business-detail.component.ts:111-147`).                                                                                                                                                                                                                                                                                                                                                                                                  |
| "VAT"                                           | Text           | No             | Empty                                                   | Shown for countries that have a VAT type. An empty number passes; a typed one is checked as it is typed: US, Canadian, UAE, Australian and Indian numbers by the page's own patterns, every other country by an EU-style format check, with the country code added when it is missing (`pay-business-detail.component.ts:48-54`, `:95-109`). An invalid number marks the field and keeps "Continue" disabled. The placeholder shows an example for the country. Canadian and UAE numbers that are valid fail the check, and the Australian and Indian examples cannot pass their own checks. The help popover says a valid number is needed to continue, though the field is optional. The server sends any number to Stripe as an EU VAT ID. |
| "PO"                                            | Text           | No             | Empty                                                   | Shown next to "VAT", and sent, as the purchase-order ID, only where "VAT" shows.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### Payment

| Field                                   | Type          | Required         | Default                                         | Rules and messages                                                                                                                                                                                                                                                                                            |
| --------------------------------------- | ------------- | ---------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Subscription start date"               | Date          | Yes, where shown | Today                                           | Shown on `multi` links that the page treats as a subscription. Fixed and disabled when the package sets a start date; otherwise limited to the package's permitted days before and after today. A date outside the limits silently becomes tomorrow (`pay-package-payment.component.ts:102-117`, `:306-322`). |
| "Payment Card", "SEPA Bank Transfer"    | Buttons       | Not applicable   | Card, or SEPA when the package offers only SEPA | Shown only when the package offers both. "SEPA Bank Transfer" sets up a SEPA Direct Debit from the IBAN entered.                                                                                                                                                                                              |
| "Card number", "Expiration date", "CVC" | Stripe fields | Yes, for a card  | Empty                                           | Stripe checks each field; all three must be complete.                                                                                                                                                                                                                                                         |
| "IBAN"                                  | Stripe field  | Yes, for SEPA    | Empty                                           | SEPA countries only.                                                                                                                                                                                                                                                                                          |
| "Accept Terms and Conditions"           | Checkbox      | Yes              | Off                                             | "Terms and Conditions" links to <https://www.snapfix.com/terms>.                                                                                                                                                                                                                                              |

The pay button reads "Start your subscription" for a subscription and "Pay" otherwise. It stays disabled until the payment fields are complete, the box is ticked and the date is valid.

The totals, on the items step and the payment step, show "Subtotal" with one line per interval and currency ("/ One time" for one-time items), then "Total" per currency. On the payment step an Irish invoice address adds a fixed "23% VAT" line, which the total includes; the server lets Stripe work out the tax, so the amount charged can differ \[[ASK-147](https://github.com/snapfix/docs/blob/main/ASK.md#ask-147-should-the-payment-page-show-the-tax-that-stripe-charges)] (`src/app/pages/auth/pay/components/package-prices-total/package-prices-total.component.html:1-30`, `pay-package-payment.component.ts:324-326`).

## Actions

| Action                                       | Who                                              | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | API                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open a `multi` link                          | Anyone                                           | Reads the package and its items. A package that is missing, not started yet or already ended shows "Package not found".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | [`POST /read-package-v3`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-read-package-v3) (shared login)                                                                                                                                                                                                                                                                                                                                                             |
| "Continue" (email)                           | Anyone                                           | Checks the address. An answer with an email shows the password step. Any other answer, a refused check included, opens the register step; a failed request shows a notice and stays (`pay.component.ts:83-92`).                                                                                                                                                                                                                                                                                                                                                                                                                                                               | [`POST /validate-username`](https://docs.snapfix.com/engineering-reference/api/auth.md) (shared login)                                                                                                                                                                                                                                                                                                                                                                                   |
| "Login"                                      | Account holder                                   | Signs in, shows a check mark, waits 1.5 seconds, then reads the price (`single`) or shows the items (`multi`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [`POST /login`](https://docs.snapfix.com/engineering-reference/api/auth.md) (shared login)                                                                                                                                                                                                                                                                                                                                                                                               |
| "Continue to Payment Screen"                 | Guest, on a package with its own Stripe customer | Skips the sign-in: the items, then the invoice details with no site.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| "Register"                                   | Anyone without an account                        | Gets a reCAPTCHA token and asks for a code to the phone, when one is filled and the field shows, or to the email. Stops with a notice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [`POST /generate-code-web-6srw3-v8`](https://docs.snapfix.com/engineering-reference/api/auth.md)                                                                                                                                                                                                                                                                                                                                                                                         |
| "Resend verification code", "Verify Account" | Nobody today                                     | Would ask for a new code, and would register the account and sign in.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | [`POST /resend-code-web-kj6q2-v8`](https://docs.snapfix.com/engineering-reference/api/auth.md), [`POST /register-new-user-v8`](https://docs.snapfix.com/engineering-reference/api/auth.md)                                                                                                                                                                                                                                                                                               |
| Read the price (`single`)                    | Signed-in buyer                                  | Reads the price, its package's name and its interval, then opens the account step. A missing price shows "Package not found", except after signing in on the page. The page checks neither the package's dates nor whether it is deleted.                                                                                                                                                                                                                                                                                                                                                                                                                                     | [`POST ?action=snapfix_package`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actionsnapfix_package)                                                                                                                                                                                                                                                                                                                                                               |
| Choose a site                                | Signed-in buyer                                  | The account step lists the sites where the signed-in user has an admin row. It drops the user's deleted rows, but keeps blocked rows and deleted sites. The page sends the signed-in user's ID; the action lists the admin sites of whichever user the request names.                                                                                                                                                                                                                                                                                                                                                                                                         | [`POST ?action=webcust_parent_list`](https://docs.snapfix.com/engineering-reference/api/console.md#post-actionwebcust_parent_list)                                                                                                                                                                                                                                                                                                                                                       |
| Load the site's details                      | Signed-in buyer                                  | Fills the invoice fields with the site's address and keeps its billing address and Stripe customer ID. The action checks only that the user belongs to the site \[[ASK-124](https://github.com/snapfix/docs/blob/main/ASK.md#ask-124-should-members-who-are-not-admins-see-the-sites-billing-details)]. A failed read leaves the fields empty, with no message.                                                                                                                                                                                                                                                                                                               | [`POST ?action=webcust_parent_detail`](https://docs.snapfix.com/engineering-reference/api/console.md#post-actionwebcust_parent_detail)                                                                                                                                                                                                                                                                                                                                                   |
| Load the countries                           | Anyone                                           | Fills "Country".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [`?action=countries_list`](https://docs.snapfix.com/engineering-reference/api/reference.md) (signed in, with a site), [`GET /countries`](https://docs.snapfix.com/engineering-reference/api/reference.md) (guests)                                                                                                                                                                                                                                                                       |
| "Continue" (items, account, invoice details) | Buyer                                            | Opens the next step. From the items, a signed-in buyer goes to the account step and a guest to the invoice details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Get the site's Stripe customer               | Signed-in buyer                                  | Runs when the payment step opens, only if neither the site's details nor the package hold a customer ID. The server returns the site's customer, and creates one when the site has none. The production build calls the live action and the other builds the test one.                                                                                                                                                                                                                                                                                                                                                                                                        | [`POST ?action=prod_get_stripe_customer_id`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actionprod_get_stripe_customer_id), [`POST ?action=sandbox_get_stripe_customer_id`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actionsandbox_get_stripe_customer_id)                                                                                                                                                                             |
| "Start your subscription" or "Pay"           | Buyer                                            | Creates the card or SEPA payment method in Stripe, with the signed-in user's name, sign-in email and mobile and the invoice address (guests send only the address). Then asks the server for the subscription or invoice, then confirms the first payment with Stripe using the secret in the answer. The customer is the site's own when the site's details hold one, otherwise the package's, otherwise the one just looked up \[[ASK-225](https://github.com/snapfix/docs/blob/main/ASK.md#ask-225-which-stripe-customer-should-a-signed-in-buyer-of-a-package-with-its-own-customer-be-charged-on)] (`pay-package-payment.component.ts:131-187`, `:216-304`, `:328-373`). | A package with its own Stripe customer: [`POST /create-stripe-subscription-v3`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-create-stripe-subscription-v3) (shared login); the server does not tie the customer to the package. Any other package: [`POST ?action=create_stripe_subscription_v3`](https://docs.snapfix.com/engineering-reference/api/billing.md#post-actioncreate_stripe_subscription_v3), which does not tie the customer to the site it checks. |
| "Go to Snapfix"                              | Anyone, after success                            | Opens the Snapfix web app in the same tab.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| "Log out"                                    | Signed-in buyer                                  | Clears the stored sign-in and returns to the email step.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

The page sends its php-apis calls with the user's token, and its authpy calls with the shared login that is built into the page (`src/app/services/auth/auth-interceptor/auth.interceptor.ts:31-66`).

## States

* **Loading:** a spinner over the page while a `multi` link's package loads (`pay.component.html:186`); a spinner on the account step while the sites load; spinners in the invoice fields while the site's details load, and in "Country" while the countries load (`pay-business-detail.component.html:17-63`); a skeleton on the payment step until the Stripe customer is known (`pay-package-payment.component.html:1`, `:104-120`). "Login" and the pay button show a spinner while they run and a check mark when they succeed.
* **Empty:** a signed-in user who is an admin of no site gets no list and the notice "It looks like you are not assigned as an administrator within any Snapfix account. Please ensure you are an administrator within one or more Snapfix accounts or contact <support@snapfix.com> for more information." (`parent-list.component.ts:43-51`). A user whose admin rows are all deleted gets an empty step with no message.
* **Error:** "Package not found" with "Looks like the package you trying to subscribe does not exists or expired. Please contact us if you need help." ("contact us" links to the support site) (`pay.component.html:22-31`). A read that finds no package or price shows it at once; a failed request shows the server's message as a notice, then this block after 1.5 seconds (`pay.component.ts:241-307`). Other errors are notices with the server's or Stripe's message, and the step stays as it was; a failed payment keeps the form. When the Stripe customer cannot be found, the payment step stays a skeleton. A `401` answer from anything but the sign-in calls clears the stored sign-in and reloads the page (`auth.interceptor.ts:68-73`).
* **No permission:** guests cannot choose a site, and a signed-in user with no admin site has nothing to pay for.
* **Success:** the title again, then "Congratulations!" for a card or "We are processing your bank transfer request." for SEPA, then "Your subscription is now active and applied to your Snapfix account." for a subscription or "Your request is now processed and applied to your Snapfix account" otherwise, "Let’s get things done!" and "Go to Snapfix" (`src/app/pages/auth/pay/components/pay-success/pay-success.component.html:1-22`). The view follows Stripe's confirmation; no route in these repos records a live subscription or package for the site afterwards \[[ASK-142](https://github.com/snapfix/docs/blob/main/ASK.md#ask-142-who-records-live-stripe-subscriptions)].
* **Offline (mobile):** not applicable; web only. The page does not check the connection; failed requests show notices.

## Dialogs and sheets

* **Notices:** errors and a few confirmations appear as notices, which stay until clicked; each new step closes the open ones, and answers with status `401` or `422` show none (`src/app/services/helper/helper.service.ts:20-37`). Fallback texts when the answer has no message: "Internal server error", "Unable to get countries", "Unable to create payment method", "Unable to create subscription" and "Unable to sned verification code".
* **VAT notice:** when the server's error names a VAT problem, the notice reads "Make sure you enter the exact format of VAT number for your country. If you have any doubts please visit this website and check your country's VAT or TAX number format", with "website" linking to Stripe's tax ID guide (`pay-package-payment.component.ts:256-265`).
* **VAT help:** a popover from the help icon next to "VAT": "Please provide a valid VAT number to continue and remember to include all letters and numbers (eg. IE9999999A)" (`src/app/pages/auth/pay/components/pay-business-detail/pay-business-detail.component.html:72-95`).
* **Verification help:** a popover on the verification step: "Verification of your account", that every account needs a verified phone number or email address, and to contact support when verification is difficult.
* **Date picker:** the calendar for "Subscription start date".


---

# 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/payment-page.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.
