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

# Stripe 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/staff/stripe-payment.md).
{% endhint %}

Staff list the sales packages sold through Stripe, with their prices and payment links, and create new ones.

* **Where:** admin app `/stripe-payment`; menu "Stripe Payment", shown only to the staff below.
* **Who:** usernames on the app's built-in `adminUsers` list (webadmin\_angular @ db972390b8, `src/app/shared/config.ts:21-28`). The menu hides the item from everyone else, and the route sends them to Home; both checks run in the browser. The package actions check no staff flag.
* **Feature:** [Billing setup](https://docs.snapfix.com/product/features/staff/staff-billing.md)

## Layout

1. The title "Stripe Payment", then a round "+" button with the text "Create a new Package".
2. The packages table, 10 rows per page by default (10, 20, 50 or 100) with a page jump. Columns:
   * "Package Name", with a search.
   * "Active user", "Inactive user" and "Initiated user": the package's site counts, which are always 0.
   * "Price Items": the number of prices.
   * "Action", fixed at the right: "View Package" (eye) and "Copy Package URL" (copy).

## Inputs

| Field               | Type                                | Required | Default | Rules and messages                                                                                                                                                                                                                                       |
| ------------------- | ----------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Package Name search | Text, from the column's search icon | No       | Empty   | "Search" and "Reset" as on [SMS/E-mail delivery](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md#inputs). Keeps the loaded rows whose name contains the text, ignoring case. Rows with no name stay whatever is searched. |

## Actions

| Action                       | Who          | What happens                                                                                                       | API                                                                                                                                                  |
| ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the page                | Listed staff | Loads every package of the sales bundle in one answer.                                                             | [`POST ?action=admin_read_stripe_products_v3`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_read_stripe_products_v3) |
| Search or sort               | Listed staff | Filters or sorts the loaded rows in the browser. "Package Name" and the three counts sort; "Price Items" does not. | None                                                                                                                                                 |
| "+" ("Create a new Package") | Listed staff | Opens [Add Package](#add-package).                                                                                 | None                                                                                                                                                 |
| "View Package"               | Listed staff | Opens the package read-only, under the title "Edit Package".                                                       | None                                                                                                                                                 |
| "Copy Package URL"           | Listed staff | Copies the package's payment link and shows "Package URL copied to Clipboard.".                                    | None                                                                                                                                                 |

## States

* **Loading:** the table shows its loading state.
* **Empty:** when the bundle has no live package the server answers "no packages found!", and the table is empty with no message.
* **Error:** the list shows no error message; an answer that is not a success empties the table.
* **No permission:** staff off the list never see the page (see Who).

## Dialogs and sheets

### Add Package

"Add Package", 1000 px wide, with "Cancel" and "Save". "View Package" opens the same dialog with every field read-only, the "Advance Settings" panel open and locked, the delete buttons disabled, and no "Save".

| Field                                      | Type                               | Required     | Default                  | Rules and messages                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------ | ---------------------------------- | ------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Package Name                               | Text                               | Yes          | Empty                    | "Please input Package name".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Payment Type                               | Checkboxes "Card" and "SEPA Debit" | At least one | Both off                 | "Save" stays disabled while neither is ticked; the message "Please select Payment Type" never shows. Choosing a currency other than EUR disables "SEPA Debit"; before any currency is chosen it is enabled. Its hover text "Package with SEPA Debit payment method must have Euro as Currency." shows for any chosen currency, EUR included.                                                                                                                                                                                 |
| Currency                                   | Select, shown as " `()"`           | Yes          | Empty                    | The currencies marked as Snapfix-supported, loaded when the dialog first opens; the select shows a loading state until then. While "SEPA Debit" is ticked, every currency but EUR is disabled, with the hover text "Not available with SEPA Debit payment method". The server takes only USD, EUR, GBP and INR, so the list can offer a currency it refuses with "invalid currency value for " \[[ASK-201](https://github.com/snapfix/docs/blob/main/ASK.md#ask-201-which-currencies-should-the-stripe-package-form-offer)]. |
| "Advance Settings"                         | Panel                              | No           | Closed for a new package | Its title is as shown. Its dates are sent only while it is open.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Past Days Permitted, Future Days Permitted | Number                             | No           | 30 each                  | Not below 0. A package stored with 0 shows 30 in the view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Default Day, Start Date, End Date          | Date pickers                       | No           | Empty                    | The default day must not be before the start date or after the end date, and the start date not after the end date; a break marks a field in error with no message, and the dates are compared as text, so ranges across a new year can be judged wrongly. Start Date offers days up to one after the default day, and End Date from one day before the start date.                                                                                                                                                          |

**Mandatory Services** and **Optional Services** are tables with one row per price. "Add Mandatory Service" and "Add Optional Service" add a row. A new package starts with one empty mandatory row and no optional rows; the view shows "Optional Services" only when the package has optional prices.

| Column         | Type                                                | Required | Default | Rules and messages                                                                                                                                         |
| -------------- | --------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name           | Text                                                | Yes      | Empty   | No message.                                                                                                                                                |
| Price          | Number, in the currency's units                     | Yes      | Empty   | Not below 0; no message. Sent multiplied by 100, without rounding.                                                                                         |
| Recurring Type | Select: "Year", "Month", "Daily" or "Non Recurring" | Yes      | Empty   | No message.                                                                                                                                                |
| Default Qty    | Number                                              | No       | 1       | With "Qty Editable", it must be at least Min and at most Max; a break marks Default Qty or Max in error, and a Min above Max always breaks one of the two. |
| Qty Editable   | Checkbox                                            | No       | Off     | Turns Min and Max on. The quantities are sent only when it is ticked.                                                                                      |
| Min, Max       | Numbers                                             | No       | 1 each  | Only with "Qty Editable".                                                                                                                                  |
| Action         | Delete button                                       |          |         | Removes the row; the last mandatory row cannot be removed.                                                                                                 |

| Action   | Who          | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | API                                                                                                                                                                                                                                                                                       |
| -------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Save"   | Listed staff | Disabled until the name, a payment type, a currency and at least one mandatory row are set and every row is valid. Sends the package with the signed-in user as creator. On success it shows the server's message, "Package created successfully!", the dialog closes and the list reloads. A refusal shows the server's message and the dialog stays open. While saving, "Save" shows a spinner and the close button and a click outside do nothing; "Cancel" still closes the dialog. | [`POST ?action=admin_create_stripe_product_v3`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_create_stripe_product_v3); currencies from `?action=currencies_list` in the [Reference API](https://docs.snapfix.com/engineering-reference/api/reference.md) |
| "Cancel" | Listed staff | Closes without saving.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | None                                                                                                                                                                                                                                                                                      |


---

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