Skip to main content

Snippet Deployment Status

Understand how the Admin Dashboard verifies whether the FinMatch SDK snippet is present on merchant websites.

How it works (snapshot-based)

The Deployment column is powered by a shared daily snapshot of snippet checks. This keeps the UI fast and avoids repeatedly crawling every merchant on every page load.

The process

  1. On first load (per UTC day) the Merchants page tries to load today’s snapshot:
    • GET /api/snippets/snapshots/today
  2. If no snapshot exists for today, the dashboard creates one:
    • POST /api/snippets/snapshots
  3. The Merchant API checks each merchant by calling the monitor service:
    • GET https://europe-west2-finmatch-finance-mkt.cloudfunctions.net/monitor?domain=example.com
  4. The results are written once to gs://finmatch-admin/snippets/snapshots/YYYY-MM-DD/<timestamp>.json
  5. All admins see the same results until a new snapshot is created.

Status values

StatusMeaningBadge
Snippet FoundSnippet detected on siteGreen
MissingSnippet not detectedAmber
No domainMerchant has no domain configuredGray
ErrorCouldn’t check (timeout, TLS/cert issue, blocked, etc.)Red
Why snapshots?

Historically, the dashboard checked every merchant on every page load. That caused slow loads, unnecessary crawling, and could contribute to backend rate limiting. Snapshots make the “is the snippet present?” signal cheap and shareable.

Understanding the Results

Deployed

  • The FinMatch snippet was found on the merchant's website
  • The snippet is active (not commented out)
  • The merchant's website is reachable

Unknown

This status can mean:

  • The status hasn't been checked yet (first time loading)
  • The FinMatch snippet was not found on the website
  • The merchant's website is unreachable or returns an error
  • The merchant doesn't have a domain configured

Status Column vs Deployment Column

The merchants table has two different status columns:

Status Column

  • Shows merchant account status (Active, Pending, Suspended)
  • Related to account activation or billing status
  • Typically set manually or by system processes

Deployment Column

  • Shows whether the FinMatch SDK snippet is present on the merchant site
  • Loaded from the latest shared snapshot (created once per UTC day unless you manually sync)
tip

If a merchant shows Pending in Status but Snippet Found in Deployment, it means the snippet is already installed even if your internal workflow hasn't marked the account active yet.

Manual refresh options

  • Sync Snippets (table toolbar): create a new snapshot for all merchants (shared view).
  • Check snippet (merchant detail → App card): re-check only that merchant and write a new “latest” snapshot for today so all admins see the update.

Troubleshooting

Snapshot shows “Unavailable”

  • Confirm Merchant API is reachable
  • Confirm GET /api/snippets/snapshots/today returns a snapshot
  • Check browser console/network tab for API errors

Specific merchant shows “Missing” but you expect “Snippet Found”

  • Verify the merchant has a domain configured
  • Check if the domain is accessible (try visiting it in a browser)
  • Ensure the FinMatch snippet is actually deployed on the website
  • Use Check snippet on the merchant detail page to refresh only that merchant

Status Not Updating

  • Clear browser cache and reload
  • Check network tab in browser dev tools for API call failures
  • Verify Merchant API logs for errors

Technical Details

Snapshot endpoints

GET  /api/snippets/snapshots/today
POST /api/snippets/snapshots
POST /api/snippets/snapshots?force=1
POST /api/snippets/snapshots/merchant/:id

Legacy endpoint (debug/back-compat)

GET /api/merchants/:id/deployment-status

Monitor Function

The deployment check uses a Cloud Function that:

  • Fetches the merchant's website HTML
  • Searches for FinMatch snippet patterns
  • Detects if the snippet is active or commented out
  • Returns the environment detected (Production, Staging, Test, or Not Found)

Next Steps