@@ -23,15 +23,19 @@ Check pending charge
2323* Bearer Authentication (bearerAuth):
2424``` python
2525import paystack
26- from paystack.rest import ApiException
2726from pprint import pprint
2827
28+ # Set your API key based on domain (test or live mode)
29+ paystack.api_key = ' sk_domain_xxxxxxxx'
2930
3031reference = ' reference_example' # str |
3132
3233# Check pending charge
3334
34- response = paystack.Charge.check(reference)
35+ response = paystack.Charge.check(
36+ reference,
37+ )
38+
3539pprint(response)
3640```
3741### Parameters
@@ -73,26 +77,17 @@ Create Charge
7377* Bearer Authentication (bearerAuth):
7478``` python
7579import paystack
76- from paystack.rest import ApiException
7780from pprint import pprint
7881
82+ # Set your API key based on domain (test or live mode)
83+ paystack.api_key = ' sk_domain_xxxxxxxx'
7984
80- email = ' email_example' # str | Customer's email address (optional)
81- amount = ' amount_example' # str | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional)
82- authorization_code = ' authorization_code_example' # str | An authorization code to charge. (optional)
83- pin = ' pin_example' # str | 4-digit PIN (send with a non-reusable authorization code) (optional)
84- reference = ' reference_example' # str | Unique transaction reference. Only -, .`, = and alphanumeric characters allowed. (optional)
85- birthday = ' 2013-10-20T19:20:30+01:00' # datetime | The customer's birthday in the format YYYY-MM-DD e.g 2017-05-16 (optional)
86- device_id = ' device_id_example' # str | This is the unique identifier of the device a user uses in making payment. Only -, .`, = and alphanumeric characters are allowed. (optional)
87- metadata = ' metadata_example' # str | Stringified JSON object of custom data (optional)
88- bank = paystack.Bank() # Bank | (optional)
89- mobile_money = paystack.MobileMoney() # MobileMoney | (optional)
90- ussd = paystack.USSD() # USSD | (optional)
91- eft = paystack.EFT() # EFT | (optional)
9285
9386# Create Charge
9487
95- response = paystack.Charge.create(email = email, amount = amount, authorization_code = authorization_code, pin = pin, reference = reference, birthday = birthday, device_id = device_id, metadata = metadata, bank = bank, mobile_money = mobile_money, ussd = ussd, eft = eft)
88+ response = paystack.Charge.create(
89+ )
90+
9691pprint(response)
9792```
9893### Parameters
@@ -144,9 +139,10 @@ Submit Address
144139* Bearer Authentication (bearerAuth):
145140``` python
146141import paystack
147- from paystack.rest import ApiException
148142from pprint import pprint
149143
144+ # Set your API key based on domain (test or live mode)
145+ paystack.api_key = ' sk_domain_xxxxxxxx'
150146
151147address = ' address_example' # str | Customer's address
152148city = ' city_example' # str | Customer's city
@@ -156,7 +152,14 @@ reference = 'reference_example' # str | The reference of the ongoing transaction
156152
157153# Submit Address
158154
159- response = paystack.Charge.submit_address(address, city, state, zipcode, reference)
155+ response = paystack.Charge.submit_address(
156+ address,
157+ city,
158+ state,
159+ zipcode,
160+ reference,
161+ )
162+
160163pprint(response)
161164```
162165### Parameters
@@ -201,16 +204,21 @@ Submit Birthday
201204* Bearer Authentication (bearerAuth):
202205``` python
203206import paystack
204- from paystack.rest import ApiException
205207from pprint import pprint
206208
209+ # Set your API key based on domain (test or live mode)
210+ paystack.api_key = ' sk_domain_xxxxxxxx'
207211
208212birthday = ' birthday_example' # str | Customer's birthday in the format YYYY-MM-DD e.g 2016-09-21
209213reference = ' reference_example' # str | The reference of the ongoing transaction
210214
211215# Submit Birthday
212216
213- response = paystack.Charge.submit_birthday(birthday, reference)
217+ response = paystack.Charge.submit_birthday(
218+ birthday,
219+ reference,
220+ )
221+
214222pprint(response)
215223```
216224### Parameters
@@ -252,16 +260,21 @@ Submit OTP
252260* Bearer Authentication (bearerAuth):
253261``` python
254262import paystack
255- from paystack.rest import ApiException
256263from pprint import pprint
257264
265+ # Set your API key based on domain (test or live mode)
266+ paystack.api_key = ' sk_domain_xxxxxxxx'
258267
259268otp = ' otp_example' # str | Customer's OTP
260269reference = ' reference_example' # str | The reference of the ongoing transaction
261270
262271# Submit OTP
263272
264- response = paystack.Charge.submit_otp(otp, reference)
273+ response = paystack.Charge.submit_otp(
274+ otp,
275+ reference,
276+ )
277+
265278pprint(response)
266279```
267280### Parameters
@@ -303,16 +316,21 @@ Submit Phone
303316* Bearer Authentication (bearerAuth):
304317``` python
305318import paystack
306- from paystack.rest import ApiException
307319from pprint import pprint
308320
321+ # Set your API key based on domain (test or live mode)
322+ paystack.api_key = ' sk_domain_xxxxxxxx'
309323
310324phone = ' phone_example' # str | Customer's mobile number
311325reference = ' reference_example' # str | The reference of the ongoing transaction
312326
313327# Submit Phone
314328
315- response = paystack.Charge.submit_phone(phone, reference)
329+ response = paystack.Charge.submit_phone(
330+ phone,
331+ reference,
332+ )
333+
316334pprint(response)
317335```
318336### Parameters
@@ -354,16 +372,21 @@ Submit PIN
354372* Bearer Authentication (bearerAuth):
355373``` python
356374import paystack
357- from paystack.rest import ApiException
358375from pprint import pprint
359376
377+ # Set your API key based on domain (test or live mode)
378+ paystack.api_key = ' sk_domain_xxxxxxxx'
360379
361380pin = ' pin_example' # str | Customer's PIN
362381reference = ' reference_example' # str | Transaction reference that requires the PIN
363382
364383# Submit PIN
365384
366- response = paystack.Charge.submit_pin(pin, reference)
385+ response = paystack.Charge.submit_pin(
386+ pin,
387+ reference,
388+ )
389+
367390pprint(response)
368391```
369392### Parameters
0 commit comments