55from python_flutterwave .decorators import handle_api_exceptions
66
77
8- token = os .environ .get ("SECRET_KEY " )
8+ token = os .environ .get ("FW_SECRET_KEY " )
99base_url = "https://api.flutterwave.com/v3/charges"
1010
1111
@@ -17,10 +17,14 @@ def initiate_bank_charge(
1717) -> dict :
1818 """
1919 Collect payments from your customers via bank transfers
20- :param tx_ref: str
21- :param amount: int
22- :param email: str
23- :return: dict
20+
21+ Args:
22+ tx_ref (int): This is a unique reference peculiar to the transaction being carried out.
23+ amount (int): This is the amount to be charged for the transaction.
24+ email (str): The customer's email address.
25+
26+ Returns:
27+ dict: Response Details
2428 """
2529
2630 params = {"type" : "bank_transfer" }
@@ -46,10 +50,14 @@ def initiate_nigeria_bank_charge(
4650) -> dict :
4751 """
4852 Charge Nigerian bank accounts using Flutterwave
49- :param tx_ref: str
50- :param amount: int
51- :param email: str
52- :return: dict
53+
54+ Args:
55+ tx_ref (int): This is a unique reference peculiar to the transaction being carried out.
56+ amount (int): This is the amount to be charged for the transaction.
57+ email (str): The customer's email address.
58+
59+ Returns:
60+ dict: Response Details
5361 """
5462
5563 params = {"type" : "mono" }
@@ -73,12 +81,16 @@ def initiate_uk_eu_bank_charge(
7381) -> dict :
7482 """
7583 Charge Customers UK and EU bank accounts
76- :param tx_ref: str
77- :param amount: int
78- :param email: str
79- :param phone_number: str
80- :param is_token_io: int
81- :return: dict
84+
85+ Args:
86+ tx_ref (int): Unique reference peculiar to the transaction.
87+ amount (int): Amount to be charged for the transaction.
88+ email (str): The customer's email address.
89+ phone_number (str): Phone number linked to the customer's bank account or mobile money account
90+ is_token_io (int):
91+
92+ Returns:
93+ dict: Response Details
8294 """
8395
8496 params = {"type" : "account-ach-uk" }
@@ -108,12 +120,16 @@ def initiate_ach_bank_charge(
108120) -> dict :
109121 """
110122 Collect ACH payments for USD and ZAR transactions
111- :param tx_ref: str
112- :param amount: int
113- :param email: str
114- :param phone_number: str
115- :param currency: str
116- :return: dict
123+
124+ Args:
125+ tx_ref (int): Unique reference peculiar to the transaction.
126+ amount (int): Amount to be charged for the transaction.
127+ email (str): The customer's email address.
128+ phone_number (str): Phone number linked to the customer's bank account or mobile money account
129+ currency (str): Currency to charge in. Expected values are ZAR for ZA ACH and USD for US ACH.
130+
131+ Returns:
132+ dict: Response Details
117133 """
118134
119135 params = {"type" : "account-ach-uk" }
0 commit comments