options.publicCredentialId
into kushkiInstance
is not valid or the request fails then throw ERRORS.E014import { init } from "@kushki/js-sdk";
import { requestBankList } from "@kushki/js-sdk/Transfer";
const onRequestBankList = async () => {
try {
const kushkiInstance = await init({
inTest: true,
publicCredentialId: "merchantId"
});
const response = await requestBankList(kushkiInstance);
// On Success, can get list of banks, ex. [{"code":"0","name":"A continuación seleccione su banco"},{"code":"XXX1","name":"BANCO DE BOGOTA"},{"code":"XXX2","name":"BANCO POPULAR"},{"code":"XXX6","name":"BANCO ITAU"}]
console.log(response);
} catch (error: any) {
// On Error, catch response, ex. {code:"E014", message: "Error en solicitud de lista de bancos"}
console.error(error.message);
}
};
Generated using TypeDoc
Function to get list of available banks for Transfer transactions