Overview

Begin accepting digital assets in seconds with our secure embeddable button. By pasting this button on your website, you're able to request & accept any amount of cryptocurrency (ERC20 tokens) from Frost users. If the user does not have Frost Wallet installed, the button will redirect them to the Chrome Store for download.

 

Demo

 

 

Option #1: Embeddable Button

Update the parameters below and then paste the code wherever you'd like the button to appear.

  • data-token: (String) Symbol of any token supported by Frost Wallet OR any ethereum contract address.
  • data-amount: (String) Total number of tokens to charge. Decimal conversion will occur in background.
  • data-to: (String) The Ethereum address you'd like the tokens sent to (recieving address).


<!-- STEP 1: UPDATE THE PARAMETERS INSIDE THE DIV TAG -->
<!-- data-to: the ethereum address the money should get sent to -->
<!-- data-amount: the amount of SLOPPS you'd like to charge the user -->
<div
   id="payBtn"
   data-type='pay'
   data-token="SLOPPS"
   data-to="0x56f0c80ad50b3800fb195a54d246e252adabb449"
   data-amount="100"
></div>


<!-- STEP 2: DECIDE WHAT HAPPENS AFTER USER PAYS YOU -->
<script src="https://api.frostwallet.io/dist/frost-inpage-button.js"></script>
<script type="text/javascript">

   Frost.create(
     'payBtn',
     'Pay 100 SLOPPS', // Button label
     function(err, response) { // Response handler
      if(err)
        console.log(err);
      else
        console.log(response);
        alert("Payment successful!");
     }
   );

</script>


 

Option #2: Programmatic Method

Update the parameters below and then call this method whenever you're ready to request a payment.

  • token: (String) Symbol of any token supported by Frost Wallet OR any ethereum contract address.
  • amount: (String) Total number of tokens to charge. Decimal conversion will occur in background.
  • to: (String) The Ethereum address you'd like the tokens sent to (recieving address).



   <script src="https://api.frostwallet.io/dist/frost-inpage-button.js"></script>
   <script type="text/javascript">

      Frost.pay(
      	token, // Token Name (ethereum/SLOPPS etc) or Contract address of token
      	to, // Address of receiver
      	amount, // Amount of tokens to send
      	function(err, response) {
      		if(err)
      			console.log(err);
      		else
      			console.log(response);
      	}
      );

   </script>