@biswajitdash-09/strait-sdk
v1.0.2
Published
Official TypeScript & JavaScript SDK for Strait Financial Infrastructure — Nigerian Microfinance Banking Network
Maintainers
Readme
@biswajitdash-09/strait-sdk
Official TypeScript & JavaScript Client SDK for Strait Financial Infrastructure, powering seamless integrations with Nigerian Microfinance Banks (MFBs), account balance feeds, and instant inter-bank settlements.
Installation
npm install @biswajitdash-09/strait-sdk
# or
yarn add @biswajitdash-09/strait-sdk
# or
pnpm add @biswajitdash-09/strait-sdkQuickstart & Authentication
Generate your secret API key from the Strait Developer Portal (strait_live_... or strait_test_...).
import { StraitClient } from "@biswajitdash-09/strait-sdk";
const strait = new StraitClient({
apiKey: "strait_live_89f02c918e9a4f619b02a1e0b5c19283",
baseUrl: "https://strait-eight.vercel.app",
environment: "production", // or 'sandbox'
});
// 1. Verify API Key
const authStatus = await strait.auth.verifyKey();
console.log("Connected to Strait:", authStatus);
// 2. Query Connected Nigerian MFBs
const banks = await strait.banks.list();
console.log("Connected Banks:", banks);
// 3. Fetch Linked Accounts & Balances
const accounts = await strait.accounts.list();
console.log("Customer MFB Accounts:", accounts);
// 4. Initiate Instant Settlement / Transfer
const transfer = await strait.transfers.create({
sourceBankId: "heritage-mfb",
sourceAccountId: "0192837465",
destinationBankId: "lapo-mfb",
destinationAccountId: "2094857192",
amount: 25000.0,
currency: "NGN",
narration: "Payment for goods",
});
console.log("Transfer Receipt:", transfer);Integration with MyPay Unified Wallet
- Generate your API key in Strait (
/dashboard/api-keys). - Copy the key and open MyPay Unified Wallet → Settings → Strait Banking Network.
- Paste the key into the input field and press Enter.
- MyPay will instantly perform an authentication handshake, verify your credentials, and sync your Nigerian Microfinance Bank balances into your unified wallet.
License
MIT © Strait Financial Technologies.
