Javascript
To use the Javascript of the Pay Button, start by adding this script in your websiteβs HTML.
PIP-BUTTON Objects
render
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
receiver
A receiverβs address that is compatible with a selected blockchain network
amount
The amount of dollar (Fiat) that a receiver will receive
chainNetwork
The type of blockchain network that the symbol of the token is included
currency
The symbol of token that will actually be sent to the receiver
label
A label of the button
useLabel
Option to display the label of the button. The default value is βTRUEβ.
buttonColor
The background color of the button
buttonTextColor
Text color of the button
onPayment
Function(s) that will be executed when the payment is successful.
When the payment is successful, values listed below are transferred.
sender
string
Senderβs public key
amount
string
The amount of USD sent
chainNetwork
string
The type of blockchain network that the symbol of the token is included. (i.e. SOLANA, BSCβ¦)
currency
string
The ticker of token that is sent.
txId
string
Transaction id
onError
Function(s) that will be executed when the payment is NOT successful. It will not be executed when there is a problem with the parameters of the button.
Parameters that the function receives is the explanation of the error.
onLoad
The function that is executed when the button is loaded.
Last updated