BIN Lookup
Card information based on the Bank Identification Number (BIN)
Using your account Public API Key on MoneyHash
class instance you will be able to have the functionality of the following method
const moneyHash = new MoneyHash({
type: "payment",
publicApiKey: "<account_public_api_key>",
});
Collect Card Data
After collecting card info as mentioned here.
const cardData = await moneyHash.cardForm.collect();
You will need to render card form fields to be able to collect customer card information.
Bin Lookup
try {
const binLookup = await moneyHash.cardForm.binLookup({
cardData,
// flowId: '<flow_id>' // accepts optional flowId
});
console.log(binLookup);
} catch (error) {
console.log(error);
}
export type CardBinLookUp = {
firstSixDigits: string;
brand: string;
cardType: string | null;
issuer: string | null;
issuerCountry: string | null;
issuerCountryCode: string | null;
};
Updated 15 days ago