Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 77 additions & 6 deletions dist/paystack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3710,7 +3710,7 @@
default:
description: Server error
/storefront:
post:

Check warning on line 3713 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Create Storefront
Expand All @@ -3730,7 +3730,7 @@
$ref: '#/components/responses/Unauthorized'
default:
description: Server error
get:

Check warning on line 3733 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: List Storefronts
Expand Down Expand Up @@ -3767,7 +3767,7 @@
required: true
schema:
type: string
get:

Check warning on line 3770 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Fetch Storefront
Expand All @@ -3781,7 +3781,7 @@
$ref: '#/components/responses/NotFound'
default:
description: Server error
put:

Check warning on line 3784 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Update Storefront
Expand All @@ -3803,7 +3803,7 @@
$ref: '#/components/responses/NotFound'
default:
description: Server error
delete:

Check warning on line 3806 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Delete Storefront
Expand All @@ -3824,7 +3824,7 @@
required: true
schema:
type: string
get:

Check warning on line 3827 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Verify Storefront Slug
Expand Down Expand Up @@ -3866,7 +3866,7 @@
required: true
schema:
type: string
post:

Check warning on line 3869 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Add Products to Storefront
Expand All @@ -3888,7 +3888,7 @@
$ref: '#/components/responses/NotFound'
default:
description: Server error
get:

Check warning on line 3891 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: List Products in Storefront
Expand All @@ -3909,7 +3909,7 @@
required: true
schema:
type: string
post:

Check warning on line 3912 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Publish Storefront
Expand All @@ -3930,7 +3930,7 @@
required: true
schema:
type: string
post:

Check warning on line 3933 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Storefront
summary: Duplicate Storefront
Expand All @@ -3945,7 +3945,7 @@
default:
description: Server error
/order:
post:

Check warning on line 3948 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Order
summary: Create Order
Expand All @@ -3965,7 +3965,7 @@
$ref: '#/components/responses/Unauthorized'
default:
description: Server error
get:

Check warning on line 3968 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Order
summary: List Orders
Expand Down Expand Up @@ -4009,7 +4009,7 @@
required: true
schema:
type: string
get:

Check warning on line 4012 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Order
summary: Fetch Order
Expand All @@ -4030,7 +4030,7 @@
required: true
schema:
type: string
get:

Check warning on line 4033 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Order
summary: Fetch Products Order
Expand All @@ -4051,7 +4051,7 @@
required: true
schema:
type: string
get:

Check warning on line 4054 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Order
summary: Validate pay for me order
Expand Down Expand Up @@ -4330,6 +4330,7 @@
tags:
- Refund
summary: Create Refund
description: Initiate a refund for a previously completed transaction
operationId: refund_create
requestBody:
content:
Expand All @@ -4350,13 +4351,16 @@
tags:
- Refund
summary: List Refunds
description: List previously created refunds
operationId: refund_list
parameters:
- in: query
name: perPage
schema:
type: integer
default: 50
description: Number of records to fetch per page
example: 10
- in: query
name: page
schema:
Expand All @@ -4383,18 +4387,51 @@
$ref: '#/components/responses/NotFound'
default:
description: Server error
/refund/retry_with_customer_details/{id}:
post:
tags:
- Refund
summary: Retry Refund
description: Retry a refund with a `needs-attention` status by providing the bank account details of a customer.
operationId: refund_retry
parameters:
- name: id
in: path
required: true
description: The identifier of the refund
schema:
type: integer
example: 15581137
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RefundRetry'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/RefundRetry'
responses:
'200':
$ref: '#/components/responses/RefundCreateSuccess'
'401':
$ref: '#/components/responses/Unauthorized'
default:
description: Server error
/refund/{id}:
get:
tags:
- Refund
summary: Fetch Refund
description: Get a previously created refund
operationId: refund_fetch
parameters:
- name: id
in: path
required: true
description: The identifier of the refund
schema:
type: string
type: integer
example: 15581137
responses:
'200':
$ref: '#/components/responses/RefundFetchSuccess'
Expand All @@ -4405,7 +4442,7 @@
default:
description: Server error
/dispute:
get:

Check warning on line 4445 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: List Disputes
Expand Down Expand Up @@ -4460,7 +4497,7 @@
required: true
schema:
type: string
get:

Check warning on line 4500 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Fetch Dispute
Expand All @@ -4474,7 +4511,7 @@
$ref: '#/components/responses/NotFound'
default:
description: Server error
put:

Check warning on line 4514 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Update Dispute
Expand All @@ -4497,7 +4534,7 @@
default:
description: Server error
/dispute/{id}/upload_url:
get:

Check warning on line 4537 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Get Upload URL
Expand All @@ -4519,7 +4556,7 @@
default:
description: Server error
/dispute/export:
get:

Check warning on line 4559 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Export Disputes
Expand Down Expand Up @@ -4561,7 +4598,7 @@
default:
description: Server error
/dispute/transaction/{id}:
get:

Check warning on line 4601 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: List Transaction Disputes
Expand All @@ -4583,7 +4620,7 @@
default:
description: Server error
/dispute/{id}/resolve:
put:

Check warning on line 4623 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Resolve a Dispute
Expand Down Expand Up @@ -4613,7 +4650,7 @@
default:
description: Server error
/dispute/{id}/evidence:
post:

Check warning on line 4653 in dist/paystack.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
tags:
- Dispute
summary: Add Evidence
Expand Down Expand Up @@ -16324,22 +16361,28 @@
- transaction
properties:
transaction:
description: Transaction reference or id
description: The reference of a previosuly completed transaction
type: string
amount:
description: |-
Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR ) to be refunded to the customer.
Amount cannot be more than the original transaction amount
description: Amount to be refunded to the customer. It cannot be more than the original transaction amount
type: integer
currency:
description: Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD
description: Three-letter ISO currency
type: string
enum:
- GHS
- KES
- NGN
- USD
- ZAR
customer_note:
description: Customer reason
type: string
merchant_note:
description: Merchant reason
type: string
example:
transaction: mpkr39h74k
RefundCreateResponse:
type: object
properties:
Expand Down Expand Up @@ -16478,6 +16521,34 @@
- status
- message
- data
RefundRetryAccountDetails:
type: object
description: An object that contains the customer’s account details for refund
required:
- currency
- account_number
- bank_id
properties:
currency:
description: The currency of the customer's bank account. It should be the same as the currency the payment was made
type: string
account_number:
description: The customer's account number
type: string
bank_id:
description: The ID representing the customer's bank. You can get the list of bank IDs by calling the List Banks endpoint.
type: string
example:
currency: NGN
account_number: '1234567890'
bank_id: '9'
RefundRetry:
type: object
required:
- refund_account_details
properties:
refund_account_details:
$ref: '#/components/schemas/RefundRetryAccountDetails'
RefundFetchResponse:
type: object
properties:
Expand Down
17 changes: 11 additions & 6 deletions src/assets/openapi/components/schemas/RefundCreate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@ required:
- transaction
properties:
transaction:
description: Transaction reference or id
description: The reference of a previosuly completed transaction
type: string
amount:
description: >-
Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and
cents, if currency is ZAR ) to be refunded to the customer.

Amount cannot be more than the original transaction amount
Amount to be refunded to the customer. It cannot be more than the original transaction amount
type: integer
currency:
description: Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD
description: Three-letter ISO currency
type: string
enum:
- GHS
- KES
- NGN
- USD
- ZAR
customer_note:
description: Customer reason
type: string
merchant_note:
description: Merchant reason
type: string
example:
transaction: mpkr39h74k
6 changes: 6 additions & 0 deletions src/assets/openapi/components/schemas/RefundRetry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
required:
- refund_account_details
properties:
refund_account_details:
$ref: './RefundRetryAccountDetails.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type: object
description: An object that contains the customer’s account details for refund
required:
- currency
- account_number
- bank_id
properties:
currency:
description: The currency of the customer's bank account. It should be the same as the currency the payment was made
type: string
account_number:
description: The customer's account number
type: string
bank_id:
description: The ID representing the customer's bank. You can get the list of bank IDs by calling the List Banks endpoint.
type: string
example:
currency: NGN
account_number: '1234567890'
bank_id: '9'
2 changes: 2 additions & 0 deletions src/assets/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ paths:
$ref: paths/integration_payment_session_timeout.yaml
/refund:
$ref: paths/refund.yaml
/refund/retry_with_customer_details/{id}:
$ref: paths/refund_retry_with_customer_details_{id}.yaml
/refund/{id}:
$ref: paths/refund_{id}.yaml
/dispute:
Expand Down
4 changes: 4 additions & 0 deletions src/assets/openapi/paths/refund.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ post:
tags:
- Refund
summary: Create Refund
description: Initiate a refund for a previously completed transaction
operationId: refund_create
requestBody:
content:
Expand All @@ -22,13 +23,16 @@ get:
tags:
- Refund
summary: List Refunds
description: List previously created refunds
operationId: refund_list
parameters:
- in: query
name: perPage
schema:
type: integer
default: 50
description: Number of records to fetch per page
example: 10
- in: query
name: page
schema:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
post:
tags:
- Refund
summary: Retry Refund
description: Retry a refund with a `needs-attention` status by providing the bank account details of a customer.
operationId: refund_retry
parameters:
- name: id
in: path
required: true
description: The identifier of the refund
schema:
type: integer
example: 15581137
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/RefundRetry.yaml
application/x-www-form-urlencoded:
schema:
$ref: ../components/schemas/RefundRetry.yaml
responses:
'200':
$ref: ../components/responses/RefundCreateSuccess.yaml
'401':
$ref: ../components/responses/Unauthorized.yaml
default:
description: Server error
5 changes: 4 additions & 1 deletion src/assets/openapi/paths/refund_{id}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ get:
tags:
- Refund
summary: Fetch Refund
description: Get a previously created refund
operationId: refund_fetch
parameters:
- name: id
in: path
required: true
description: The identifier of the refund
schema:
type: string
type: integer
example: 15581137
responses:
'200':
$ref: ../components/responses/RefundFetchSuccess.yaml
Expand Down
Loading