Skip to content

Commit e5f2a99

Browse files
Merge pull request #2 from PaystackOSS/chore-documentation
Chore: Update documentation
2 parents 8e2d980 + bfc5f1f commit e5f2a99

20 files changed

+724
-500
lines changed

docs/Balance.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ You can only transfer from what you have
2020
* Bearer Authentication (bearerAuth):
2121
```python
2222
import paystack
23-
from paystack.rest import ApiException
2423
from pprint import pprint
2524

25+
# Set your API key based on domain (test or live mode)
26+
paystack.api_key = 'sk_domain_xxxxxxxx'
2627

2728

2829
# Fetch Balance
2930

3031
response = paystack.Balance.fetch()
32+
33+
3134
pprint(response)
3235
```
3336
### Parameters
@@ -66,18 +69,17 @@ Balance Ledger
6669
* Bearer Authentication (bearerAuth):
6770
```python
6871
import paystack
69-
from paystack.rest import ApiException
7072
from pprint import pprint
7173

74+
# Set your API key based on domain (test or live mode)
75+
paystack.api_key = 'sk_domain_xxxxxxxx'
7276

73-
per_page = 56 # int | Number of records to fetch per page (optional)
74-
page = 56 # int | The section to retrieve (optional)
75-
_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional)
76-
to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional)
7777

7878
# Balance Ledger
7979

80-
response = paystack.Balance.ledger(per_page=per_page, page=page, _from=_from, to=to)
80+
response = paystack.Balance.ledger(
81+
)
82+
8183
pprint(response)
8284
```
8385
### Parameters

docs/BulkCharge.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ Fetch Charges in a Batch
2222
* Bearer Authentication (bearerAuth):
2323
```python
2424
import paystack
25-
from paystack.rest import ApiException
2625
from pprint import pprint
2726

27+
# Set your API key based on domain (test or live mode)
28+
paystack.api_key = 'sk_domain_xxxxxxxx'
2829

2930
code = 'code_example' # str | Batch code
3031

3132
# Fetch Charges in a Batch
3233

33-
response = paystack.BulkCharge.charges(code)
34+
response = paystack.BulkCharge.charges(
35+
code,
36+
)
37+
3438
pprint(response)
3539
```
3640
### Parameters
@@ -72,15 +76,19 @@ Fetch Bulk Charge Batch
7276
* Bearer Authentication (bearerAuth):
7377
```python
7478
import paystack
75-
from paystack.rest import ApiException
7679
from pprint import pprint
7780

81+
# Set your API key based on domain (test or live mode)
82+
paystack.api_key = 'sk_domain_xxxxxxxx'
7883

7984
code = 'code_example' # str | Batch code
8085

8186
# Fetch Bulk Charge Batch
8287

83-
response = paystack.BulkCharge.fetch(code)
88+
response = paystack.BulkCharge.fetch(
89+
code,
90+
)
91+
8492
pprint(response)
8593
```
8694
### Parameters
@@ -122,14 +130,17 @@ Initiate Bulk Charge
122130
* Bearer Authentication (bearerAuth):
123131
```python
124132
import paystack
125-
from paystack.rest import ApiException
126133
from pprint import pprint
127134

135+
# Set your API key based on domain (test or live mode)
136+
paystack.api_key = 'sk_domain_xxxxxxxx'
128137

129138

130139
# Initiate Bulk Charge
131140

132141
response = paystack.BulkCharge.initiate()
142+
143+
133144
pprint(response)
134145
```
135146
### Parameters
@@ -167,18 +178,17 @@ List Bulk Charge Batches
167178
* Bearer Authentication (bearerAuth):
168179
```python
169180
import paystack
170-
from paystack.rest import ApiException
171181
from pprint import pprint
172182

183+
# Set your API key based on domain (test or live mode)
184+
paystack.api_key = 'sk_domain_xxxxxxxx'
173185

174-
per_page = 56 # int | Number of records to fetch per page (optional)
175-
page = 56 # int | The section to retrieve (optional)
176-
_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional)
177-
to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional)
178186

179187
# List Bulk Charge Batches
180188

181-
response = paystack.BulkCharge.list(per_page=per_page, page=page, _from=_from, to=to)
189+
response = paystack.BulkCharge.list(
190+
)
191+
182192
pprint(response)
183193
```
184194
### Parameters
@@ -223,15 +233,19 @@ Pause Bulk Charge Batch
223233
* Bearer Authentication (bearerAuth):
224234
```python
225235
import paystack
226-
from paystack.rest import ApiException
227236
from pprint import pprint
228237

238+
# Set your API key based on domain (test or live mode)
239+
paystack.api_key = 'sk_domain_xxxxxxxx'
229240

230241
code = 'code_example' # str | Batch code
231242

232243
# Pause Bulk Charge Batch
233244

234-
response = paystack.BulkCharge.pause(code)
245+
response = paystack.BulkCharge.pause(
246+
code,
247+
)
248+
235249
pprint(response)
236250
```
237251
### Parameters
@@ -273,15 +287,19 @@ Resume Bulk Charge Batch
273287
* Bearer Authentication (bearerAuth):
274288
```python
275289
import paystack
276-
from paystack.rest import ApiException
277290
from pprint import pprint
278291

292+
# Set your API key based on domain (test or live mode)
293+
paystack.api_key = 'sk_domain_xxxxxxxx'
279294

280295
code = 'code_example' # str | Batch code
281296

282297
# Resume Bulk Charge Batch
283298

284-
response = paystack.BulkCharge.resume(code)
299+
response = paystack.BulkCharge.resume(
300+
code,
301+
)
302+
285303
pprint(response)
286304
```
287305
### Parameters

docs/Charge.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ Check pending charge
2323
* Bearer Authentication (bearerAuth):
2424
```python
2525
import paystack
26-
from paystack.rest import ApiException
2726
from pprint import pprint
2827

28+
# Set your API key based on domain (test or live mode)
29+
paystack.api_key = 'sk_domain_xxxxxxxx'
2930

3031
reference = 'reference_example' # str |
3132

3233
# Check pending charge
3334

34-
response = paystack.Charge.check(reference)
35+
response = paystack.Charge.check(
36+
reference,
37+
)
38+
3539
pprint(response)
3640
```
3741
### Parameters
@@ -73,26 +77,17 @@ Create Charge
7377
* Bearer Authentication (bearerAuth):
7478
```python
7579
import paystack
76-
from paystack.rest import ApiException
7780
from 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+
9691
pprint(response)
9792
```
9893
### Parameters
@@ -144,9 +139,10 @@ Submit Address
144139
* Bearer Authentication (bearerAuth):
145140
```python
146141
import paystack
147-
from paystack.rest import ApiException
148142
from pprint import pprint
149143

144+
# Set your API key based on domain (test or live mode)
145+
paystack.api_key = 'sk_domain_xxxxxxxx'
150146

151147
address = 'address_example' # str | Customer's address
152148
city = '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+
160163
pprint(response)
161164
```
162165
### Parameters
@@ -201,16 +204,21 @@ Submit Birthday
201204
* Bearer Authentication (bearerAuth):
202205
```python
203206
import paystack
204-
from paystack.rest import ApiException
205207
from pprint import pprint
206208

209+
# Set your API key based on domain (test or live mode)
210+
paystack.api_key = 'sk_domain_xxxxxxxx'
207211

208212
birthday = 'birthday_example' # str | Customer's birthday in the format YYYY-MM-DD e.g 2016-09-21
209213
reference = '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+
214222
pprint(response)
215223
```
216224
### Parameters
@@ -252,16 +260,21 @@ Submit OTP
252260
* Bearer Authentication (bearerAuth):
253261
```python
254262
import paystack
255-
from paystack.rest import ApiException
256263
from pprint import pprint
257264

265+
# Set your API key based on domain (test or live mode)
266+
paystack.api_key = 'sk_domain_xxxxxxxx'
258267

259268
otp = 'otp_example' # str | Customer's OTP
260269
reference = '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+
265278
pprint(response)
266279
```
267280
### Parameters
@@ -303,16 +316,21 @@ Submit Phone
303316
* Bearer Authentication (bearerAuth):
304317
```python
305318
import paystack
306-
from paystack.rest import ApiException
307319
from pprint import pprint
308320

321+
# Set your API key based on domain (test or live mode)
322+
paystack.api_key = 'sk_domain_xxxxxxxx'
309323

310324
phone = 'phone_example' # str | Customer's mobile number
311325
reference = '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+
316334
pprint(response)
317335
```
318336
### Parameters
@@ -354,16 +372,21 @@ Submit PIN
354372
* Bearer Authentication (bearerAuth):
355373
```python
356374
import paystack
357-
from paystack.rest import ApiException
358375
from pprint import pprint
359376

377+
# Set your API key based on domain (test or live mode)
378+
paystack.api_key = 'sk_domain_xxxxxxxx'
360379

361380
pin = 'pin_example' # str | Customer's PIN
362381
reference = '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+
367390
pprint(response)
368391
```
369392
### Parameters

0 commit comments

Comments
 (0)