You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On your browser, you will receive a message `Success. Request accepted for processing` on success of the STK push. You will also receive a notification on the callback endpoint (In this case the URL with the name `mpesa_stk_push_callback`), having the results of the STK push.
45
+
On your browser, you will receive a message `Success. Request accepted for processing` on success of the STK push, and on the phone number specified you will receive an MPESA PIN prompt. Once the transaction is complete, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/express-payment), you can head over to https://darajambili.com to view the notification received
46
46
47
47
### B2C Payment
48
48
@@ -57,16 +57,12 @@ An example, to perform a BusinessPayment B2C (Business to Customer) transaction
On your browser, you will receive a message `Accept the service request successfully.` on success of the transaction. You will also receive a notification on the callback endpoint (In this case the URL with the name `mpesa_business_payment_callback`), having the results of the Business Payment Transaction.
67
-
68
-
## Note
69
-
70
-
You need a callback URL connected to the internet to receive the asynchronous result. In case you don't have one you can head over to https://darajambili.com and grab a callback URL to test the result.
66
+
On your browser, you will receive a message `Accept the service request successfully.` on success of the transaction. Once the transaction is complete, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/b2c/result), you can head over to https://darajambili.com to view the notification received
71
67
72
68
The full documentation of all supported API's can be found at https://django-daraja.readthedocs.io
@@ -62,4 +62,4 @@ This will assign the ``response`` variable with an ``MpesaResponse`` object cont
62
62
.. note::
63
63
- Test credentials to use for this scenario can be found at the developer portal (https://developer.safaricom.co.ke/test_credentials)
64
64
- Use `shortcode 1` as the shortcode, and the test MSISDN as the B2C phone number
65
-
- This example will work if your site is already hosted, since the callback URL needs to be accessible via internet. For local testing purposes, you can use an endpoint hosted outside your site to check the notification received on the callback URL. There is a test listener hosted at https://darajambili.com, which you can use to view logs of notifications received. You can head over there to pick a callback URL to use for B2C Payments.
65
+
- Once the transaction is complete, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/b2c/result), you can head over to https://darajambili.com to view the notification received
This will assign the ``response`` variable with an ``MpesaResponse`` object containing the response returned from the STK Push API call.
22
22
23
23
.. note::
24
-
- Use a Safaricom number that you have access to for the ``phone_number`` parameter, so as to be able to receive the prompt on your phone.
25
-
- You will need to define a url with the name ``mpesa_stk_push_callback``, and this is where MPESA will send the results of the STK push once the customer enters the PIN or cancels the transaction, or in case the prompt times out.
26
-
- This example will work if your site is already hosted, since the callback URL needs to be accessible via internet. For local testing purposes, you can use an endpoint hosted outside your site to check the notification received on the callback URL. There is a test listener hosted at https://darajambili.com, which you can use to view logs of notifications received. You can head over there to pick a callback URL to use for STK push.
24
+
- Use a Safaricom number that you have access to for the ``phone_number`` parameter, so as to be able to receive the M-PESA prompt on your phone.
25
+
- Once you have entered the PIN, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/express-payment), you can head over to https://darajambili.com to view the notification received.
On your browser, you will receive the API response message. You will also receive a notification on the callback endpoint (In this case the URL with the name ``mpesa_stk_push_callback``), having the results of the STK push.
37
+
On your browser, you will receive the API response message and on the phone number specified you will receive an MPESA PIN prompt. Once you have entered the PIN, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/express-payment), you can head over to https://darajambili.com to view the notification received.
# You can do whatever you want with the notification received from MPESA here.
188
-
189
184
.. note::
190
-
- Use a Safaricom number that you have access to for the ``phone_number`` parameter, so as to be able to receive the prompt on your phone.
191
-
- You will need to define a url with the name ``mpesa_stk_push_callback``, and this is where MPESA will send the results of the STK push once the customer enters the PIN or cancels the transaction, or in case the prompt times out.
192
-
- This example will work if your site is already hosted, since the callback URL needs to be accessible via internet. For local testing purposes, you can use an endpoint hosted outside your site to check the notification received on the callback URL. There is a test listener hosted at https://darajambili.com, which you can use to view logs of notifications received. You can head over there to pick a callback URL to use for STK push.
185
+
- Use a Safaricom number that you have access to for the ``phone_number`` parameter, so as to be able to receive the M-PESA prompt on your phone.
186
+
- Once you have entered the PIN, you will receive a notification on the callback URL you provided. If you used the exact callback URL in the example above (i.e. https://api.darajambili.com/express-payment), you can head over to https://darajambili.com to view the notification received.
0 commit comments