Subbi
  • What is Subbi?
  • Getting Started
    • Setting up your first subscription
    • Supported tokens
    • Contract links
  • Hosted Checkout
    • Introduction
    • Configuring URLs
  • Self Hosted Checkout
    • Installation
    • Components
      • Subbi Provider
      • Buttons
        • Metamask Button
        • Approve Button
        • Subscribe Button
        • Cancel Button
      • Checkout Flow
    • Hooks
  • Direct contract interaction
    • Introduction
    • Contract ABIs
  • Extras
    • Fee sharing
Powered by GitBook
On this page
  1. Self Hosted Checkout

Installation

PreviousConfiguring URLsNextComponents

Last updated 3 years ago

If you are looking for something a little more integrated, then Subbi has you covered! will allow you to include a Subbi checkout directly on your website, however you like!

To get started:

yarn add @subbi/react

or

npm install @subbi/react

Then, before anything else, make sure to wrap the root of your app with the . In your index.js or equivalent React root file:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

import { SubbiProvider } from "@subbi/react";

ReactDOM.render(
  <React.StrictMode>
    <SubbiProvider network="polygon">
      <App />
    </SubbiProvider>
  </React.StrictMode>,
  document.getElementById('root')
);

You can read more about the SubbiProvider .

Our react library
SubbiProvider
here