Skip to content

Simple library for show a custom payment button in any website

License

Notifications You must be signed in to change notification settings

smarty-pay/smartypay-client-sdk

Repository files navigation

Smarty Pay Client SDK

Simple library for show a custom payment button in any website

Stable version link

<script src="https://checkout.smartypay.io/sdk/smartypay-client-sdk-v1.js"></script>

Demo

Online demo

Donation button

Button img

<div id="smartypay"></div>
<script src="https://checkout.smartypay.io/sdk/smartypay-client-sdk-v1.js"></script>
<script>
new SmartyPayDonation({
  target: 'smartypay',
  donationId: 'YOUR_DONATION_ID',
  lang: 'en',
  theme: 'dark',
})
</script>
  • target - element id
  • donationId - you can get it here: https://dashboard.smartypay.io/
  • lang - en by default (also has es, ru)
  • theme - light (default) or dark

Payment Button

Button img

<div id="smartypay"></div>
<script src="https://checkout.smartypay.io/sdk/smartypay-client-sdk-v1.js"></script>
<script>
new SmartyPayButton({
  target: 'smartypay',
  apiKey: 'YOUR_API_KEY',
  amount: '1.99',
  token: 'bUSDT',
  lang: 'en',
  theme: 'dark',
})
</script>

Recharge Payment button

Button img

<div id="smartypay"></div>
<script src="https://checkout.smartypay.io/sdk/smartypay-client-sdk-v1.js"></script>
<script>
new SmartyPayRechargePayment({
  target: 'smartypay',
  address: 'CLIENT_RECHARGE_PAYMENT_ADDRESS',
  lang: 'en',
  theme: 'dark',
})
</script>
  • target - element id
  • address - recharge payment address for client (see docs)
  • lang - en by default (also has es, ru)
  • theme - light (default) or dark

Usage in React App

See React Client

Build steps

Clone repository into your dir

cd your_dir
git clone https://github.com/smarty-pay/smartypay-client-sdk

Build

npm install
npm run build

Full docs

Checkout our TypeDocs

About

Simple library for show a custom payment button in any website

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published