Skip to main content

Lipa na mpesa library

Project description


Implementing Daraja API services

Implemented Features

  • Lipa na mpesa online
  • C2B
  • B2C


To install the library using pip, run;

pip install daraja-py

Required parameters

Lipa na Mpesa

  • phone_number
  • amount
  • BusinessShortCode
  • CallBackURL


register url
  • ConfirmationUrl
  • ValidationUrl
simulate transaction
  • phone_number
  • amount


from darajapy import lipanampesa, c2b

lmn = lipanampesa.lipa_na_mpesa(

# The register transaction is only run once
c2b_register = c2b.register_url(

c2b_simulate_transaction = c2b.simulate_c2b_transaction(

Project details

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)

Uploaded Source

Built Distribution

daraja_py-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page