@@ -4330,6 +4330,7 @@ paths:
43304330 tags:
43314331 - Refund
43324332 summary: Create Refund
4333+ description: Initiate a refund for a previously completed transaction
43334334 operationId: refund_create
43344335 requestBody:
43354336 content:
@@ -4350,13 +4351,16 @@ paths:
43504351 tags:
43514352 - Refund
43524353 summary: List Refunds
4354+ description: List previously created refunds
43534355 operationId: refund_list
43544356 parameters:
43554357 - in: query
43564358 name: perPage
43574359 schema:
43584360 type: integer
4361+ default: 50
43594362 description: Number of records to fetch per page
4363+ example: 10
43604364 - in: query
43614365 name: page
43624366 schema:
@@ -4383,18 +4387,51 @@ paths:
43834387 $ref: '#/components/responses/NotFound'
43844388 default:
43854389 description: Server error
4390+ /refund/retry_with_customer_details/{id}:
4391+ post:
4392+ tags:
4393+ - Refund
4394+ summary: Retry Refund
4395+ description: Retry a refund with a `needs-attention` status by providing the bank account details of a customer.
4396+ operationId: refund_retry
4397+ parameters:
4398+ - name: id
4399+ in: path
4400+ required: true
4401+ description: The identifier of the refund
4402+ schema:
4403+ type: integer
4404+ example: 15581137
4405+ requestBody:
4406+ content:
4407+ application/json:
4408+ schema:
4409+ $ref: '#/components/schemas/RefundRetry'
4410+ application/x-www-form-urlencoded:
4411+ schema:
4412+ $ref: '#/components/schemas/RefundRetry'
4413+ responses:
4414+ '200':
4415+ $ref: '#/components/responses/RefundCreateSuccess'
4416+ '401':
4417+ $ref: '#/components/responses/Unauthorized'
4418+ default:
4419+ description: Server error
43864420 /refund/{id}:
43874421 get:
43884422 tags:
43894423 - Refund
43904424 summary: Fetch Refund
4425+ description: Get a previously created refund
43914426 operationId: refund_fetch
43924427 parameters:
43934428 - name: id
43944429 in: path
43954430 required: true
4431+ description: The identifier of the refund
43964432 schema:
4397- type : string
4433+ type: integer
4434+ example: 15581137
43984435 responses:
43994436 '200':
44004437 $ref: '#/components/responses/RefundFetchSuccess'
@@ -16324,22 +16361,28 @@ components:
1632416361 - transaction
1632516362 properties:
1632616363 transaction:
16327- description : Transaction reference or id
16364+ description: The reference of a previosuly completed transaction
1632816365 type: string
1632916366 amount:
16330- description : |-
16331- Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR ) to be refunded to the customer.
16332- Amount cannot be more than the original transaction amount
16367+ description: Amount to be refunded to the customer. It cannot be more than the original transaction amount
1633316368 type: integer
1633416369 currency:
16335- description : Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD
16370+ description: Three-letter ISO currency
1633616371 type: string
16372+ enum:
16373+ - GHS
16374+ - KES
16375+ - NGN
16376+ - USD
16377+ - ZAR
1633716378 customer_note:
1633816379 description: Customer reason
1633916380 type: string
1634016381 merchant_note:
1634116382 description: Merchant reason
1634216383 type: string
16384+ example:
16385+ transaction: mpkr39h74k
1634316386 RefundCreateResponse:
1634416387 type: object
1634516388 properties:
@@ -16478,6 +16521,34 @@ components:
1647816521 - status
1647916522 - message
1648016523 - data
16524+ RefundRetryAccountDetails:
16525+ type: object
16526+ description: An object that contains the customer’s account details for refund
16527+ required:
16528+ - currency
16529+ - account_number
16530+ - bank_id
16531+ properties:
16532+ currency:
16533+ description: The currency of the customer's bank account. It should be the same as the currency the payment was made
16534+ type: string
16535+ account_number:
16536+ description: The customer's account number
16537+ type: string
16538+ bank_id:
16539+ description: The ID representing the customer's bank. You can get the list of bank IDs by calling the List Banks endpoint.
16540+ type: string
16541+ example:
16542+ currency: NGN
16543+ account_number: '1234567890'
16544+ bank_id: '9'
16545+ RefundRetry:
16546+ type: object
16547+ required:
16548+ - refund_account_details
16549+ properties:
16550+ refund_account_details:
16551+ $ref: '#/components/schemas/RefundRetryAccountDetails'
1648116552 RefundFetchResponse:
1648216553 type: object
1648316554 properties:
0 commit comments