Skip to content

Commit c8381fd

Browse files
chore: update payment requests examples and descriptions
1 parent 1c84fdf commit c8381fd

11 files changed

+2671
-2641
lines changed

dist/paystack.yaml

Lines changed: 2607 additions & 2592 deletions
Large diffs are not rendered by default.

src/assets/openapi/components/schemas/PaymentRequestCreate.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
type: object
22
required:
33
- customer
4+
- amount
45
properties:
56
customer:
67
description: Customer id or code
@@ -39,32 +40,25 @@ properties:
3940
Indicates whether Paystack sends an email notification to customer.
4041
Defaults to true
4142
type: boolean
42-
items:
43-
type: object
4443
draft:
4544
description: >-
4645
Indicate if request should be saved as draft. Defaults to false and
4746
overrides send_notification
4847
type: boolean
49-
items:
50-
type: object
5148
has_invoice:
5249
description: >-
5350
Set to true to create a draft invoice (adds an auto incrementing invoice
54-
number if none is provided)
55-
56-
even if there are no line_items or tax passed
51+
number if none is provided) even if there are no line_items or tax passed
5752
type: boolean
58-
items:
59-
type: object
6053
invoice_number:
6154
description: >-
62-
Numeric value of invoice. Invoice will start from 1 and auto increment
63-
from there. This field is to help
64-
65-
override whatever value Paystack decides. Auto increment for subsequent
66-
invoices continue from this point.
55+
Numeric value of invoice. Invoice will start from 1 and auto increment from there.
56+
This field is to help override whatever value Paystack decides. Auto increment for
57+
subsequent invoices continue from this point.
6758
type: integer
6859
split_code:
6960
description: The split code of the transaction split.
7061
type: string
62+
example:
63+
customer: CUS_xqp6o5oja5cackf
64+
amount: 10000

src/assets/openapi/components/schemas/PaymentRequestUpdate.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,26 @@ properties:
3737
Indicates whether Paystack sends an email notification to customer.
3838
Defaults to true
3939
type: boolean
40-
items:
41-
type: object
4240
draft:
4341
description: >-
4442
Indicate if request should be saved as draft. Defaults to false and
4543
overrides send_notification
4644
type: boolean
47-
items:
48-
type: object
4945
has_invoice:
5046
description: >-
5147
Set to true to create a draft invoice (adds an auto incrementing invoice
52-
number if none is provided)
53-
54-
even if there are no line_items or tax passed
48+
number if none is provided) even if there are no line_items or tax passed
5549
type: boolean
5650
items:
5751
type: object
5852
invoice_number:
5953
description: >-
6054
Numeric value of invoice. Invoice will start from 1 and auto increment
61-
from there. This field is to help
62-
63-
override whatever value Paystack decides. Auto increment for subsequent
64-
invoices continue from this point.
55+
from there. This field is to help override whatever value Paystack decides.
56+
Auto increment for subsequent invoices continue from this point.
6557
type: integer
6658
split_code:
6759
description: The split code of the transaction split.
6860
type: string
61+
example:
62+
amount: 15000

src/assets/openapi/openapi.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ tags:
8989
A collection of endpoints gaining insights into the amount on an
9090
integration
9191
x-product-name: Balance
92+
- name: Payment Request
93+
description: |
94+
A collection of endpoints for managing invoices for the payment of goods
95+
and services
96+
x-product-name: Payment Requests
9297
- name: Product
9398
description: |
9499
A collection of endpoints for creating and managing inventories
@@ -106,11 +111,6 @@ tags:
106111
A collection of endpoints for creating and managing links for the
107112
collection of payment for products
108113
x-product-name: Payment Pages
109-
- name: Payment Request
110-
description: |
111-
A collection of endpoints for managing invoices for the payment of goods
112-
and services
113-
x-product-name: Payment Requests
114114
- name: Settlement
115115
description: |
116116
A collection of endpoints for gaining insights into payouts
@@ -302,6 +302,20 @@ paths:
302302
$ref: paths/balance.yaml
303303
/balance/ledger:
304304
$ref: paths/balance_ledger.yaml
305+
/paymentrequest:
306+
$ref: paths/paymentrequest.yaml
307+
/paymentrequest/{id}:
308+
$ref: paths/paymentrequest_{id}.yaml
309+
/paymentrequest/verify/{id}:
310+
$ref: paths/paymentrequest_verify_{id}.yaml
311+
/paymentrequest/notify/{id}:
312+
$ref: paths/paymentrequest_notify_{id}.yaml
313+
/paymentrequest/totals:
314+
$ref: paths/paymentrequest_totals.yaml
315+
/paymentrequest/finalize/{id}:
316+
$ref: paths/paymentrequest_finalize_{id}.yaml
317+
/paymentrequest/archive/{id}:
318+
$ref: paths/paymentrequest_archive_{id}.yaml
305319
/product:
306320
$ref: paths/product.yaml
307321
/product/{id}:
@@ -336,20 +350,6 @@ paths:
336350
$ref: paths/page_check_slug_availability_{slug}.yaml
337351
/page/{id}/product:
338352
$ref: paths/page_{id}_product.yaml
339-
/paymentrequest:
340-
$ref: paths/paymentrequest.yaml
341-
/paymentrequest/{id}:
342-
$ref: paths/paymentrequest_{id}.yaml
343-
/paymentrequest/verify/{id}:
344-
$ref: paths/paymentrequest_verify_{id}.yaml
345-
/paymentrequest/notify/{id}:
346-
$ref: paths/paymentrequest_notify_{id}.yaml
347-
/paymentrequest/totals:
348-
$ref: paths/paymentrequest_totals.yaml
349-
/paymentrequest/finalize/{id}:
350-
$ref: paths/paymentrequest_finalize_{id}.yaml
351-
/paymentrequest/archive/{id}:
352-
$ref: paths/paymentrequest_archive_{id}.yaml
353353
/settlement:
354354
$ref: paths/settlement.yaml
355355
/settlement/{id}/transaction:

src/assets/openapi/paths/paymentrequest.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Payment Request
44
summary: Create Payment Request
5+
description: Create a new payment request by issuing an invoice to a customer
56
operationId: paymentRequest_create
67
requestBody:
78
content:
@@ -22,6 +23,7 @@ get:
2223
tags:
2324
- Payment Request
2425
summary: List Payment Request
26+
description: List all previously created payment requests to your customers
2527
operationId: paymentRequest_list
2628
parameters:
2729
- in: query
@@ -43,6 +45,12 @@ get:
4345
name: status
4446
schema:
4547
type: string
48+
enum:
49+
- draft
50+
- pending
51+
- success
52+
- failed
53+
example: success
4654
description: Invoice status to filter
4755
- in: query
4856
name: currency

src/assets/openapi/paths/paymentrequest_archive_{id}.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of a previously created payment request
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 18823736
79
post:
810
tags:
911
- Payment Request
1012
summary: Archive Payment Request
13+
description: |
14+
Archive a payment request to clean up your records. An archived payment request cannot be verified and will not
15+
be returned when listing all previously created payment requests.
1116
operationId: paymentRequest_archive
1217
responses:
1318
'200':

src/assets/openapi/paths/paymentrequest_finalize_{id}.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of a draft payment request
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 18823736
79
post:
810
tags:
911
- Payment Request
1012
summary: Finalize Payment Request
13+
description: Finalise the creation of a draft payment request for a customer
1114
operationId: paymentRequest_finalize
1215
responses:
1316
'200':

src/assets/openapi/paths/paymentrequest_notify_{id}.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of a previously created payment request
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 18823736
79
post:
810
tags:
911
- Payment Request
1012
summary: Send Notification
13+
description: Trigger an email reminder to a customer for a previously created payment request
1114
operationId: paymentRequest_notify
1215
responses:
1316
'200':

src/assets/openapi/paths/paymentrequest_totals.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ get:
22
tags:
33
- Payment Request
44
summary: Payment Request Total
5+
description: Get the metric of all pending and successful payment requests
56
operationId: paymentRequest_totals
67
responses:
78
'200':

src/assets/openapi/paths/paymentrequest_verify_{id}.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of a previously created payment request
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 18823736
79
get:
810
tags:
911
- Payment Request
1012
summary: Verify Payment Request
13+
description: Verify the status of a previously created payment request
1114
operationId: paymentRequest_verify
1215
responses:
1316
'200':

0 commit comments

Comments
 (0)