-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added USSD Payments - Added USSD example to docs - Refactored previous docs (No major change)
- Loading branch information
1 parent
e7531bd
commit e2821e5
Showing
3 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ details = payment.get_payment_details(transaction_id) | |
print(details) | ||
``` | ||
|
||
- To trigger an automatic mpesa charge on your customer, first configure your Webhook url in the dashboard, it may be a | ||
- To trigger an automatic MPESA charge on your customer through STK push, first configure your Webhook url in the dashboard, it may be a | ||
simple server; Flutterwave will post some data regarding your transaction status in that url. This method call will | ||
return a Python dict object. You can decide what to do thereon. | ||
``` | ||
|
@@ -49,3 +49,15 @@ mpesa_trans_details = payment.trigger_mpesa_payment(tx_ref="qwertyuio", amount=1 | |
full_name='John Doe') | ||
print(mpesa_trans_details) | ||
``` | ||
|
||
- To initiate a USSD payment to your customer, configure your webhook url in the dashboard where Flutterwave will post data | ||
regarding the transaction. This method call will return a Python Dict object from which you can extract the USSD code to | ||
show your customer for payment completion. For other banks, you may also need to extract the `payment_code` from the result. | ||
|
||
- By default, `NGN` is the only supported currency for USSD payments so this method automatically uses `NGN` | ||
- Only a number of banks support `USSD` so you have to refer to the docs to check your bank and its corresponding `account_bank` code. | ||
``` | ||
details = payment.initiate_ussd_payment(tx_ref="123erd", amount=100, email='[email protected]', | ||
phone_number='789456123', full_name='John Doe', account_bank='057') | ||
print(details) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = python-flutterwave | ||
version = 0.1.4 | ||
version = 0.2.5 | ||
author = William Otieno | ||
author_email = [email protected] | ||
description = Python Wrapper for interacting with the Flutterwave Payments API | ||
|