fintava
v2.0.0
Published
Community JavaScript SDK for Fintava Pay - authorized client and server integration
Maintainers
Readme
Fintava JavaScript/TypeScript SDK
Community JavaScript SDK for Fintava Pay - authorized client and server integration.
Installation
npm install @fintava/javascript-sdk
# or
yarn add @fintava/javascript-sdk
# or
pnpm add @fintava/javascript-sdkQuick Start
Client-side Usage
import { FintavaClient } from '@fintava/javascript-sdk';
const fintava = new FintavaClient({
publicKey: 'your-public-key',
environment: 'sandbox' // or 'production'
});
// Initialize payment
fintava.payment.initialize({
amount: 10000, // Amount in kobo
email: '[email protected]',
reference: 'unique-reference',
onSuccess: (response) => {
console.log('Payment successful:', response);
},
onError: (error) => {
console.error('Payment failed:', error);
}
});Server-side Usage
import { FintavaServer } from '@fintava/javascript-sdk';
const fintava = new FintavaServer({
secretKey: 'your-secret-key',
environment: 'sandbox'
});
// Verify payment
const verification = await fintava.payment.verify('payment-reference');
console.log('Payment status:', verification.status);Features
- ✅ Payment Processing: Initialize and verify payments
- ✅ Customer Management: Create and manage customers
- ✅ Wallet Operations: Wallet creation and management
- ✅ Transfer Operations: Bank and internal transfers
- ✅ Card Management: Virtual and physical card operations
- ✅ Bill Payments: Utility bills and airtime/data purchases
- ✅ Webhook Handling: Secure webhook verification
- ✅ TypeScript Support: Full type definitions included
- ✅ Dual Environment: Works in both browser and Node.js
Documentation
For detailed documentation, examples, and API reference, see the main repository README.
Development
# Install dependencies
pnpm install
# Start development mode
pnpm dev
# Run tests
pnpm test
# Build for production
pnpm buildLicense
MIT License - see the LICENSE file for details.
