Skip to main content
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

authenticate()

Fetches a valid auth token from the provider API. The token is used in the Authorization header for subsequent requests. Each provider implements its own auth mechanism — PesaPal uses OAuth2 bearer tokens; ClickPesa uses JWT.

initiateUssdPushRequest()

Sends the USSD push payment request to the provider. The exact shape of payload and how ipnId is used depends on the provider implementation.

registerIpn()

The base implementation always throws "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".