Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fortepayments.io/llms.txt

Use this file to discover all available pages before exploring further.

After receiving a data object from either a payment intent or a KYC request, embed and initialize the widget in your page.

Step 1 — Embed the Widget Script

Add a container <div> and a <script> tag inside your <body>.
<body>
  <div id="forte-payments-widget-container"></div>
  <script
    type="module"
    async
    src="https://payments.sandbox.lemmax.com/forte-payments-widget.js">
  </script>
</body>
EnvironmentCDN URL
Sandboxhttps://payments.sandbox.lemmax.com/forte-payments-widget.js
Productionhttps://payments.prod.lemmax.com/forte-payments-widget.js
If your application enforces a Content Security Policy with Subresource Integrity, fetch the versioned filename and integrity digest from the manifest endpoint first. Fetch the manifest
GET /payments/v1/widget/manifest
Authorization: Bearer {{access_token}}
Response:
{
  "data": {
    "file_name": "forte-payments-widget-6.6.2.js",
    "integrity": {
      "type": "sha384",
      "digest": "sha384-+YZhTk4vMk5059Z1nwH7wn5uWhnILu7OGOnyxxV86ofK0WA0rpDci1dcxRjJdMe+"
    }
  }
}
Embed with versioned filename and integrity attribute Use data.file_name to construct the src URL, and data.integrity.digest as the integrity attribute on the <script> tag.
<body>
  <div id="forte-payments-widget-container"></div>
  <script
    type="module"
    async
    src="https://payments.sandbox.lemmax.com/forte-payments-widget-6.6.2.js"
    integrity="sha384-+YZhTk4vMk5059Z1nwH7wn5uWhnILu7OGOnyxxV86ofK0WA0rpDci1dcxRjJdMe+">
  </script>
</body>
Fetch the manifest on every new widget session. This ensures the integrity digest matches the version currently being served from the CDN.

Step 2 — Initialize the Widget

After embedding the widget script, initialize it by passing the full data object from your intent response. Add this <script> tag outside of <body>.
<script>
if (data) {
  (function init() {
    window.initFortePaymentsWidget
      ? window.initFortePaymentsWidget({
          containerId: 'forte-payments-widget-container',
          data
        })
      : setTimeout(init, 10);
  })();
}
</script>
Always use a fresh data object from your most recent intent API response. Do not cache or reuse previous values.
The widget session expires after 30 minutes of inactivity. If the session expires, re-initiate the intent and re-initialize the widget.


Next Steps

Payment Events

Handle client-side events from the Payments widget

Compliance Events

Handle client-side events from the Compliance widget