# Installation

### Install the package from NPM

{% hint style="info" %}
We only support React for now.
{% endhint %}

{% tabs %}
{% tab title="Yarn" %}

```bash
yarn add @billing-js/react-billing-js
```

{% endtab %}

{% tab title="NPM" %}

```
npm install --save @billing-js/react-billing-js
```

{% endtab %}
{% endtabs %}

### Connect your Stripe Account to BillingJS

In order to make payment through our servers you need to connect your [Stripe Account](https://dashboard.stripe.com/register) to our [Stripe Connect Plateform](https://stripe.com/connect)&#x20;

#### [Click here to connect your Stripe to BillingJS](https://billingjs.com/stripeConnect)

Then copy your connected Stripe Account ID for later use

<figure><img src="https://2415023427-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk0DAnFFM0rpMMriidbgN%2Fuploads%2FxJcyYiZfyFNEJz7mECEK%2FScreenshot%202023-11-29%20at%2022.14.32.png?alt=media&#x26;token=67cd4e82-b0d8-4d25-9ba6-c55b7d70823e" alt=""><figcaption></figcaption></figure>

### Import styles

#### CDN

insert the stylesheet directly in your html

```html
<!-- index.html -->
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@billing-js/react-billing-js/styles.css">
  </head>
  
  <body>
    <!-- content -->
  </body>
</html>
```

#### PostCSS config

In your root file, import the css sheet used by billing to get the styles.

```jsx
// project root file ex: ./index.js

import "@billing-js/react-billing-js/styles.css"
```

#### Tailwindcss config&#x20;

if you are using [Tailwind](https://tailwindcss.com/) in your project please make sure to add the billing.js sources to your `tailwind.config.cjs` config to tell [jit](https://tailwindcss.com/blog/just-in-time-the-next-generation-of-tailwind-css) to not purge the classes used by billing.js and prevent collision with your own class names

<pre class="language-javascript"><code class="lang-javascript">// tailwind.config.js

<strong>module.exports = {
</strong>  content: [
    // ...
    
    // INCLUDE THIS LINE TO NOT HAVE MISSING TAILWIND CLASSES
    "./node_modules/@billing-js/react-billing-js/index.js"
    
    // ...
  ],
  // ...
  plugins: [
    // ...
    
    // INCLUDE TAILWIND FORM CLASSES
    require('@tailwindcss/forms'),
  ],
}
</code></pre>
