Skip to main content

Lipa na mpesa library

Project description

daraja-py

Implementing Daraja API services

Implemented Features

  • <input type="checkbox" checked="" disabled="" /> Lipa na mpesa online
  • <input type="checkbox" checked="" disabled="" /> C2B
  • <input type="checkbox" disabled="" /> 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for daraja-py, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size daraja_py-1.0.1-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size daraja-py-1.0.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page