See it in action: You can see how we integrate our own widget at https://widget.koywe.com and clone the Github repo to start building your own project

BETA: SDK Widget

The SDK is currently in Beta and is available only for projects that require a quick solution without the need for enhancements, modifications, or additional support. It will be available for a limited time and will soon be discontinued in favor of API-only integrations.

Our SDK is an NPM package, installed in your project. You can configure some parameters to make it easier for your users and even skip some steps if you include a Client ID.

Activating the widget will display an overlay where your users will go through the Buy Process and, coming soon, the Sales on, without leaving your website or app.

KYC: If you want to do your own KYC and skip Koywe’s process, please contact us. You will need to setup an API endpoint to make sure your user is identified and provide us with the information.

Installation

Run npm i @koyweforest/koywe-ramp-sdk inside your project’s folder. You can also use yarn

Configuration and Use

Using the widget is very simple. For example, showing the ramp at the click of a button:

import { KoyweRampSDK } from '@koyweforest/koywe-ramp-sdk';
const koywe = new KoyweRampSDK({});
function App() {
  return (
    <Button onClick={() => koywe.show()}>Fund your wallet with Koywe</Button>
  );
}

You can add some parameters to make it easier for your users:

currencies

A list of currencies that will be offered to the user. By default, all currencies are shown.

You must pass an array of strings, each value containing the symbol of the currencies. You can obtain a full list of available fiat currencies at https://koywe.com

new KoyweRampSDK({ currencies: ['CLP', 'MXN', 'COP', 'PEN'] });

In this example, the user will only be allowed to select CLP, MXN, COP, and PEN.

If you pass an empty array, it will be ignored and default values will be shown. You can add any string, invalid values will be ignored.

tokens

The list of tokens allowed to purchase or sell. By default, all available tokens for the given currency are shown.

You must pass an array of strings, each value containing the symbol of the tokens. Multi-chain tokens, such as USDC, should be listed individually according to the default list. For example, USDC on Polygon should be passed as “USDC Polygon”. You can obtain a full list of available crypto tokens at https://koywe.com

new KoyweRampSDK({tokens: ["ETH"]})

In this example, only ETH will be available to transact.

If you pasa an empty array, it will be ignored and default values will be shown. You can add any string, invalid values will be ignored.

Important: Non-existent pairs will be ignored. For example, if there are no prices in PEN for the BNB token, when the user selects PEN, the token will not be displayed, even if there are prices in other currencies.

address

Optional string parameter to setup a wallet address, skipping the step for the user.

new KoyweRampSDK({ address: '0x402...12' });

An invalid or malformed address will be ignored and the user will have to input a valid one manually.

email

String parameter to link a user to the transaction. If it’s a valid email, the widget will trigger an email with an OTP code and ask for it to the user.

new KoyweRampSDK({ email: 'test@koywe.com' });

Providing an email will prevent the user from modifying it and WILL have to use the address to buy or sell crypto.

callbackUrl

String param containing a valid URL to redirect after paying or navigating outside the widget.

new KoyweRampSDK({ callbackUrl: 'https://koywe.com......' });

If you don’t specify a valid URL, the user will be redirected to Koywe’s website after finishing the transaction.

clientId

Optional parameter containing the Client ID to use on the widget. Depending on the agreement with Koywe, this ID allows access to different payment methods and conditions.

new KoyweRampSDK({ clientId: '2781......' });

If no id is passed, the widget will replicate functionality at https://koywe.com

Checkout our Credentials sections to learn more and find out how to get your own ID.

testing

Optional boolean parameter to activate testing mode (fake transactions).

new KoyweRampSDK({ testing: true });

If parameter is not passed or is passed as false, the widget will point to production (real money).