baseProvider is the abstract base class that all FinConnect providers extend. It defines the contract each provider must implement. You interact with providers through FintechSDK, but understanding the interface helps when reading provider-specific docs.
Interface definition
Methods
| Method | Abstract | Description |
|---|---|---|
authenticate() | Yes | Fetches an auth token from the provider. Called automatically before each request — you do not need to call it yourself. |
initiateUssdPushRequest() | Yes | Sends the USSD push payment request. Called by FintechSDK.pay(). |
registerIpn() | No | Registers an IPN URL with the provider. The base implementation throws — providers override this when supported. |
authenticate()
Authorization header for subsequent requests. Each provider implements its own auth mechanism — PesaPal uses OAuth2 bearer tokens; ClickPesa uses JWT.
initiateUssdPushRequest()
payload and how ipnId is used depends on the provider implementation.
registerIpn()
"IPN registration not supported by this provider". Providers that support IPN registration (currently only PesaPal) override this method.
ClickPesa does not override
registerIpn(), so calling sdk.registerIpn() with a ClickPesa instance throws "IPN registration not supported by this provider".