Skip to main content

Snippet snapshot

Read the shared daily scan from Merchants. Do not start from a GCS object or a Cloud Function URL.

  1. Open Admin → Merchants (https://admin.finmatch.io/merchants/). The list-page subtitle is Manage and monitor your merchant accounts. Toolbar Last snippet snapshot starts as Loading…. After the shared file loads, that span shows the snapshot created_at (or date, or Available). Load failure: Unavailable.

  2. Sync Snippets (title Create a new snippet snapshot for all merchants (shared view)) rebuilds the snapshot for every merchant. Last snippet snapshot returns to Loading… until the new file applies. Opening Merchants already loads today’s snapshot and creates one if today is missing. Click Sync Snippets when you need a new full scan now — for example Last snippet snapshot is Unavailable, or a merchant just installed the SDK and the table still shows yesterday.

  3. One merchant only: open the merchant → Overview → App card → Check snippet (title Re-check this merchant now and update the shared snapshot). That updates today’s shared file for that row. How-to: Snippet status. Copy/email the tag: Merchant Snippet Integration.

The Snippet status column (older docs called this Deployment) is that snapshot. It is not a crawl of every domain on every page load.

Status values​

These are the Snippet status badge labels on the merchants table and merchant detail App card. Internal snapshot keys (deployed, not_deployed, …) are not shown to operators.

BadgeMeaningColour
Snippet foundMonitor / source scan confirmed an active FinMatch SDKGreen
Snippet missingNo active FinMatch SDK detected (including commented-out scripts)Amber
No domainMerchant has no domain configured to scanGray
ErrorScan failed (timeout, TLS, blocked, monitor error)Red
CheckingSnapshot load or an on-demand check is in progressGray
UnknownNot in the latest snapshot yet, or the snapshot row has no statusGray

Full badge legend: Snippet status.

Status vs snippet status​

The merchants table has two different columns:

Status​

Merchant-record badge: Pending, Approved, Live, Suspended, or Terminated. This is not the SDK kill-switch.

Snippet status​

Whether the FinMatch SDK snippet is present on the merchant site. Loaded from the latest shared snapshot (created once per UTC day unless you Sync Snippets or Check snippet).

tip

If a merchant shows Pending in Status but Snippet found in Snippet status, the snippet is already installed even if internal workflow has not marked the account live yet.

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.

How the snapshot is built​

Opening Merchants (without Sync Snippets) does this:

  1. Load today’s snapshot: GET /api/snippets/snapshots/today.
  2. If none exists for today, create one: POST /api/snippets/snapshots.
  3. Merchant API checks each merchant via the monitor Cloud Function.
  4. 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.

Sync Snippets is the same create path with ?force=1. A partial snapshot (fewer rows than merchants on the table) also forces a full refresh once.

Troubleshooting​

Last snippet 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
  • Click Sync Snippets to force a new full snapshot

Specific merchant shows Snippet 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 App card 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​