lyzi-node
v0.0.1
Published
Lyzi API wrapper
Downloads
7
Maintainers
Readme
Lyzi-node
Lyzi API wrapper
Install
npm install lyzi-node
Usage
import LyziClient from "lyzi-node";
import { GoodsType, RequestCurrency } from "lyzi-node/types/conversion-type";
const lyziClient = new LyziClient({bearerToken: "abcdef"});
const requestRes = await lyziClient.conversion.requestConversion({
amount: 100,
fromAsset: "EUR",
goods: {
goodsName: `Voucher`,
goodsCategory: "Z000", // Others
goodsType: GoodsType.Virtual,
},
toAsset: RequestCurrency.EUR,
anonymous: true,
merchantIdentifier: "aubduez"
});
API
LyziClient(authOption, baseUrl?)
authOption
Type: object
{
bearerToken?: string;
apiKey?: string;
internalKey?: string;
basicAuth?: {
username: string;
password: string;
};
}
baseUrl
Type: string
The Lyzi API URL (default: https://api-dev.lyzi.fr/api/next)