Use the Busha Commerce SDK when you want customers to start a crypto payment flow from your website or web app. It gives you a ready-made checkout experience, so you can launch faster without building your own payment modal from scratch.
What You’ll Achieve:
Install the Busha Commerce SDK.
Add a pay button to your store or checkout page.
Test the integration with your sandbox public key before going live.
Prerequisites
Before you begin, ensure you have:
A Busha Business account (from the Quick Start Guide ).
Basic HTML and JavaScript knowledge.
A website or web application where you want the payment button to appear.
Live demo
Try the widget below to see the checkout flow before you integrate it:
The SDK gives you a hosted payment experience with currency conversion,
multiple crypto payment options, and built-in payment confirmation handling.
Install the SDK
Busha Commerce SDK (commerce-js) View the source code and release history on GitHub.
Choose one installation method:
Option 1: CDN
< script src = "https://cdn.jsdelivr.net/npm/@busha/commerce-js@1.0.17/dist/index.min.js" ></ script >
Option 2: npm or yarn
npm i @busha/commerce-js
# or
yarn add @busha/commerce-js
import BushaCommerce from '@busha/commerce-js'
Use this example to launch the Busha checkout from your storefront:
<! DOCTYPE html >
< html >
< head >
< title > Kemi Stores </ title >
< script src = "https://cdn.jsdelivr.net/npm/@busha/commerce-js@1.0.17/dist/index.min.js" ></ script >
</ head >
< body >
< button id = "payButton" > Pay with Crypto </ button >
< script >
const BushaCommerce = window . BushaCommerce
document . getElementById ( 'payButton' ). addEventListener ( 'click' , function () {
BushaCommerce ({
public_key: 'pub_your_public_key_here' ,
quote_amount: '10000' ,
quote_currency: 'NGN' ,
target_currency: 'NGN' ,
source_currency: 'USDT' ,
devMode: true ,
meta: {
name: 'Kemi Stores' ,
email: 'orders@kemistore.com' ,
},
onSuccess : ( data ) => {
console . log ( 'Payment successful!' , data )
},
onClose : () => {
console . log ( 'Payment cancelled' )
},
})
})
</ script >
</ body >
</ html >
Find your public key
Your public key is available in the Busha Business dashboard:
Log in to your Busha Business account.
Go to Settings → Developer Tools .
Copy your Public Key (it starts with pub_).
Use your sandbox public key for testing and your production public key for
live payments.
Test before going live
Before you switch to production:
Set devMode: true.
Use your sandbox public key.
Test a complete payment flow with a small amount.
Confirm your onSuccess callback runs as expected.
Check that the payment appears in your Busha dashboard.
BushaCommerce ({
public_key: 'pub_sandbox_key_here' ,
quote_amount: '1000' ,
quote_currency: 'NGN' ,
target_currency: 'NGN' ,
source_currency: 'USDT' ,
devMode: true ,
meta: {
name: 'Kemi Stores' ,
email: 'orders@kemistore.com' ,
},
onSuccess : ( data ) => {
console . log ( 'Payment successful!' , data )
},
onClose : () => {
console . log ( 'Payment cancelled' )
},
})
Configuration reference
Required settings
Parameter Type Description public_keystring Your Busha Business public key (starts with pub_) quote_amountstring Amount to charge, for example 10000 quote_currencystring Currency for the quoted amount, for example NGN source_currencystring Asset the customer pays with, for example USDT target_currencystring Currency the payment settles into onSuccessfunction Runs when the payment succeeds onClosefunction Runs when the checkout modal closes
Useful optional settings
Parameter Type Description meta.namestring Customer or order name shown in your integration meta.emailstring Customer email for order context devModeboolean Set to true for sandbox testing referencestring Your custom transaction reference callback_urlstring URL to receive payment notifications sourcestring Source label for the payment, for example website source_idstring Internal ID tied to the payment source in your app
What’s Next?