@finap/sdk-node
Node.js SDK
A typed client for server-side FINAP integrations on Node.js 18 and newer.
01
Install
npm install @finap/sdk-node02
Configure the client
The SDK currently defaults to api.finap.com. Set baseUrl explicitly to the deployed FINAP API host shown below.
import { FinapClient } from "@finap/sdk-node";
export const finap = new FinapClient({
apiKey: process.env.FINAP_API_KEY!,
baseUrl: "https://api.finap.uk",
timeout: 10_000,
});03
Available methods
bin.check(bin)Promise<BinResult>Look up a 6–8 digit BIN.
currency.rates(base, target?)Promise<CurrencyRatesResult>Get all rates or one currency pair.
iban.validate(iban)Promise<IbanResult>Normalize and validate an IBAN.
visitors.getEvent(requestId)Promise<EventDetail>Read full details for one identification event.
visitors.get(visitorId, options?)Promise<VisitorHistory>Read paginated visitor history.
webhooks.test(options)Promise<WebhookTestResult>Send an instrumented webhook test.
04
Typed errors
import { FinapError } from "@finap/sdk-node";
try {
await finap.iban.validate("GB82WEST12345698765432");
} catch (error) {
if (error instanceof FinapError) {
console.error(error.code, error.status, error.message);
}
}