A command line app for interacting with Korapay's API. Built with Typer and korapay-client
Korapay CLI can be installed from pypi with pip as shown below.
pip install korapay-clior with uv
uv tool install korapay-cliYou're required to add your korapay integration credentials (i.e. public key,secret key and encryption key) to the cli
on first use as shown below. This package provides korapay and kp as the cli's entry point
korapay config crendtials
# or
kp config crendtialsThis sets up your korapay cli for use in development mode if the test secret key is used. This credentials can be
removed with korapay reset or kp reset. The credentials are stored in $HOME/.config/.korapay-cli/.settings.json
for mac and linux and C:\Users\<user>\AppData\Local\.korapay-cli/.settings.json on windows
Run korapay --help or kp --help to see available commands
# kp or korapay resolve-bank-account [BANK_CODE] [ACCOUNT_NUMBER]
kp resolve-bank-account 214 5273681014Running the command above should yield a result similar to the dump shown below
Response(status_code=200, status=True, message='Request completed', data={'bank_name': 'FCMB Plc', 'bank_code': '214', 'account_number': '5273681014', 'account_name': 'ADEYI GBENGA MICHAEL'})By default, the results you get from the cli is a Response object which is a pydantic model returned
by korapay-client. To get a json result, use the --json
flag.
# kp or korapay resolve-bank-account [BANK_CODE] [ACCOUNT_NUMBER]
kp resolve-bank-account 214 5273681014 --jsonRunning the command above should yield a result similar to the dump shown below
{"bank_name": "FCMB Plc", "bank_code": "214", "account_number": "5273681014", "account_name": "ADEYI GBENGA MICHAEL"}