@ibanforge/sdk
Official TypeScript/JavaScript SDK for the IBANforge API — IBAN validation, BIC/SWIFT lookup, Swiss BC-Nummer clearing, SEPA + VoP reachability and compliance risk scoring. Zero runtime dependencies (uses native fetch).
Install
npm install @ibanforge/sdk
Quick start
import { IBANforge } from '@ibanforge/sdk';
const fmt = await new IBANforge().formatIban('CH9300762011623852957');
console.log(fmt.valid);
const client = new IBANforge({ apiKey: 'ifk_...' });
const r = await client.validateIban('CH9300762011623852957');
console.log(r.valid);
console.log(r.bic?.code);
console.log(r.bic?.bank_name);
console.log(r.sepa?.member);
console.log(r.clearing?.iid);
Get a free key in one line
const key = await IBANforge.generateApiKey('you@example.com');
const client = new IBANforge({ apiKey: key.api_key });
All methods
await client.formatIban(iban);
await client.validateIban(iban);
await client.validateBatch([...ibans]);
await client.lookupBic('UBSWCHZH80A');
await client.lookupChClearing('762');
await client.checkCompliance(iban);
await client.usage();
await client.health();
Compliance result shape
const c = await client.checkCompliance('GB29NWBK60161331926819');
console.log(c.compliance.risk_score);
console.log(c.compliance.risk_level);
console.log(c.compliance.sanctions.matched_lists);
Sanctions screening is at the bank (BIC8) level — it does not screen the beneficiary name and is not a regulated AML/CFT product.
Typed errors
Every failure throws a typed subclass of IBANforgeError, so an agent can branch on it:
import { IBANforge, PaymentRequiredError, AuthError, RateLimitError } from '@ibanforge/sdk';
try {
await new IBANforge().validateIban('CH9300762011623852957');
} catch (err) {
if (err instanceof PaymentRequiredError) {
console.log(err.accepts);
} else if (err instanceof AuthError) {
} else if (err instanceof RateLimitError) {
}
}
Config
new IBANforge({
apiKey: 'ifk_...',
baseUrl: 'https://api.ibanforge.com',
timeoutMs: 30_000,
});
Full documentation
ibanforge.com/docs
License
MIT