Skip to content

Samsung Pay on your own checkout

If you want to place the Samsung Pay button on your website, you can use the library developed by bePaid. It is compatible with the parameters and properties of the payment widget library.

Follow the steps below:

1. Install the script on your website:

<script type="text/javascript" src="https://js.bepaid.by/widget/samsung_pay.js"></script>

2. Place a frame for a Samsung Pay button on the page:

<div id="samsung-pay-container"></div>
</body>

3. Add the following JavaScript-code to start the Samsung Pay payment processing:

<script>
var params = {
    checkout_url: 'https://checkout.bepaid.by',
    public_key: '25b0b327104c7bcd6f30b5408552f25711914e7f50a620d561f066d698313',
    token: '3850e83409a8e679eab0dd6cd4efe7732ad9e1750a3c7e051c0ca6ef29d15',//token example
    samsung_pay_container_id: 'samsung-pay-container',
  };
  const samsungPay = new SamsungPay(params);
  this.pay = window.payBySamsung = samsungPay.pay;
</script>
Parameter Type Description
checkout_url * required
string https://checkout.bepaid.by
token string A payment token. To get the token, make a request described on the Payment token page.
public_key * conditionally required
string The shop public key. Required if the token parameter is not sent.