Lipa na mpesa library
Project description
daraja-py
Implementing Daraja API services
Implemented Features
- Lipa na mpesa online
- C2B
- B2C
Installation
To install the library using pip, run;
pip install daraja-py
Required parameters
Lipa na Mpesa
- phone_number
- amount
- BusinessShortCode
- CallBackURL
C2B
register url
- ConfirmationUrl
- ValidationUrl
simulate transaction
- phone_number
- amount
Usage
from darajapy import lipanampesa, c2b
lmn = lipanampesa.lipa_na_mpesa(
'07XXXXXXXX',
'500',
'324XXXX',
'https://www.somecallbackurl.com'
)
# The register transaction is only run once
c2b_register = c2b.register_url(
'https://www.someconfirmationurl.com',
'https://www.somevalidationurl.com'
)
c2b_simulate_transaction = c2b.simulate_c2b_transaction(
'07XXXXXXXX',
'500'
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
daraja-py-1.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for daraja_py-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa12f2536641d2198dba0cbe4ea52d7d9176401c422b046551c040ce00bb6707 |
|
MD5 | 7bbb276592fc67f8454fbbd0077feac5 |
|
BLAKE2b-256 | c805c0cdb0995f00e0f9e4dd8788e32d18b2aa6224f4d441c6d0ec990ec08fef |