| title | excerpt | category |
|---|---|---|
System Development Kit - Javascript |
GetUnblock SDK is a JS library for interacting with Unblock APIs |
64aebfcf6c645e002384ccdc |
npm i @getunblock/sdkimport getunblockSDK, { Currency } from "@getunblock/sdk";
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
// SDK API call example
const result = await sdk.exchangeRates.getExchangeRate({
baseCurrency: Currency.USD,
targetCurrency: Currency.EURO,
});
console.log(result);
})();const getunblockSDK = require("@getunblock/sdk").default;
const { Currency } = require("@getunblock/sdk");
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
// SDK API call example
const result = await sdk.exchangeRates.getExchangeRate({
baseCurrency: Currency.USD,
targetCurrency: Currency.EURO,
});
console.log(result);
})();