Skip to main content
Installation of the Fluz Javascript widget is relatively straightforward. You must embed or import the Javascript onto a page on your site. Once the javascript has loaded in, you can bind a UI element to open the javascript modal included as part of the imported javascript. You must also include a JWT that pre-authorizes the user to complete a particular transaction, as described below.

Create a “Pre-approved transaction” token.

Since the user is interacting with the Fluz platform to move money in and out of your spend account, any interaction with the widget must include a signed JWT token that effectively “pre-authorizes” the user to complete the transaction. What this means is, for instance, if user “abc123” has $50 in their operator account that they wish to withdraw to Fluz, you generate a patToken that Fluz can use to validate the transaction and amount. This patToken contains the amount, your apiKey, the transactionType, the externalId, user data, and then a JTI. This token is signed with your apiSecret that can be found in your app details in the for-developers section of Fluz.

Code snippets to generate the JWT

JavaScript

Ruby

Installation: gem install jwt

Python

Installation: pip install PyJWT

Go

Java

PHP

C# (.NET)