Skip to main content

jenga

A Python package for interacting with selected Jenga API endpoints.

Implemented features:

  • Reads configuration from environment variables
  • Generates access tokens
  • Signs request values with your RSA private key using cryptography
  • Provides both Python and CLI usage

Pending endpoints are listed later in this document.

1. Installation

pip install paymentsdks-jenga

2. Configuration

The package reads configuration from environment variables. The required variables are:

JENGA_API_KEY=
JENGA_MERCHANT_CODE=
JENGA_CONSUMER_SECRET=
JENGA_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nreplace-with-private-key\n-----END PRIVATE KEY-----"
JENGA_LIVE_MODE=false

Generate an RSA key pair with OpenSSL before setting JENGA_PRIVATE_KEY:

openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
  • Save the contents of private_key.pem in JENGA_PRIVATE_KEY.
  • Save the contents of public_key.pem in the Jenga dashboard under the Keys section.

[!INFO]

  • JENGA_LIVE_MODE=true uses https://api.finserve.africa white JENGA_LIVE_MODE=false uses https://uat.finserve.africa
  • For PEM values, you can use either real multiline values or \n-escaped text in .env files.

If you are using a local .env file, load it into your shell before running commands:

3. Usage

3.1 Signature generation

Request signing is handled internally by JengaClient before protected endpoint calls are made.

If you need to generate a signature manually:

from jenga import JengaClient

client = JengaClient.from_env()
signature = client.sign("KE", "1450160649886")

The data is signed in the order it is passed.

3.1 Python usage

Use the package directly in your application code.

from jenga import JengaClient

client = JengaClient.from_env()

balance = client.account_balance(
    country_code="KE",
    account_id="1450160649886",
)

statement = client.mini_statement(
    country_code="KE",
    account_id="1450160649886",
)

4. Endpoint Coverage

4.1 Account Services

4.1.1 Account Balance

Python:

from jenga import JengaClient

client = JengaClient.from_env()
result = client.account_balance(country_code="KE", account_id="1450160649886")
print(result)

CLI:

PYTHONPATH=src python3 -m jenga.cli account-balance --country-code KE --account-id 1450160649886
4.1.2 Account Mini Statement

Python:

from jenga import JengaClient

client = JengaClient.from_env()
result = client.mini_statement(country_code="KE", account_id="1450160649886")
print(result)

CLI:

PYTHONPATH=src python3 -m jenga.cli mini-statement --country-code KE --account-id 1450160649886
  • Account Full Statement
  • Opening and Closing Account Balance
  • Account Inquiry - Bank Accounts

4.2 Send Money

  • Within Equity Bank
  • To Mobile Wallets
  • RTGS
  • SWIFT
  • Pesalink - To Bank Account
  • Pesalink - To Mobile Number

4.3 Send Money - IMT

  • IMT Within Equity Bank
  • IMT to Mobile Wallets
  • IMT Pesalink - To Bank Account
  • IMT Pesalink - To Bank Mobile

4.4 Receive Money

  • Receive Payments - Bill Payments
  • Receive Payments - Merchant Payments
  • Bill Validation

4.5 Receive Money Queries

  • Get All EazzyPay Merchants
  • Query Transaction Details
  • Get All Billers

4.6 Airtime

  • Purchase Airtime

4.7 Forex Rates

  • Forex Exchange Rates

4.8 ID Search and Verification

  • ID Search and Verification

4.9 MPGS Direct Integration

  • MPGS Validate Payment
  • MPGS Authenticate Payment
  • MPGS Authorize Payment
  • MPGS Query Payment
  • MPGS Refund Payment

5. Testing

Run the automated tests:

python3 -m unittest discover -s tests

Run a real manual test with your local .env:

set -a
source .env
set +a
PYTHONPATH=src python3 -m jenga.cli account-balance --country-code KE --account-id 1450160649886

6. Notes

  • This package currently focuses on a small subset of Jenga APIs.
  • The README only documents endpoints that are actually implemented in this repository.
  • Pending endpoints are listed for roadmap visibility only.
  • See the contribution guide for development and pull request workflow.

7. Releases

  • Tagged releases matching v* trigger GitHub Actions to test, build, and publish the package to PyPI automatically.
  • Example tag: v0.1.1
  • PyPI trusted publishing must be configured once for this repository before the workflow can publish.

8. License

License: MIT

Metadata

Release files for paymentsdks-jenga 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paymentsdks-jenga 0.2.0
File Size Uploaded Provenance Actions
paymentsdks_jenga-0.2.0.tar.gz 9.5 kB With provenance Details for paymentsdks_jenga-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for paymentsdks-jenga 0.2.0
File Interpreter ABI Platform Actions
paymentsdks_jenga-0.2.0-py3-none-any.whl Python 3 none any Details for paymentsdks_jenga-0.2.0-py3-none-any.whl

Total release size: 17.4 kB

Release files / paymentsdks_jenga-0.2.0.tar.gz

Download URL paymentsdks_jenga-0.2.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ccb95a5356f31264eda72157ebe1552c5fb92e514e026a8b42b48db771447ccf
BLAKE2b-256 checksum
How to use checksums
3990fc597fd5dc3412b33a390845a68cc318f0ad0454f5e2bbae97b17ce9081f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

Release files / paymentsdks_jenga-0.2.0-py3-none-any.whl

Download URL paymentsdks_jenga-0.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90bb4145d9992a43f48e3aaee9b0066ecf7f1f361e2d628967d65bdadada8d88
BLAKE2b-256 checksum
How to use checksums
edeb740503d213c6e7b256974519c42f7ee32f24bf83875d0f4d0fbf85f4ee1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

Security for paymentsdks-jenga 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for paymentsdks_jenga-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page