1
Install
Install FinConnect from npm:Alternatively, clone the repository directly:
2
Configure environment variables
Create a
.env file in your project root and add your provider credentials:Replace the placeholder values with your actual credentials. Never hardcode credentials in source code or commit them to version control.
3
Initialize the SDK
Import The SDK validates that all required config fields are present at construction time and will throw an error if any are missing.
FintechSDK and ProviderType, then create an instance with your provider and config:4
Register an IPN endpoint and process a payment
Register your IPN URL before submitting a payment so PesaPal knows where to send payment notifications:
sdk.pay() authenticates with PesaPal, formats the payload, and submits the order request. The returned object contains the provider’s response with order tracking details.Next steps
PesaPal guide
Full walkthrough for PesaPal integration with OAuth2 authentication.
ClickPesa guide
Initiate USSD push payments through ClickPesa with JWT auth.
Azampay guide
Integrate Azampay in your system with JWT auth