Integrate banking, payments, and financial services into your web applications with our lightweight JavaScript library. Works with React, Vue, Angular, and any modern JavaScript framework.
Install the SDK via npm or include directly in your HTML:
npm install @onelinkfintech/sdk
yarn add @onelinkfintech/sdk
<script src="https://cdn.onelinkfintech.com/sdk/v2/latest/onelink.min.js"></script>
import OneLink from '@onelinkfintech/sdk';
// Initialize with your API keys
const client = new OneLink({
apiKey: 'your_live_api_key', // Get from dashboard
environment: 'sandbox' // or 'production'
});
Drop-in components for account opening, KYC flows, and payment widgets that match your brand.
Full TypeScript definitions for all API methods and response types.
Custom hooks for React applications to manage state and side effects.
Utilities for verifying and handling webhook events from our API.
Consistent error objects with codes and user-friendly messages.
Support for 15+ languages in UI components and error messages.
// Create a new bank account
const account = await client.accounts.create({
currency: 'EUR',
owner: {
name: 'John Doe',
email: 'john@example.com'
}
});
// Get account balance
const balance = await client.accounts.getBalance(account.id);
// Send a payment
const payment = await client.payments.create({
amount: 1000, // in cents
currency: 'EUR',
recipient: 'recipient_id',
description: 'Invoice #123'
});
// List payments
const payments = await client.payments.list({
limit: 10,
status: 'completed'
});
// Issue a virtual card
const card = await client.cards.create({
accountId: 'acc_123',
type: 'virtual',
limits: {
daily: 5000 // €50.00
}
});
// Freeze a card
await client.cards.update(card.id, { status: 'frozen' });
Embed pre-built components that handle complex financial workflows:
// Initialize the account onboarding widget
const onboarding = client.ui.onboarding({
container: '#onboarding-container',
onComplete: (account) => {
console.log('Account created:', account);
},
onError: (error) => {
console.error('Error:', error);
}
});
// Start the flow
onboarding.start();
// Initialize payment widget
const paymentWidget = client.ui.payment({
container: '#payment-container',
amount: 1999, // €19.99
currency: 'EUR',
onSuccess: (payment) => {
console.log('Payment successful:', payment);
}
});
The JavaScript SDK works with all modern browsers and frameworks:
The SDK supports all modern browsers that implement ES6 features. For legacy browser support, include our polyfill bundle:
<script src="https://cdn.onelinkfintech.com/sdk/v2/latest/onelink.polyfill.min.js"></script>
Get started with the OneLinkFintech JavaScript SDK today.