Widget

Features

- 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

Example TESTNET widget

Payment Page

Build payment pages is as simple as building an URL:
Company Information
Company Name
APIKey (Get one)
Product information:
Product ID
Product Name
Currency
Amount
Include Payment Information
Email (required)
Name
Pre-Fill with:
Email:
Name:
Payment Confirmation:
Destination URL

Result:
Example Payment Page


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.

Widget Generator

You can also use the Widget separatedly:

Static Parameter:

API KEY

Dynamic parameters per widget:

Client Email

Payment ID
Amount
Currency

Copy and paste:

<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/>

Javascript Lib

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.

Get an APIKEY

Paste here the Extended Public Key of your wallet:

Company IPN URL
Company Email
Company Name

Extended Public Key

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.

How to find the Extended Public Key if your wallet:

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 0

Note: use a TESTNET wallet to obtain the extended public key if you want a TESTNET widget.


Instant Payment Notification (IPN)

Payment notifications are received instantly in your bitcoin wallet

Here is how to recieve them also instantly in your server:


IPN URL

When a payment is received, a GET request is sent to your IPN:

https://example.com/ipn?apikey=knjhguyhi&amount=0.00253265&address=1KF2Pt9mSq...

Verification

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.

klukt.com