Skip to content

truehostcloud/jenga-python-client

Repository files navigation

jenga-api-client

API for Jenga payment processing and transaction management

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.0
  • Package version: 1.0.0
  • Generator version: 7.13.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import jenga_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import jenga_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import jenga_client
from jenga_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.finserve.africa
# See configuration.py for a list of all supported configuration parameters.
configuration = jenga_client.Configuration(
    host = "https://api.finserve.africa"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: SignatureAuth
configuration.api_key['SignatureAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SignatureAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = jenga_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with jenga_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = jenga_client.DefaultApi(api_client)
    payment_link_request = jenga_client.PaymentLinkRequest() # PaymentLinkRequest | 

    try:
        # Create Payment Link
        api_response = api_instance.api_checkout_api_v1_create_payment_link_post(payment_link_request)
        print("The response of DefaultApi->api_checkout_api_v1_create_payment_link_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->api_checkout_api_v1_create_payment_link_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.finserve.africa

Class Method HTTP request Description
DefaultApi api_checkout_api_v1_create_payment_link_post POST /api-checkout/api/v1/create/payment-link Create Payment Link
DefaultApi api_checkout_mpesa_stk_push_v30_init_post POST /api-checkout/mpesa-stk-push/v3.0/init Initiate M-Pesa STK Push
DefaultApi api_checkout_mpesa_stk_push_v30_status_order_reference_get GET /api-checkout/mpesa-stk-push/v3.0/status/order/{reference} Query M-Pesa STK Push Order Status
DefaultApi authentication_api_v3_authenticate_merchant_post POST /authentication/api/v3/authenticate/merchant Authenticate merchant
DefaultApi v3_apis_payment_api_v30_stkussdpush_initiate_post POST /v3-apis/payment-api/v3.0/stkussdpush/initiate Initiate Equitel STK/USSD Push
DefaultApi v3_apis_transaction_api_v30_billers_get GET /v3-apis/transaction-api/v3.0/billers Get All Billers
DefaultApi v3_apis_transaction_api_v30_bills_pay_post POST /v3-apis/transaction-api/v3.0/bills/pay Initiate bill payment
DefaultApi v3_apis_transaction_api_v30_bills_validation_post POST /v3-apis/transaction-api/v3.0/bills/validation Validate bill
DefaultApi v3_apis_transaction_api_v30_merchants_get GET /v3-apis/transaction-api/v3.0/merchants Get All EazzyPay Merchants
DefaultApi v3_apis_transaction_api_v30_remittance_internal_bank_transfer_imt_post POST /v3-apis/transaction-api/v3.0/remittance/internalBankTransfer/imt IMT Within Equity Bank
DefaultApi v3_apis_transaction_api_v30_transaction_transaction_id_get GET /v3-apis/transaction-api/v3.0/transaction/{transactionId} Get Transaction Details

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: Api-Key
  • Location: HTTP header

BearerAuth

  • Type: Bearer authentication

SignatureAuth

  • Type: API key
  • API key parameter name: Signature
  • Location: HTTP header

Author

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •