The options for initializing the Kushki payment gateway.
A Promise that resolves to an instance of the initialized Kushki payment gateway.
Throws an error if the initialization fails due to invalid options, network issues or public credential id undefined.
import { IKushki, init, KushkiError } from "@kushki/js-sdk";
const kushkiOptions : KushkiOptions = {
publicCredentialId: '<public-credential-id>', // This corresponds to the public credential of the merchant
inTest: true
};
const buildKushkiInstance = async () => {
try {
const kushkiInstance : Ikushki = await init(kushkiOptions);
} catch (e: KushkiError) {
console.error(e.message);
}
}
Generated using TypeDoc
Initializes the Kushki payment gateway with the provided options.