Skip to main content

Merchant Snippet Integration

Copy and email the SDK snippet from the merchant App card. Do not start from a GCS URL.

  1. Open the merchant from Merchants. Stay on Overview. Scroll to the App card.
  2. Header snippet is the <script> tag to paste in the merchant <head>. ⓘ About the Header snippet. Copy button: Copy code.
  3. Envelope next to the label (title Share header snippet by email) opens Send Header Snippet Email. There is no Send Integration Guide modal. Fill, validation, and send: Send Header Snippet Email.
  4. Same card: Snippet status and Check snippet (title Re-check this merchant now and update the shared snapshot). Snippet checked at. Plus toggle: Show snippet details / Hide snippet details. How-to: Snippet status. Daily snapshot: Snippet snapshot.

Detected snippet appears only when the scan found an SDK for a different environment than the App badge. See Merchant Page Editing.

Changing Environment in Edit Merchant regenerates the Header snippet row. Live chrome always uses the router-managed /s SDK; environment is resolved by merchant-router, not by swapping p / s / t in the script src. Storefront runtime contract.

Send Header Snippet Email​

Envelope on the App card Header snippet row (title Share header snippet by email). Cancel closes without sending.

Opening loads templates from merchant-api. It prefers the Header snippet template (header-snippet). To is filled from this merchant’s Primary Contact and Technical emails when those exist. Changing Template rewrites Subject and Message from that template’s tokens (merchantId, companyName, environmentName, domain, headerSnippet, contact emails). To is left alone if you already typed recipients.

If templates cannot load: Failed to load email templates. Empty list: No email templates available.

FieldWhat it is
TemplateEmail template (the Header snippet template is the default)
ToRecipient list (primary / technical contacts, comma-separated). Placeholder: email@domain.com, tech@domain.com.
SubjectOutbound subject
MessageBody; includes the header snippet tag

Send / commit​

Click Send email. The button shows Sending... and is disabled until the request finishes.

Client checks, in order (toast, no send):

  • Select an email template.
  • Add at least one recipient.
  • Subject is required.
  • Message body is required.

Success toast: Email sent to the addresses the API accepted. The modal closes. POST /admin/merchants/:id/send-template-email sends that edited subject/body (not a silent re-render of the template). Gmail sent-copy audit: Emails overview.

Failure:

  • HTTP 404: Email send endpoint is not available yet. Start your local merchant-api with these changes or deploy merchant-api first.
  • Other errors: Failed to send email. or the API reason.

This is not Save template on Admin → Emails. Editing the modal does not change the stored template.

Snippet HTML​

Secondary. What Header snippet / Copy code shows:

<script src="https://storage.googleapis.com/finmatch-finance-marketing-assets/s/scripts/finmatch-sdk.js?merchantID=M000101&v=1.0" type="module" async></script>

merchantID accepts MXXXXXX (e.g. M000101) and legacy FM-XXXX-XXXX-XXXX. v=1.0 is the cache-bust query.

Older merchant sites may still have /p/ or /t/ script paths. Those show as Detected snippet when they disagree with the App badge.

CORS: merchant domains are added when the merchant is created. See Merchant ID Architecture.