# window is not defined

**URL:** <https://forum.wixstudio.com/t/window-is-not-defined/41493>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [May 29, 2021, 11:03am UTC](https://forum.wixstudio.com/t/window-is-not-defined/41493 "2021-05-29T11:03:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![valentinloppe](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/valentinloppe/32/21343_2.png) [@valentinloppe](https://forum.wixstudio.com/u/valentinloppe)\
**Post date:** [May 29, 2021, 11:03am UTC](https://forum.wixstudio.com/t/window-is-not-defined/41493/1 "2021-05-29T11:03:09Z")

</div>

Hi everyone, I am trying to call a backend function from client-side but I got this error :

```javascript
"["Error loading web module backend/managePayments.jsw: window is not defined"]"

```

On this backend function, I am calling an NPM module that I previously installed :

```javascript
import Fluidpay from 'fluidpay-js'
import wixSecretsBackend from 'wix-secrets-backend';

export function createPayment(amount, userEmail, cardInfo) {
 const fp = new Fluidpay({
        apiKey: wixSecretsBackend.getSecret("fluidPay_API_key"),
        environment: 'sandbox'
 })

```

Any idea on what might be the issue ?

Thanks !

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [June 1, 2021, 12:08am UTC](https://forum.wixstudio.com/t/window-is-not-defined/41493/2 "2021-06-01T00:08:35Z")

</div>

Perhaps you will be able to find your answer in the FluidPay-API-Docs?  
[https://sandbox.fluidpay.com/docs/api/](https://sandbox.fluidpay.com/docs/api/)

or here…

> **[GitHub - fluidpay/fluidpay-js](https://github.com/fluidpay/fluidpay-js)**
>
> Contribute to fluidpay/fluidpay-js development by creating an account on GitHub.
