Skip to content

Quickstart

JS SDK is ideal for quick client-side integrations focused on deposits, the JS SDK simplifies implementation, reduces backend complexity, and accelerates time-to-market.

The SDK is designed exclusively for deposit UI handling. To manage callbacks or initiate withdrawals, API integration is required.

Demo

Dynamic input with button:
$
...

Integration

Follow these steps to integrate Bitcoin payments using CryptoChill SDK:

Step 1

Include CryptoChill SDK javascript file: https://static.cryptochill.com/static/js/sdk2.js. File sdk2.js served from AWS CloudFront (CDN).

Step 2

Add buttons with uniwire-button class name and use following data attributes:

Step 3

Initialize SDK using your Account ID and Profile ID parameters (can be found in Dashboard):

js
UniwireSDK.setup({
    account: 'YOUR_ACCOUNT_ID',
    profile: 'YOUR_PROFILE_ID'

    // -- Event callbacks (Optional)
    // onOpen: onCryptoChillEvent,
    // onUpdate: onCryptoChillEvent,
    // onSuccess: onCryptoChillEvent,
    // onIncomplete: onCryptoChillEvent,
    // onCancel: onCryptoChillEvent

    // -- Global Parameters (Optional. Can be specified at the button level.)
    // passthrough: JSON.stringify({test: 123}),
    // placement: 'inline',
    // placementTarget: 'elementID',
})

/* 
function onCryptoChillEvent(data, code) {
  console.log(code + ' event called', data)
}
*/

Following event callbacks are available: onOpen, onUpdate, onIncomplete, onSuccess, onCancel. To close and destroy modal window: CryptoChill.destroy().

Important Security Note

Never fully rely on JavaScript / client-side data provided in onSuccess, onUpdate and onIncomplete events as it can easily be manipulated. When it comes to transactions data processing you should fully trust only server to server callbacks.

Setup Configuration

For detailed information about all available setup parameters, see Setup Configuration.

Button Parameters

For detailed information about all available button data attributes, see Button Parameters.