Mpesa Elixir v0.1.0 Mpesa View Source
Documentation for Mpesa
.
Link to this section Summary
Functions
Gets the Access Token .
Gets the URL , depending on the env.
Initiates the Mpesa Lipa Online STK Push .
Link to this section Functions
Gets the Access Token .
Examples
iex> Mpesa.authorize()
{:ok, "zUqIM1WR9cfG2KHHtrk0B8NTQrLX"}
{:error, "Wrong Credentials"}
Gets the URL , depending on the env.
Initiates the Mpesa Lipa Online STK Push .
Examples
iex> Mpesa.make_request(10, "254724540039", "reference", "description")
{:ok,
%{
"CheckoutRequestID" => "ws_CO_010320202011179845",
"CustomerMessage" => "Success. Request accepted for processing",
"MerchantRequestID" => "25558-10595705-4",
"ResponseCode" => "0",
"ResponseDescription" => "Success. Request accepted for processing"
}}
{:error, "Invalid Access Token"}