> For the complete documentation index, see [llms.txt](https://docs.foloosi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-widget-initialization.md).

# Payment Widget Initialization

Payment is always handled on foloosi's payment screen !

### Intialize the Script&#x20;

```
Load the script inside the html tag
<script type="text/javascript" src="https://www.foloosi.com/js/foloosipay.v2.js"></script>
```

#### Load the Payment Module

```javascript
var options = {
    "reference_token" : "REFERENCE_TOKEN", //which is get from payment initialize
    "merchant_key" : "YOUR_MERCHANT_KEY", // get the merchant key from foloosi panel
    "redirect" : false //for accept payment from hosting site, make it as true
}
var fp1 = new Foloosipay(options);

```

#### Open up Payment Screen

```javascript
// Just call the below function
fp1.open();
```

### Support

Visit <https://www.foloosi.com> for support requests or email to <tech@foloosi.com>.

## Developed by

Foloosi Technologies Pvt Ltd.

## License

Copyrights (c) 2025 Foloosi
