> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> Mo is the AI QA engineer, a separate product from the YAML test framework: its npm package and CLI are `qa` (not `mo` — `npx mo` is a different project). Install with `npm install -g qa`, authenticate the same MOMENTIC_API_KEY way, install repo skills with `qa skills -y`, and start a session with `qa start "<brief>"` or `qa <url>`. Docs: https://momentic.ai/docs/mo.md.
> You cannot complete the browser sign-in yourself. Read the API key from the exact MOMENTIC_API_KEY environment variable (similarly named vars like BILT_MOMENTIC_API_KEY are ignored), or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# Monitor a third-party flow

> Watch a flow that crosses into a vendor's UI (a payment iframe, a booking partner, a support widget) and get paged when it breaks.

Some flows you depend on leave your app: Stripe checkout, a Calendly embed, an
OAuth partner. A failure in the vendor integration can interrupt your user flow.
This recipe runs that flow on a schedule and sends a Slack alert on failure.

## The test

Keep it to the boundary: your app, into the vendor's UI, far enough to prove the
integration loads the expected controls, and back:

```yaml tests/monitors/checkout-stripe.test.yaml theme={null}
fileType: momentic/test/v2
id: stripe-checkout-monitor
url: https://app.example.com/pricing
labels: [monitor]
before:
  - module: ../modules/log-in.module.yaml
steps:
  - click: Upgrade plan
  - assert: A Stripe checkout form loads and shows the plan price
  - type:
      text: 4242 4242 4242 4242
      into: the Card number field
  - type:
      text: "12/34"
      into: the Expiry field
  - type:
      text: "424"
      into: the CVC field
  - assert: The Pay button is enabled
```

Stop before the irreversible action: assert the expected form is available, not
that a charge posts. When the vendor offers a test mode (Stripe test keys, a
sandbox tenant), point the monitor at that instead and run the full path.

## The workflow

The job installs `momentic` from `devDependencies`, so your lockfile pins the
CLI version. Add it once with `npm install -D momentic`.

```yaml .github/workflows/monitor.yml theme={null}
name: Third-party monitors

on:
  schedule:
    - cron: "*/15 * * * *" # every 15 minutes
  workflow_dispatch:

jobs:
  monitor:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      MOMENTIC_API_KEY: ${{ secrets.MOMENTIC_API_KEY }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22.12.0
      - run: npm install
      - run: npx momentic install-browsers chromium

      - name: Run monitors
        run: npx momentic run --labels monitor -y --upload-results

      - name: Alert on failure
        if: failure()
        uses: slackapi/slack-github-action@v2
        with:
          webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
          webhook-type: incoming-webhook
          payload: |
            text: ":rotating_light: Third-party monitor failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
```

Scheduled workflows run from the default branch. Check that Actions and the
schedule are enabled in the repository; forks may require enabling them. Use
`workflow_dispatch` to verify the job and its configured secrets.

## Third-party fragility rules

* Route vendor outages to the appropriate on-call channel. Keep monitor alerts
  separate from pull request failures so each reaches its owner.
* Vendor UI drifts. Payment iframes change markup. Write natural-language
  targets ("the Card number field") so
  [locator auto-heal](/docs/reliability/auto-maintenance) re-resolves the target when
  the markup changes.
* Whole-test retries default to one retry. Set `--retries 0` for flows that
  mutate real state, such as creating a charge. Prefer vendor test modes.
* Choose a schedule that fits the vendor's rate limits and the flow's duration.
  Avoid overlapping runs. If you need tighter detection, monitor the vendor's
  status endpoint with a plain HTTP check and keep Momentic for the end-to-end
  signal.

## Related

* [Run a nightly regression suite](/docs/guides/use-cases/run-a-nightly-regression-suite)
* [AI test maintenance](/docs/reliability/auto-maintenance)
* [Results and reporting](/docs/running-tests/results)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.