React

React version of Pay Button is the wrapper for the javascript version. For more detailed information about the API, please check the javascript documentation. The documentation for the javascript version also applies directly to the React version.

How to install React components:

npm install @getpip/react-pip-button 

How to use the button in React project:

import { PIPButton } from "@getpip/react-button"

const PIPPage: React.FC = () => {
  return (
    <div>
      <PIPButton
        receiver="..."
        amount={1}
        chainNetwork="..."
        asset="..."
      />
    </div>
  )
}
NameRequiredTypeDefault Value

receiver

true

string

null

amount

true

string

null

currency

true

string

β€˜USDC’

chainNetwork

false

string

β€˜SOLANA’

label

false

string

β€˜PAY’

useLabel

false

boolean

true

buttonColor

false

string

β€˜#1149FF’

buttonTextColor

false

string

β€˜#FFFFFF’

onLoad

false

function

null

onPayment

false

function

null

onError

false

function

null

Last updated