- Funds go directly to your wallet
- You receive 100% of the payment.
- Instant Payment Notification
- Sell to anyone, anywhere
- No intermediaries
- Use with your existing wallet
The user is then directed to the URL specified in the 'url' parameter, all the information from the payment is appended as query parameter plus an extra txid parameter that is unique to this payment.
You can use the bitcoin address to retrieve the payment information server side and use the txid to confirm that everything matches.
<iframe src= "https://klukt.com/widget.html?apikey=z1l6ppzg77&id=54445&amount=2.99&curr=USD&email=" scrolling="" frameborder="0" style="border:none;border-radius:5px;" width=240 height=300/>
Another way to get the widget into your webpage and have more control is using javascript.
Include the Klukt library like this:
<script type="text/javascript" src="https://klukt.com/klukt.js"></script>
And create the widget using javascript (preferably after the 'onload' event):
<script type="text/javascript"> var opts = { "apikey": "e3w3fjlfey", "curr": "USD", "email": "[email protected]", "amount": 9.99 } klukt.render('#widget_div', opts, function (payment) { console.log('Payment received!!', payment) } </script>This way you can get the payment event on the client javascript side.
The Extended Public Key is used to generate multiple bitcoin addresses for the same wallet.
No risks, the Extended Public Key can only be used to recieve funds, not spend them.
Multiple public addresses helps you protect your privacy, and allows to differenciate simultaneous payments from one another.
All wallets that support BIP32 and BIP44 provide you with an easy way to copy and paste the Extended Public Key of your bitcoin wallet.
On Bitpay wallet , Copay Wallet or Bitcoin.com Wallet go to:
Settings -> [Wallet Name] -> More Options -> Wallet Information -> Copayer 0Note: use a TESTNET wallet to obtain the extended public key if you want a TESTNET widget.
Payment notifications are received instantly in your bitcoin wallet
Here is how to recieve them also instantly in your server:
When a payment is received, a GET request is sent to your IPN:
https://example.com/ipn?apikey=knjhguyhi&amount=0.00253265&address=1KF2Pt9mSq...
When you receive a IPN notification, you must verify the information received, send a GET request to:
https://api.klukt.com/verify?apikey=YOUR_API_KEY&address=BITCOIN_ADDRESS_FROM_IPN
The response is a JSON with all the same information about the payment (so you can verify the transaction),
with the number of confirmations from the blockchain, and all the metadata provided by the user if any.