diff --git a/dist/paystack.yaml b/dist/paystack.yaml index 15a66b9..a798e5c 100644 --- a/dist/paystack.yaml +++ b/dist/paystack.yaml @@ -73,6 +73,15 @@ tags: description: | A collection of endpoints for automating sending money to beneficiaries x-product-name: Transfers + - name: Balance + description: | + A collection of endpoints gaining insights into the amount on an integration + x-product-name: Balance + - name: Payment Request + description: | + A collection of endpoints for managing invoices for the payment of goods + and services + x-product-name: Payment Requests - name: Product description: | A collection of endpoints for creating and managing inventories @@ -90,19 +99,10 @@ tags: A collection of endpoints for creating and managing links for the collection of payment for products x-product-name: Payment Pages - - name: Payment Request - description: | - A collection of endpoints for managing invoices for the payment of goods - and services - x-product-name: Payment Requests - name: Settlement description: | A collection of endpoints for gaining insights into payouts x-product-name: Settlements - - name: Balance - description: | - A collection of endpoints gaining insights into the amount on an integration - x-product-name: Balance - name: Integration description: | A collection of endpoints for managing some settings on an integration @@ -2549,6 +2549,7 @@ paths: tags: - Plan summary: Update Plan + description: Update a plan details on your integration operationId: plan_update requestBody: content: @@ -2572,6 +2573,7 @@ paths: tags: - Subscription summary: Create Subscription + description: Create a subscription a customer operationId: subscription_create requestBody: content: @@ -2592,6 +2594,7 @@ paths: tags: - Subscription summary: List Subscriptions + description: List all subscriptions available on your integration operationId: subscription_list parameters: - in: query @@ -2606,9 +2609,10 @@ paths: description: The section to retrieve - in: query name: plan - schema: - type: string description: Plan ID + schema: + type: integer + example: 2697466 - in: query name: customer schema: @@ -2640,12 +2644,15 @@ paths: - name: code in: path required: true + description: The subscription code for the subscription you want to fetch schema: type: string + example: SUB_5co81xgmwg78x3d get: tags: - Subscription summary: Fetch Subscription + description: Get details of a customer's subscription operationId: subscription_fetch responses: '200': @@ -2661,6 +2668,7 @@ paths: tags: - Subscription summary: Disable Subscription + description: Disable a subscription on your integration operationId: subscription_disable requestBody: content: @@ -2682,6 +2690,7 @@ paths: tags: - Subscription summary: Enable Subscription + description: Enable a subscription on your integration operationId: subscription_enable requestBody: content: @@ -2703,13 +2712,16 @@ paths: tags: - Subscription summary: Generate Update Subscription Link + description: Generate a link for updating the card on a subscription operationId: subscription_manageLink parameters: - name: code in: path required: true + description: Subscription code schema: type: string + example: qlgwhpyq1ts9nsw responses: '200': $ref: '#/components/responses/Ok' @@ -2722,13 +2734,16 @@ paths: tags: - Subscription summary: Send Update Subscription Link + description: Email a customer a link for updating the card on their subscription operationId: subscription_manageEmail parameters: - name: code in: path required: true + description: Subscription code schema: type: string + example: qlgwhpyq1ts9nsw responses: '200': $ref: '#/components/responses/Ok' @@ -2741,6 +2756,7 @@ paths: tags: - Transfer Recipient summary: Create Transfer Recipient + description: Creates a new recipient. A duplicate account number will lead to the retrieval of the existing record. operationId: transferrecipient_create requestBody: content: @@ -2765,6 +2781,7 @@ paths: tags: - Transfer Recipient summary: List Transfer Recipients + description: List transfer recipients available on your integration operationId: transferrecipient_list parameters: - in: query @@ -2812,6 +2829,8 @@ paths: tags: - Transfer Recipient summary: Bulk Create Transfer Recipient + description: | + Create multiple transfer recipients in batches. A duplicate account number will lead to the retrieval of the existing record. operationId: transferrecipient_bulk requestBody: content: @@ -2823,7 +2842,7 @@ paths: $ref: '#/components/schemas/TransferRecipientBulk' responses: '200': - description: '' + description: Sucessful response content: application/json: schema: @@ -2840,14 +2859,16 @@ paths: required: true schema: type: string + example: RCP_5ap8rcimmcj8lbi get: tags: - Transfer Recipient summary: Fetch Transfer recipient + description: Fetch the details of a transfer recipient operationId: transferrecipient_fetch responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -2861,7 +2882,8 @@ paths: put: tags: - Transfer Recipient - summary: Update Transfer recipient + summary: Update Transfer Recipient + description: Update the details of a transfer recipient operationId: transferrecipient_update requestBody: content: @@ -2873,7 +2895,7 @@ paths: $ref: '#/components/schemas/TransferRecipientUpdate' responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -2888,10 +2910,11 @@ paths: tags: - Transfer Recipient summary: Delete Transfer Recipient + description: Delete a transfer recipient (sets the transfer recipient to inactive) operationId: transferrecipient_delete responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -2907,6 +2930,7 @@ paths: tags: - Transfer summary: Initiate Transfer + description: Send money to your customers operationId: transfer_initiate requestBody: content: @@ -2918,7 +2942,7 @@ paths: $ref: '#/components/schemas/TransferInitiate' responses: '200': - description: '' + description: Successful operation content: application/json: schema: @@ -2931,6 +2955,7 @@ paths: tags: - Transfer summary: List Transfers + description: List the transfers made on your integration operationId: transfer_list parameters: - in: query @@ -2938,6 +2963,7 @@ paths: description: A flag to indicate if cursor based pagination should be used schema: type: boolean + example: true - in: query name: next description: | @@ -3011,6 +3037,7 @@ paths: tags: - Transfer summary: Finalize Transfer + description: Finalize an initiated transfer operationId: transfer_finalize requestBody: content: @@ -3032,6 +3059,10 @@ paths: tags: - Transfer summary: Initiate Bulk Transfer + description: | + Batch multiple transfers in a single request. + + You need to disable the Transfers OTP requirement to use this endpoint. operationId: transfer_bulk requestBody: content: @@ -3060,14 +3091,16 @@ paths: required: true schema: type: string + example: TRF_1ptvuv321ahaa7q get: tags: - Transfer summary: Fetch Transfer + description: Get details of a transfer on your integration operationId: transfer_fetch responses: '200': - description: '' + description: Succesful operation content: application/json: schema: @@ -3083,13 +3116,16 @@ paths: tags: - Transfer summary: Verify Transfer + description: Verify the status of a transfer on your integration operationId: transfer_verify parameters: - name: reference + description: Transfer reference in: path required: true schema: type: string + example: acv_9ee55786-2323-4760-98e2-6380c9cb3f67 responses: '200': description: '' @@ -3108,6 +3144,7 @@ paths: tags: - Transfer summary: Export Transfers + description: Export a list of transfers carried out on your integration operationId: transfer_exportTransfer parameters: - in: query @@ -3131,6 +3168,7 @@ paths: - blocked - rejected - received + example: success - in: query name: from schema: @@ -3157,6 +3195,7 @@ paths: tags: - Transfer summary: Resend OTP for Transfer + description: Generates and send a new OTP to customer in the event they are having trouble receiving one. operationId: transfer_resendOtp requestBody: content: @@ -3182,10 +3221,13 @@ paths: tags: - Transfer summary: Disable OTP for Transfers + description: | + This is used in the event that you want to be able to complete transfers programmatically without use of OTPs. + No arguments required. You will get an OTP to complete the request. operationId: transfer_disableOtp responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -3199,6 +3241,7 @@ paths: tags: - Transfer summary: Finalize Disabling OTP for Transfers + description: Finalize the request to disable OTP on your transfers operationId: transfer_disableOtpFinalize requestBody: content: @@ -3210,7 +3253,7 @@ paths: $ref: '#/components/schemas/TransferFinalizeDisableOTP' responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -3224,10 +3267,13 @@ paths: tags: - Transfer summary: Enable OTP requirement for Transfers + description: | + In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. + No arguments required. operationId: transfer_enableOtp responses: '200': - description: '' + description: Successful response content: application/json: schema: @@ -3236,45 +3282,129 @@ paths: $ref: '#/components/responses/Unauthorized' default: description: Server error - /product: + /balance: + get: + tags: + - Balance + summary: Fetch Balance + operationId: balance_fetch + description: Fetch the available balance on your integration + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceCheckResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /balance/ledger: + get: + tags: + - Balance + summary: Balance Ledger + description: Fetch all pay-ins and pay-outs that occured on your integration + operationId: balance_ledger + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceFetchLedgerResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest: post: tags: - - Product - summary: Create Product - operationId: product_create + - Payment Request + summary: Create Payment Request + description: Create a new payment request by issuing an invoice to a customer + operationId: paymentRequest_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/ProductCreate' + $ref: '#/components/schemas/PaymentRequestCreate' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ProductCreate' + $ref: '#/components/schemas/PaymentRequestCreate' responses: - '201': - $ref: '#/components/responses/ProductCreateSuccess' + '200': + $ref: '#/components/responses/PaymentRequestCreateSuccess' '401': $ref: '#/components/responses/Unauthorized' default: description: Server error get: tags: - - Product - summary: List Products - operationId: product_list + - Payment Request + summary: List Payment Request + description: List all previously created payment requests to your customers + operationId: paymentRequest_list parameters: - - name: perPage - in: query + - in: query + name: perPage schema: type: integer - - name: page - in: query + description: Number of records to fetch per page + - in: query + name: page schema: type: integer - - name: active - in: query + description: The section to retrieve + - in: query + name: customer schema: - type: boolean + type: string + description: Customer ID + - in: query + name: status + schema: + type: string + enum: + - draft + - pending + - success + - failed + example: success + description: Invoice status to filter + - in: query + name: currency + schema: + type: string + description: If your integration supports more than one currency, choose the one to filter - in: query name: from schema: @@ -3289,28 +3419,31 @@ paths: description: The end date responses: '200': - $ref: '#/components/responses/ProductListsSuccess' + $ref: '#/components/responses/PaymentRequestListSuccess' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' default: description: Server error - /product/{id}: + /paymentrequest/{id}: parameters: - name: id + description: The unique identifier of a previously created payment request in: path required: true schema: - type: string + type: integer + example: 18823736 get: tags: - - Product - summary: Fetch Product - operationId: product_fetch + - Payment Request + summary: Fetch Payment Request + description: Fetch a previously created payment request + operationId: paymentRequest_fetch responses: '200': - $ref: '#/components/responses/ProductFetchSuccess' + $ref: '#/components/responses/PaymentRequestListSuccess' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -3319,102 +3452,335 @@ paths: description: Server error put: tags: - - Product - summary: Update product - operationId: product_update + - Payment Request + summary: Update Payment Request + description: Update a previously created payment request + operationId: paymentRequest_update requestBody: content: application/json: schema: - $ref: '#/components/schemas/ProductUpdate' + $ref: '#/components/schemas/PaymentRequestUpdate' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ProductUpdate' + $ref: '#/components/schemas/PaymentRequestUpdate' responses: '200': - $ref: '#/components/responses/ProductUpdateSuccess' + $ref: '#/components/responses/PaymentRequestUpdateSuccess' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' default: description: Server error - delete: + /paymentrequest/verify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: tags: - - Product - summary: Delete Product - operationId: product_delete + - Payment Request + summary: Verify Payment Request + description: Verify the status of a previously created payment request + operationId: paymentRequest_verify responses: '200': - $ref: '#/components/responses/ProductDeleteSuccess' + $ref: '#/components/responses/PaymentRequestVerifySuccess' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' default: description: Server error - /storefront: + /paymentrequest/notify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 post: tags: - - Storefront - summary: Create Storefront - operationId: storefront_create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StorefrontCreate' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/StorefrontCreate' + - Payment Request + summary: Send Notification + description: Trigger an email reminder to a customer for a previously created payment request + operationId: paymentRequest_notify responses: '200': - $ref: '#/components/responses/StorefrontCreateSuccess' - '400': + $ref: '#/components/responses/PaymentRequestSendNotificationSuccess' + '401': $ref: '#/components/responses/Unauthorized' default: description: Server error + /paymentrequest/totals: get: tags: - - Storefront - summary: List Storefronts - operationId: storefront_list - parameters: - - name: perPage - in: query - schema: - type: integer - - name: page - in: query - schema: - type: integer - - name: status - in: query - schema: - type: string - enum: - - active - - inactive + - Payment Request + summary: Payment Request Total + description: Get the metric of all pending and successful payment requests + operationId: paymentRequest_totals responses: '200': - $ref: '#/components/responses/StorefrontListSuccess' + $ref: '#/components/responses/PaymentRequestTotalSuccess' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' default: description: Server error - /storefront/{id}: + /paymentrequest/finalize/{id}: parameters: - name: id + description: The unique identifier of a draft payment request in: path required: true schema: - type: string - get: + type: integer + example: 18823736 + post: tags: - - Storefront + - Payment Request + summary: Finalize Payment Request + description: Finalise the creation of a draft payment request for a customer + operationId: paymentRequest_finalize + responses: + '200': + $ref: '#/components/responses/PaymentRequestFinalizeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/archive/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Archive Payment Request + description: | + Archive a payment request to clean up your records. An archived payment request cannot be verified and will not + be returned when listing all previously created payment requests. + operationId: paymentRequest_archive + responses: + '200': + $ref: '#/components/responses/PaymentRequestArchiveSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /product: + post: + tags: + - Product + summary: Create Product + description: Create a new product on your integration + operationId: product_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductCreate' + responses: + '201': + $ref: '#/components/responses/ProductCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Product + summary: List Products + description: List all previously created products + operationId: product_list + parameters: + - name: perPage + description: Number of records to fetch per page + in: query + schema: + type: integer + - name: page + description: The section to retrieve + in: query + schema: + type: integer + - name: active + description: The state of the product + in: query + schema: + type: boolean + example: true + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/ProductListsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /product/{id}: + parameters: + - name: id + description: The unique identifier of the product + in: path + required: true + schema: + type: integer + example: 2196244 + get: + tags: + - Product + summary: Fetch Product + description: Fetch a previously created product + operationId: product_fetch + responses: + '200': + $ref: '#/components/responses/ProductFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Product + summary: Update product + description: Update a previously created product + operationId: product_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductUpdate' + responses: + '200': + $ref: '#/components/responses/ProductUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Product + summary: Delete Product + description: Delete a previously created product + operationId: product_delete + responses: + '200': + $ref: '#/components/responses/ProductDeleteSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront: + post: + tags: + - Storefront + summary: Create Storefront + description: Create a digital shop to manage and display your products + operationId: storefront_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontCreate' + responses: + '200': + $ref: '#/components/responses/StorefrontCreateSuccess' + '400': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Storefront + summary: List Storefronts + description: List the storefronts you previously created + operationId: storefront_list + parameters: + - in: query + name: perPage + description: Number of records to fetch per request + schema: + type: integer + default: 50 + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + default: 1 + - name: status + in: query + schema: + type: string + enum: + - active + - inactive + example: active + responses: + '200': + $ref: '#/components/responses/StorefrontListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Storefront summary: Fetch Storefront + description: Get the details of a previously created Storefront operationId: storefront_fetch responses: '200': @@ -3429,6 +3795,7 @@ paths: tags: - Storefront summary: Update Storefront + description: Update the details of a previously created Storefront operationId: storefront_update requestBody: content: @@ -3451,6 +3818,7 @@ paths: tags: - Storefront summary: Delete Storefront + description: Delete a previously created Storefront operationId: storefront_delete responses: '200': @@ -3464,14 +3832,17 @@ paths: /storefront/verify/{slug}: parameters: - name: slug + description: The custom slug to check in: path required: true schema: type: string + example: struct_and_faces get: tags: - Storefront summary: Verify Storefront Slug + description: Verify the availability of a slug before using it for your Storefront operationId: storefront_verifySlug responses: '200': @@ -3491,11 +3862,12 @@ paths: operationId: storefront_fetchOrders parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string - example: Z0R4orOU + type: integer + example: 1559046 responses: '200': $ref: '#/components/responses/Ok' @@ -3506,14 +3878,17 @@ paths: /storefront/{id}/product: parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Add Products to Storefront + description: Add previously created products to a Storefront operationId: storefront_addProducts requestBody: content: @@ -3535,7 +3910,8 @@ paths: get: tags: - Storefront - summary: List Products in Storefront + summary: List Storefront Products + description: List the products in a Storefront operationId: storefront_listProducts responses: '200': @@ -3549,14 +3925,17 @@ paths: /storefront/{id}/publish: parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Publish Storefront + description: Make your Storefront publicly available operationId: storefront_publish responses: '200': @@ -3570,14 +3949,17 @@ paths: /storefront/{id}/duplicate: parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Duplicate Storefront + description: Duplicate a previously created Storefront operationId: storefront_duplicate responses: '200': @@ -3593,6 +3975,7 @@ paths: tags: - Order summary: Create Order + description: Create an order for selected items operationId: order_create requestBody: content: @@ -3613,6 +3996,7 @@ paths: tags: - Order summary: List Orders + description: List the previously created orders operationId: order_list parameters: - in: query @@ -3649,14 +4033,17 @@ paths: /order/{id}: parameters: - name: id + description: The unique identifier of the order in: path required: true schema: - type: string + type: integer + example: 1559046 get: tags: - Order summary: Fetch Order + description: Fetch the details of a previously created order operationId: order_fetch responses: '200': @@ -3670,15 +4057,18 @@ paths: /order/product/{id}: parameters: - name: id + description: The unique identifier of the order in: path required: true schema: - type: string + type: integer + example: 1559046 get: tags: - Order - summary: Fetch Products Order - operationId: order_fetchProducts + summary: Fetch Product Orders + description: Fetch all orders for a particular product + operationId: order_product responses: '200': $ref: '#/components/responses/OrderFetchProductSuccess' @@ -3691,15 +4081,18 @@ paths: /order/{code}/validate: parameters: - name: code + description: The unique code of a previously created order in: path required: true schema: type: string + example: ORD_6z0lqwpmxrm7dsp get: tags: - Order - summary: Validate pay for me order - operationId: order_validatePayForMe + summary: Validate Order + description: Validate a pay for me order + operationId: order_validate responses: '200': $ref: '#/components/responses/OrderValidateSuccess' @@ -3714,6 +4107,7 @@ paths: tags: - Page summary: Create Page + description: Create a webpage to receive payments operationId: page_create requestBody: content: @@ -3734,13 +4128,16 @@ paths: tags: - Page summary: List Pages + description: List all previously created payment pages operationId: page_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: @@ -3771,13 +4168,16 @@ paths: parameters: - name: id in: path + description: The unique identifier of a payment page required: true schema: - type: string + type: integer + example: 1891222 get: tags: - Page summary: Fetch Page + description: Get a previously created payment page operationId: page_fetch responses: '200': @@ -3792,6 +4192,7 @@ paths: tags: - Page summary: Update Page + description: Update a previously created payment page operationId: page_update requestBody: content: @@ -3814,13 +4215,16 @@ paths: parameters: - name: slug in: path + description: The custom slug to check required: true schema: type: string + example: risky-burger get: tags: - Page summary: Check Slug Availability + description: Check if a custom slug is available for use when creating a payment page operationId: page_checkSlugAvailability responses: '200': @@ -3842,6 +4246,9 @@ paths: tags: - Page summary: Add Products + description: | + Add products to a previously created payment page. You can only add products to pages + that was created with a `product` type. operationId: page_addProducts requestBody: content: @@ -3858,228 +4265,22 @@ paths: $ref: '#/components/responses/Unauthorized' default: description: Server error - /paymentrequest: - post: - tags: - - Payment Request - summary: Create Payment Request - operationId: paymentRequest_create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestCreate' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PaymentRequestCreate' - responses: - '200': - $ref: '#/components/responses/PaymentRequestCreateSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - default: - description: Server error - get: - tags: - - Payment Request - summary: List Payment Request - operationId: paymentRequest_list - parameters: - - in: query - name: perPage - schema: - type: integer - description: Number of records to fetch per page - - in: query - name: page - schema: - type: integer - description: The section to retrieve - - in: query - name: customer - schema: - type: string - description: Customer ID - - in: query - name: status - schema: - type: string - description: Invoice status to filter - - in: query - name: currency - schema: - type: string - description: If your integration supports more than one currency, choose the one to filter - - in: query - name: from - schema: - type: string - format: date-time - description: The start date - - in: query - name: to - schema: - type: string - format: date-time - description: The end date - responses: - '200': - $ref: '#/components/responses/PaymentRequestListSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /paymentrequest/{id}: - parameters: - - name: id - in: path - required: true - schema: - type: string - get: - tags: - - Payment Request - summary: Fetch Payment Request - operationId: paymentRequest_fetch - responses: - '200': - $ref: '#/components/responses/PaymentRequestListSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - put: - tags: - - Payment Request - summary: Update Payment Request - operationId: paymentRequest_update - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestUpdate' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PaymentRequestUpdate' - responses: - '200': - $ref: '#/components/responses/PaymentRequestUpdateSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /paymentrequest/verify/{id}: - parameters: - - name: id - in: path - required: true - schema: - type: string - get: - tags: - - Payment Request - summary: Verify Payment Request - operationId: paymentRequest_verify - responses: - '200': - $ref: '#/components/responses/PaymentRequestVerifySuccess' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /paymentrequest/notify/{id}: - parameters: - - name: id - in: path - required: true - schema: - type: string - post: - tags: - - Payment Request - summary: Send Notification - operationId: paymentRequest_notify - responses: - '200': - $ref: '#/components/responses/PaymentRequestSendNotificationSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - default: - description: Server error - /paymentrequest/totals: - get: - tags: - - Payment Request - summary: Payment Request Total - operationId: paymentRequest_totals - responses: - '200': - $ref: '#/components/responses/PaymentRequestTotalSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /paymentrequest/finalize/{id}: - parameters: - - name: id - in: path - required: true - schema: - type: string - post: - tags: - - Payment Request - summary: Finalize Payment Request - operationId: paymentRequest_finalize - responses: - '200': - $ref: '#/components/responses/PaymentRequestFinalizeSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - default: - description: Server error - /paymentrequest/archive/{id}: - parameters: - - name: id - in: path - required: true - schema: - type: string - post: - tags: - - Payment Request - summary: Archive Payment Request - operationId: paymentRequest_archive - responses: - '200': - $ref: '#/components/responses/PaymentRequestArchiveSuccess' - '401': - $ref: '#/components/responses/Unauthorized' - default: - description: Server error - /settlement: + /settlement: get: tags: - Settlement - summary: Fetch Settlements + summary: List Settlements + description: List settlements made to your settlement accounts operationId: settlements_fetch parameters: - name: perPage + description: The number of records to fetch per request in: query schema: type: integer example: 50 - name: page + description: The offset to retrieve data from in: query schema: type: integer @@ -4093,83 +4294,24 @@ paths: $ref: '#/components/responses/NotFound' default: description: Server error - /settlement/{id}/transaction: + /settlement/{id}/transactions: get: tags: - Settlement - summary: Settlement Transactions + summary: Fetch Settlement Transactions + description: Get the transactions that make up a particular settlement operationId: settlements_transaction parameters: - name: id + description: The settlement ID in which you want to fetch its transactions in: path required: true - schema: - type: string - responses: - '200': - $ref: '#/components/responses/Ok' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /balance: - get: - tags: - - Balance - summary: Fetch Balance - operationId: balance_fetch - description: You can only transfer from what you have - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceCheckResponse' - '401': - $ref: '#/components/responses/Unauthorized' - '404': - $ref: '#/components/responses/NotFound' - default: - description: Server error - /balance/ledger: - get: - tags: - - Balance - summary: Balance Ledger - operationId: balance_ledger - parameters: - - in: query - name: perPage - schema: - type: integer - description: Number of records to fetch per page - - in: query - name: page schema: type: integer - description: The section to retrieve - - in: query - name: from - schema: - type: string - format: date-time - description: The start date - - in: query - name: to - schema: - type: string - format: date-time - description: The end date + example: 8610870 responses: '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceFetchLedgerResponse' + $ref: '#/components/responses/Ok' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -4181,6 +4323,7 @@ paths: tags: - Integration summary: Fetch Payment Session Timeout + description: Fetch the session timeout of a transaction operationId: integration_fetchPaymentSessionTimeout responses: '200': @@ -4199,6 +4342,7 @@ paths: tags: - Integration summary: Update Payment Session Timeout + description: Update the session timeout of a transaction operationId: integration_updatePaymentSessionTimeout requestBody: content: @@ -4223,6 +4367,7 @@ paths: tags: - Refund summary: Create Refund + description: Initiate a refund for a previously completed transaction operationId: refund_create requestBody: content: @@ -4243,13 +4388,16 @@ paths: 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: @@ -4276,18 +4424,51 @@ paths: $ref: '#/components/responses/NotFound' default: description: Server error - /refund/{id}: - get: + /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/RefundRetrySuccess' + '422': + $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' @@ -4302,6 +4483,7 @@ paths: tags: - Dispute summary: List Disputes + description: List transaction disputes filed by customers operationId: dispute_list parameters: - in: query @@ -4316,9 +4498,15 @@ paths: type: integer - in: query name: status - description: Dispute Status. Acceptable values are awaiting-merchant-feedback, awaiting-bank-feedback, pending, resolved + description: Dispute status schema: type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback - in: query name: transaction description: Transaction ID @@ -4348,15 +4536,17 @@ paths: /dispute/{id}: parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 1801929 get: tags: - Dispute summary: Fetch Dispute + description: Fetch a transaction dispute operationId: dispute_fetch responses: '200': @@ -4371,6 +4561,7 @@ paths: tags: - Dispute summary: Update Dispute + description: Update a transaction dispute operationId: dispute_update requestBody: content: @@ -4393,15 +4584,17 @@ paths: get: tags: - Dispute - summary: Get Upload URL + summary: Fetch Upload URL + description: Get the URL to upload a dispute evidence operationId: dispute_uploadUrl parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: '#/components/responses/DisputeUploadURLSuccess' @@ -4416,6 +4609,7 @@ paths: tags: - Dispute summary: Export Disputes + description: Export the disputes available on your integration operationId: dispute_download parameters: - in: query @@ -4432,6 +4626,12 @@ paths: name: status schema: type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback - in: query name: from schema: @@ -4458,14 +4658,16 @@ paths: tags: - Dispute summary: List Transaction Disputes + description: List all disputes filed for a transaction operationId: dispute_transaction parameters: - name: id - description: Transaction ID + description: The unique identifier of the transaction in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: '#/components/responses/DisputeListTransactionSuccess' @@ -4479,15 +4681,17 @@ paths: put: tags: - Dispute - summary: Resolve a Dispute + summary: Resolve Dispute + description: Resolve a transaction dispute operationId: dispute_resolve parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 requestBody: content: application/json: @@ -4510,6 +4714,7 @@ paths: tags: - Dispute summary: Add Evidence + description: Provide evidence for a dispute operationId: dispute_evidence requestBody: content: @@ -4521,11 +4726,12 @@ paths: $ref: '#/components/schemas/DisputeEvidence' parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: '#/components/responses/DisputeAddEvidenceSuccess' @@ -4538,12 +4744,12 @@ paths: tags: - Bank summary: List Banks + description: List banks supported on Paystack operationId: bank_list parameters: - in: query name: country - description: | - The country from which to obtain the list of supported banks. + description: The country from which to obtain the list of supported banks schema: type: string enum: @@ -4551,30 +4757,90 @@ paths: - kenya - nigeria - south africa + example: nigeria - in: query - name: pay_with_bank_transfer + name: currency + description: The country from which to obtain the list of supported banks schema: - type: boolean + type: string + enum: + - GHS + - KES + - NGN + - ZAR + example: NGN - in: query name: use_cursor + description: A flag to indicate if cursor based pagination should be used schema: type: boolean - in: query name: perPage + description: The number of records to fetch per request + schema: + type: integer + - name: page + in: query + description: The offset to retrieve data from schema: type: integer - in: query name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the next set of data schema: type: string - in: query name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the previous set of data schema: type: string + - in: query + name: pay_with_bank_transfer + description: A flag to filter for available banks a customer can make a transfer to complete a payment + schema: + type: boolean + - in: query + name: pay_with_bank + description: A flag to filter for banks a customer can pay directly from + schema: + type: boolean + - in: query + name: enabled_for_verification + description: | + A flag to filter the banks that are supported for account verification in South Africa. + You need to combine this with either the `currency` or `country` filter. + schema: + type: boolean - in: query name: gateway + description: The type of gateway for a Nigerian bank + schema: + type: string + enum: + - emandate + - digitalbankmandate + - in: query + name: type + description: Type of financial channel schema: type: string + enum: + - ghipps + - mobile_money + - nuban + - kepss + - basa + - in: query + name: include_nip_sort_code + description: | + A flag that returns Nigerian banks with their NIP institution code. + The returned value can be used in identifying institutions on NIP. + schema: + type: boolean responses: '200': $ref: '#/components/responses/MiscellaneousListBanksSuccess' @@ -4589,14 +4855,17 @@ paths: tags: - Bank summary: Resolve Account Number + description: Resolve an account number to confirm the name associated with it operationId: bank_resolveAccountNumber parameters: - name: account_number + description: The account number of interest in: query schema: type: integer example: 22728151 - name: bank_code + description: The bank code associated with the account number in: query schema: type: integer @@ -4615,6 +4884,7 @@ paths: tags: - Bank summary: Validate Bank Account + description: Confirm the authenticity of a customer's account number before sending money operationId: bank_validateAccountNumber requestBody: content: @@ -4636,13 +4906,16 @@ paths: tags: - Miscellaneous summary: Resolve Card BIN + description: Get the details of a card BIN operationId: miscellaneous_resolveCardBin parameters: - name: bin + description: The card bank identification number in: path required: true schema: - type: string + type: integer + example: 539983 responses: '200': $ref: '#/components/responses/VerificationResolveCardBINSuccess' @@ -4657,6 +4930,7 @@ paths: tags: - Miscellaneous summary: List Countries + description: List all supported countries on Paystack operationId: miscellaneous_listCountries responses: '200': @@ -4680,7 +4954,7 @@ paths: description: The country code of the states to list. It is gotten after the charge request schema: type: string - example: CA + example: CA responses: '200': $ref: '#/components/responses/MiscellaneousListStatesSuccess' @@ -11097,6 +11371,9 @@ components: description: Set the date for the first debit. (ISO 8601 format) e.g. 2017-05-16T00:30:13+01:00 type: string format: date-time + example: + customer: CUS_xnxdt6s1zg1f4nx + plan: PLN_gx2wn530m0i3w3m SubscriptionCreateResponse: type: object properties: @@ -11376,6 +11653,9 @@ components: token: description: Email token type: string + example: + code: SUB_vsyqdmlzble3uii + token: d7gofp6yppn3qz7 SubscriptionDisableResponse: type: object properties: @@ -11505,10 +11785,15 @@ components: properties: type: description: Recipient Type - default: nuban type: string + enum: + - nuban + - ghipss + - mobile_money + - basa + - authorization name: - description: Recipient's name + description: The recipient's name according to their account registration. type: string account_number: description: Recipient's bank account number @@ -11528,6 +11813,11 @@ components: metadata: description: JSON object of custom data type: object + example: + type: nuban + name: Smith Taplo + account_number: '01000000010' + bank_code: '058' TransferRecipientCreateResponse: type: object properties: @@ -11994,6 +12284,10 @@ components: reason: description: The reason or narration for the transfer. type: string + example: + amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 TransferInitiate: description: Transfer initiation model allOf: @@ -12001,12 +12295,9 @@ components: - type: object required: - source - - amount - - recipient - - reference properties: source: - description: The origin of the funds to send from + description: The source of funds to send from type: string default: balance currency: @@ -12018,6 +12309,8 @@ components: - ZAR - KES - GHS + example: + source: balance TransferCreateResponse: type: object properties: @@ -12107,6 +12400,9 @@ components: otp: description: OTP sent to business phone to verify transfer type: string + example: + transfer_code: TRF_vsyqdmlzble3uii + otp: '928783' TransferBulk: type: object required: @@ -12114,8 +12410,9 @@ components: - transfers properties: source: - description: Where should we transfer from? Only balance is allowed for now + description: The source of funds for the transfer. type: string + default: balance currency: description: Specify the currency of the transfer. type: string @@ -12130,6 +12427,12 @@ components: type: array items: $ref: '#/components/schemas/TransferBase' + example: + source: balance + transfers: + - amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 TransferBulkResponseArray: type: object properties: @@ -12501,7 +12804,11 @@ components: default: transfer enum: - disable_otp + - resend_otp - transfer + example: + transfer_code: TRF_vsyqdmlzble3uii + reason: resend_otp TransferResendsOtpResponse: type: object properties: @@ -12530,6 +12837,8 @@ components: otp: description: OTP sent to business phone to verify disabling OTP requirement type: string + example: + otp: '928783' TransferFinalizeDisablesOtpResponse: type: object properties: @@ -12550,121 +12859,69 @@ components: required: - status - message - ProductListsResponseArray: + BalanceCheckResponseArray: type: object properties: - id: - type: integer - name: - type: string - description: + currency: type: string - product_code: + balance: + type: integer + required: + - currency + - balance + BalanceCheckResponse: + type: object + properties: + status: + type: boolean + message: type: string - slug: + data: + type: array + items: + $ref: '#/components/schemas/BalanceCheckResponseArray' + required: + - status + - message + - data + BalanceFetchLedgerResponseArray: + type: object + properties: + integration: + type: integer + domain: type: string + balance: + type: integer currency: type: string - price: - type: integer - quantity: - type: integer - quantity_sold: + difference: type: integer - active: - type: boolean - domain: + reason: type: string - type: + model_responsible: type: string - in_stock: - type: boolean - unlimited: - type: boolean - metadata: - type: object - properties: - background_color: - type: string - required: - - background_color - files: - type: array - items: {} - success_message: - nullable: true - redirect_url: - nullable: true - split_code: - nullable: true - notification_emails: - nullable: true - minimum_orderable: + model_row: + type: integer + id: type: integer - maximum_orderable: - nullable: true createdAt: type: string updatedAt: type: string - digital_assets: - type: array - items: {} - variant_options: - type: array - items: {} - is_shippable: - type: boolean - shipping_fields: - type: object - properties: - delivery_note: - type: string - shipping_address: - type: string - shipping_fees: - type: array - items: {} - required: - - delivery_note - - shipping_address - - shipping_fees - integration: - type: integer - low_stock_alert: - type: integer required: - - id - - name - - description - - product_code - - slug - - currency - - price - - quantity - - quantity_sold - - active + - integration - domain - - type - - in_stock - - unlimited - - metadata - - files - - success_message - - redirect_url - - split_code - - notification_emails - - minimum_orderable - - maximum_orderable + - balance + - currency + - difference + - reason + - model_responsible + - model_row + - id - createdAt - updatedAt - - digital_assets - - variant_options - - is_shippable - - shipping_fields - - integration - - low_stock_alert - ProductListsResponse: + BalanceFetchLedgerResponse: type: object properties: status: @@ -12674,7 +12931,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ProductListsResponseArray' + $ref: '#/components/schemas/BalanceFetchLedgerResponseArray' meta: type: object properties: @@ -12683,7 +12940,7 @@ components: skipped: type: integer perPage: - type: string + type: integer page: type: integer pageCount: @@ -12700,164 +12957,142 @@ components: - message - data - meta - ProductCreate: + PaymentRequestLineItemsArray: type: object + properties: + name: + type: string + amount: + type: integer + quantity: + type: integer required: - name - - description - - price - - currency + - amount + - quantity + PaymentRequestTaxArray: + type: object properties: name: - description: Name of product type: string - description: - description: The description of the product + amount: + type: integer + required: + - name + - amount + PaymentRequestListResponseArray: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: type: string - price: - description: | - Price should be in kobo if currency is NGN, pesewas, if currency is GHS, - and cents, if currency is ZAR + amount: type: integer currency: - description: | - Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD type: string - unlimited: - description: | - Set to true if the product has unlimited stock. Leave as false if the - product has limited stock + due_date: + type: string + nullable: true + has_invoice: type: boolean - quantity: - description: Number of products in stock. Use if limited is true + invoice_number: type: integer - split_code: - description: The split code if sharing the transaction with partners + nullable: true + description: type: string - metadata: - description: Stringified JSON object of custom data + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: type: string - ProductCreateResponse: - type: object - properties: status: + type: string + paid: type: boolean - message: + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: type: string - data: + customer: type: object properties: - variants_options: - type: array - items: {} - variants: - type: array - items: {} - name: + id: + type: integer + first_name: type: string - description: + last_name: type: string - currency: + email: type: string - price: - type: integer - quantity: - type: integer - type: + customer_code: type: string - is_shippable: - type: boolean - unlimited: - type: boolean - files: - type: array - items: {} - shipping_fields: - type: object - properties: - delivery_note: - type: string - shipping_address: - type: string - shipping_fees: - type: array - items: {} - required: - - delivery_note - - shipping_address - - shipping_fees - integration: - type: integer - domain: + phone: type: string metadata: type: object - properties: - background_color: - type: string - required: - - background_color - slug: - type: string - product_code: - type: string - quantity_sold: - type: integer - active: - type: boolean - deleted_at: - nullable: true - in_stock: - type: boolean - minimum_orderable: - type: integer - maximum_orderable: - type: integer - nullable: true - redirect_url: - type: string - nullable: true - low_stock_alert: - type: boolean - id: - type: integer - createdAt: + risk_action: type: string - updatedAt: + international_format_phone: type: string required: - - variants_options - - variants - - name - - description - - currency - - price - - quantity - - type - - is_shippable - - unlimited - - files - - shipping_fields - - integration - - domain - - metadata - - slug - - product_code - - quantity_sold - - active - - deleted_at - - in_stock - - minimum_orderable - - maximum_orderable - - low_stock_alert - id - - createdAt - - updatedAt + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + type: string + nullable: true required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code - status - - message - - data - ProductFetchResponse: + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + PaymentRequestListResponse: type: object properties: status: @@ -12865,164 +13100,89 @@ components: message: type: string data: + type: array + items: + $ref: '#/components/schemas/PaymentRequestListResponseArray' + meta: type: object properties: - digital_assets: - type: array - items: {} - integration: + total: type: integer - name: - type: string - description: - type: string - product_code: - type: string - price: + skipped: type: integer - currency: - type: string - quantity: + perPage: + anyOf: + - type: integer + - type: string + page: type: integer - quantity_sold: - nullable: true - type: - type: string - files: - type: array - items: {} - file_path: - nullable: true - is_shippable: - type: boolean - shipping_fields: - type: object - properties: - delivery_note: - type: string - shipping_address: - type: string - shipping_fees: - type: array - items: {} - required: - - delivery_note - - shipping_address - - shipping_fees - unlimited: - type: boolean - domain: - type: string - active: - type: boolean - features: - nullable: true - in_stock: - type: boolean - metadata: - type: object - properties: - background_color: - type: string - required: - - background_color - slug: - type: string - success_message: - nullable: true - redirect_url: - nullable: true - split_code: - nullable: true - notification_emails: - nullable: true - minimum_orderable: - type: integer - maximum_orderable: - nullable: true - low_stock_alert: - type: boolean - stock_threshold: - nullable: true - expires_in: - nullable: true - id: + pageCount: type: integer - createdAt: - type: string - updatedAt: - type: string required: - - digital_assets - - integration - - name - - description - - product_code - - price - - currency - - quantity - - quantity_sold - - type - - files - - file_path - - is_shippable - - shipping_fields - - unlimited - - domain - - active - - features - - in_stock - - metadata - - slug - - success_message - - redirect_url - - split_code - - notification_emails - - minimum_orderable - - maximum_orderable - - low_stock_alert - - stock_threshold - - expires_in - - id - - createdAt - - updatedAt + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false required: - status - message - data - ProductUpdate: + - meta + PaymentRequestCreate: type: object + required: + - customer + - amount properties: - name: - description: Name of product - type: string - description: - description: The description of the product + customer: + description: Customer id or code type: string - price: - description: | - Price should be in kobo if currency is NGN, pesewas, if currency is GHS, - and cents, if currency is ZAR + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. type: integer currency: - description: | - Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN type: string - unlimited: - description: | - Set to true if the product has unlimited stock. Leave as false if the - product has limited stock + due_date: + description: ISO 8601 representation of request due date + type: string + format: date-time + description: + description: A short description of the payment request + type: string + line_items: + description: Array of line items + type: array + items: + type: object + tax: + description: Array of taxes + type: array + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true type: boolean - quantity: - description: Number of products in stock. Use if limited is true + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed + type: boolean + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. type: integer split_code: - description: The split code if sharing the transaction with partners + description: The split code of the transaction split. type: string - metadata: - description: JSON object of custom data - type: object - ProductUpdateResponse: + example: + customer: CUS_xqp6o5oja5cackf + amount: 10000 + PaymentRequestCreateResponse: type: object properties: status: @@ -13032,251 +13192,143 @@ components: data: type: object properties: - name: - type: string - description: - type: string - product_code: + id: + type: integer + integration: + type: integer + domain: type: string - price: + amount: type: integer currency: type: string - quantity: - type: integer - quantity_sold: - type: integer - type: + due_date: type: string - files: - type: array - items: {} - file_path: nullable: true - is_shippable: - type: boolean - shipping_fields: - type: object - properties: - delivery_note: - type: string - shipping_address: - type: string - shipping_fees: - type: array - items: {} - required: - - delivery_note - - shipping_address - - shipping_fees - unlimited: + has_invoice: type: boolean - domain: + invoice_number: + type: integer + nullable: true + description: type: string - active: - type: boolean - features: nullable: true - in_stock: + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: type: boolean metadata: type: object - properties: - background_color: - type: string - required: - - background_color - slug: - type: string - success_message: - nullable: true - redirect_url: - nullable: true - split_code: - nullable: true - notification_emails: - nullable: true - minimum_orderable: - type: integer - maximum_orderable: - nullable: true - low_stock_alert: - type: boolean - stock_threshold: - nullable: true - expires_in: nullable: true - id: - type: integer - integration: + notifications: + type: array + items: {} + offline_reference: + type: string + customer: type: integer - createdAt: + created_at: type: string - updatedAt: + discount: + nullable: true + split_code: type: string + nullable: true required: - - name - - description - - product_code - - price - - currency - - quantity - - quantity_sold - - type - - files - - file_path - - is_shippable - - shipping_fields - - unlimited + - id + - integration - domain - - active - - features - - in_stock + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - line_items + - tax + - request_code + - status + - paid - metadata - - slug - - success_message - - redirect_url + - notifications + - offline_reference + - customer + - created_at + - discount - split_code - - notification_emails - - minimum_orderable - - maximum_orderable - - low_stock_alert - - stock_threshold - - expires_in - - id - - integration - - createdAt - - updatedAt required: - status - message - data - ProductDeleteResponse: + PaymentRequestUpdate: type: object properties: - status: - type: boolean - message: + customer: + description: Customer id or code type: string - required: - - status - - message - StorefrontListResponseArray: - type: object - properties: - id: + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. type: integer - name: - type: string - slug: + currency: + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN type: string - orders_count: - type: integer - status: + due_date: + description: ISO 8601 representation of request due date type: string - revenue: - nullable: true - currency: + format: date-time + description: + description: A short description of the payment request type: string - products: - type: array - items: {} - contacts: - type: array - items: {} - social_media: + line_items: + description: Array of line items type: array - items: {} - shipping_fees: + items: + type: object + tax: + description: Array of taxes type: array - items: {} - required: - - id - - name - - slug - - orders_count - - status - - revenue - - currency - - products - - contacts - - social_media - - shipping_fees - StorefrontListResponse: - type: object - properties: - status: + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true + type: boolean + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed type: boolean - message: - type: string - data: - type: array items: - $ref: '#/components/schemas/StorefrontListResponseArray' - meta: - type: object - properties: - total: - type: integer - skipped: - type: integer - perPage: - type: integer - page: - type: integer - pageCount: - type: integer - required: - - total - - skipped - - perPage - - page - - pageCount - additionalProperties: false - required: - - status - - message - - data - - meta - StorefrontCreate: - type: object - required: - - name - - slug - - currency - properties: - name: - description: Name of the storefront - type: string - slug: - description: | - A unique identifier to access your store. Once the storefront is created, it can be accessed from - https://paystack.shop/your-slug - type: string - currency: - description: | - Currency for prices of products in your storefront. Allowed values are: `NGN`, `GHS`, `KES`, `ZAR` or `USD` - type: string - description: - description: The description of the storefront + type: object + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. + type: integer + split_code: + description: The split code of the transaction split. type: string - StorefrontContactsArray: + example: + amount: 15000 + PaymentRequestNotificationsArray: type: object properties: - value: + sent_at: + type: string + channel: type: string - id: - type: integer - type_name: - nullable: true - type: - type: integer required: - - value - - id - - type_name - - type - StorefrontCreateResponse: + - sent_at + - channel + PaymentRequestUpdateResponse: type: object properties: status: @@ -13286,83 +13338,120 @@ components: data: type: object properties: - social_media: - type: array - items: {} - contacts: - type: array - items: - $ref: '#/components/schemas/StorefrontContactsArray' - name: - type: string - slug: + id: + type: integer + integration: + type: integer + domain: type: string + amount: + type: integer currency: type: string - welcome_message: - nullable: true - success_message: + due_date: + type: string nullable: true - redirect_url: + has_invoice: + type: boolean + invoice_number: + type: integer nullable: true description: nullable: true - delivery_note: + pdf_url: type: string - background_color: + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: type: string status: type: string - shippable: + paid: type: boolean - integration: - type: integer - domain: - type: string - digital_product_expiry: + paid_at: nullable: true metadata: - type: object nullable: true - id: - type: integer - createdAt: - type: string - updatedAt: - type: string - products: - type: array - items: {} - shipping_fees: + notifications: type: array - items: {} - required: - - social_media - - contacts - - name - - slug + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + nullable: true + required: + - id + - integration + - domain + - amount - currency - - welcome_message - - success_message - - redirect_url + - due_date + - has_invoice + - invoice_number - description - - delivery_note - - background_color + - pdf_url + - line_items + - tax + - request_code - status - - shippable - - integration - - domain - - digital_product_expiry - - id - - createdAt - - updatedAt - - products - - shipping_fees + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code required: - status - message - data - StorefrontFetchResponse: + PaymentRequestVerifyResponse: type: object properties: status: @@ -13372,302 +13461,469 @@ components: data: type: object properties: - social_media: - type: array - items: {} - contacts: - type: array - items: - $ref: '#/components/schemas/StorefrontContactsArray' - name: - type: string - slug: + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: + type: string + required: + - key + - name + - logo + - allowed_currencies + domain: type: string + amount: + type: integer currency: type: string - welcome_message: - nullable: true - success_message: + due_date: + type: string nullable: true - redirect_url: + has_invoice: + type: boolean + invoice_number: + type: integer nullable: true description: nullable: true - delivery_note: + pdf_url: type: string - background_color: + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: type: string status: type: string - shippable: + paid: type: boolean - integration: - type: integer - domain: - type: string - digital_product_expiry: + paid_at: nullable: true metadata: - type: object nullable: true - id: - type: integer - createdAt: + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: type: string - updatedAt: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: type: string - products: - type: array - items: {} - shipping_fees: - type: array - items: {} + discount: + nullable: true + split_code: + nullable: true + pending_amount: + type: integer required: - - social_media - - contacts - - name - - slug + - id + - integration + - domain + - amount - currency - - welcome_message - - success_message - - redirect_url + - due_date + - has_invoice + - invoice_number - description - - delivery_note - - background_color + - pdf_url + - line_items + - tax + - request_code - status - - shippable - - integration - - domain - - digital_product_expiry - - id - - createdAt - - updatedAt - - products - - shipping_fees - meta: - type: object - properties: - product_count: - type: integer - total: - type: integer - skipped: - type: integer - perPage: - type: integer - page: - type: integer - pageCount: - type: integer - required: - - product_count - - total - - skipped - - perPage - - page - - pageCount - additionalProperties: false - required: + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount + required: - status - message - data - - meta - StorefrontUpdate: + PaymentRequestSendNotificationResponse: type: object properties: - name: - description: Name of the storefront + status: + type: boolean + message: type: string - slug: - description: | - A unique identifier to access your store. Once the storefront is created, it can be accessed from - https://paystack.shop/your-slug + required: + - status + - message + PaymentRequestPendingArray: + type: object + properties: + currency: type: string - description: - description: The description of the storefront + amount: + type: integer + required: + - currency + - amount + PaymentRequestSuccessfulArray: + type: object + properties: + currency: type: string - StorefrontUpdateResponse: + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalResponse: type: object properties: status: type: boolean message: type: string + data: + type: object + properties: + pending: + type: array + items: + $ref: '#/components/schemas/PaymentRequestPendingArray' + successful: + type: array + items: + $ref: '#/components/schemas/PaymentRequestSuccessfulArray' + total: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTotalArray' + required: + - pending + - successful + - total required: - status - message - StorefrontDeleteResponse: + - data + PaymentRequestFinalizeResponse: type: object properties: status: type: boolean message: type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + pdf_url: + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + type: object + properties: + type: + type: string + amount: + type: integer + required: + - type + - amount + nullable: true + split_code: + nullable: true + pending_amount: + type: integer + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount required: - status - message - StorefrontAddProducts: - type: object - required: - - products - properties: - products: - description: An array of product IDs - type: array - items: - type: integer - OrderItemsArray: + - data + PaymentRequestArchiveResponse: type: object properties: - order_item_id: - type: integer - orderId: - type: integer - type: - type: string - item: - type: integer - current_total_items_price: - type: integer - files: - type: string - order: - type: integer - amount: - type: integer - quantity: - type: integer - createdAt: - type: string - name: - type: string - product_level_type: - type: string - product_id: - type: integer - product_success_message: - nullable: true - product_redirect_url: - nullable: true - IFNULL(p1.expires_in, p2.expires_in): - nullable: true - product_quantity_sold: - type: integer - product_notification_emails: - nullable: true - IFNULL(p1.metadata, p2.metadata): + status: + type: boolean + message: type: string - storefront_redirect_url: - nullable: true - storefront_success_message: - nullable: true required: - - order_item_id - - orderId - - type - - item - - current_total_items_price - - files - - order - - amount - - quantity - - createdAt - - name - - product_level_type - - product_id - - product_success_message - - product_redirect_url - - IFNULL(p1.expires_in, p2.expires_in) - - product_quantity_sold - - product_notification_emails - - IFNULL(p1.metadata, p2.metadata) - - storefront_redirect_url - - storefront_success_message - OrderListResponseArray: + - status + - message + ProductListsResponseArray: type: object properties: id: type: integer - order_code: - type: string - integration: - type: integer - domain: + name: + type: string + description: + type: string + product_code: + type: string + slug: type: string currency: type: string - amount: + price: type: integer - transaction: + quantity: type: integer - page: - nullable: true - customer: + quantity_sold: type: integer - customer_name: - type: string - status: - type: string - shipping_address: - nullable: true - metadata: - type: string - created_at: - type: string - updated_at: - type: string - email: + active: + type: boolean + domain: type: string - paid_at: + type: type: string - shipping: - nullable: true - shipping_fees: - type: integer - refunded: + in_stock: type: boolean - is_viewed: + unlimited: type: boolean - refunded_amount: + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + files: + type: array + items: {} + success_message: nullable: true - discount_amount: + redirect_url: nullable: true - discounts: + split_code: nullable: true - items: + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + createdAt: + type: string + updatedAt: + type: string + digital_assets: type: array - items: - $ref: '#/components/schemas/OrderItemsArray' - fully_refunded: + items: {} + variant_options: + type: array + items: {} + is_shippable: type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + integration: + type: integer + low_stock_alert: + type: integer required: - id - - order_code - - integration - - domain + - name + - description + - product_code + - slug - currency - - amount - - transaction - - page - - customer - - customer_name - - status - - shipping_address + - price + - quantity + - quantity_sold + - active + - domain + - type + - in_stock + - unlimited - metadata - - created_at - - updated_at - - email - - paid_at - - shipping - - shipping_fees - - refunded - - is_viewed - - refunded_amount - - discount_amount - - discounts - - items - - fully_refunded - OrderListResponse: + - files + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - createdAt + - updatedAt + - digital_assets + - variant_options + - is_shippable + - shipping_fields + - integration + - low_stock_alert + ProductListsResponse: type: object properties: status: @@ -13677,25 +13933,22 @@ components: data: type: array items: - $ref: '#/components/schemas/OrderListResponseArray' + $ref: '#/components/schemas/ProductListsResponseArray' meta: type: object properties: total: type: integer - revenue: - type: object skipped: type: integer perPage: - type: integer + type: string page: type: integer pageCount: type: integer required: - total - - revenue - skipped - perPage - page @@ -13706,96 +13959,49 @@ components: - message - data - meta - OrderItems: - type: object - description: The collection of items that make up the order - required: - - item - - type - - quantity - - amount - properties: - item: - description: The product ID of the item - type: string - type: - description: The type of the item. `product` is currently the acceptable value - type: string - quantity: - description: The number of items to get - type: integer - amount: - description: The cost of the item - type: integer - OrderShipping: - type: object - description: The shipping details of the order - required: - - street_line - - city - - state - - country - - shipping_fee - properties: - street_line: - description: The address of for the delivery - type: string - city: - description: The city of the delivery address - type: string - state: - description: The state of the delivery address - type: string - country: - description: The country of the delivery address - type: string - shipping_fee: - description: The cost of delivery - type: integer - delivery_note: - description: Extra details to be aware of for the delivery - type: string - OrderCreate: + ProductCreate: type: object required: - - email - - first_name - - last_name - - phone + - name + - description + - price - currency - - items - - shipping properties: - email: - description: The email of the customer placing the order - type: string - first_name: - description: The customer's first name - type: string - last_name: - description: The customer's last name + name: + description: Name of product type: string - phone: - description: The customer's mobile number + description: + description: The description of the product type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer currency: - description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD - type: string - items: - type: array - items: - $ref: '#/components/schemas/OrderItems' - shipping: - $ref: '#/components/schemas/OrderShipping' - is_gift: description: | - A flag to indicate if the order is for someone else - type: boolean - pay_for_me: + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: description: | - A flag to indicate if the someone else should pay for the order + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock type: boolean - OrderCreateResponse: + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + name: Cups + description: Environment friendly paper cups + price: 10000 + currency: NGN + ProductCreateResponse: type: object properties: status: @@ -13805,141 +14011,287 @@ components: data: type: object properties: - discounts: + variants_options: type: array items: {} - currency: + variants: + type: array + items: {} + name: type: string - shipping_address: - nullable: true - integration: - type: integer - domain: + description: type: string - email: + currency: type: string - customer: + price: type: integer - amount: + quantity: type: integer - pay_for_me: + type: + type: string + is_shippable: type: boolean - shipping: + unlimited: + type: boolean + files: + type: array + items: {} + shipping_fields: type: object properties: - customer: - type: integer - integration: - type: integer - domain: - type: string - fees: - type: integer delivery_note: - nullable: true - street_line: - type: string - city: - type: string - state: - type: string - country: - type: string - is_shipped: - type: boolean - delivery_tracking_link: - nullable: true - id: - type: integer - createdAt: type: string - updatedAt: + shipping_address: type: string + shipping_fees: + type: array + items: {} required: - - customer - - integration - - domain - - fees - delivery_note - - street_line - - city - - state - - country - - is_shipped - - delivery_tracking_link - - id - - createdAt - - updatedAt - nullable: true - shipping_fees: + - shipping_address + - shipping_fees + integration: type: integer - shipping_method: + domain: + type: string + metadata: type: object properties: - region: - type: string - fee: - type: integer - currency: + background_color: type: string required: - - region - - fee - - currency - metadata: - type: object - order_code: + - background_color + slug: type: string - status: + product_code: type: string - refunded: + quantity_sold: + type: integer + active: type: boolean - is_viewed: + deleted_at: + nullable: true + in_stock: type: boolean - expiration_date: + minimum_orderable: + type: integer + maximum_orderable: + type: integer + nullable: true + redirect_url: + type: string nullable: true + low_stock_alert: + type: boolean id: type: integer createdAt: type: string updatedAt: type: string - items: + required: + - variants_options + - variants + - name + - description + - currency + - price + - quantity + - type + - is_shippable + - unlimited + - files + - shipping_fields + - integration + - domain + - metadata + - slug + - product_code + - quantity_sold + - active + - deleted_at + - in_stock + - minimum_orderable + - maximum_orderable + - low_stock_alert + - id + - createdAt + - updatedAt + required: + - status + - message + - data + ProductFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + digital_assets: type: array items: {} - pay_for_me_code: + integration: + type: integer + name: type: string - discount_amount: + description: + type: string + product_code: + type: string + price: + type: integer + currency: + type: string + quantity: + type: integer + quantity_sold: + nullable: true + type: + type: string + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: + type: string + active: + type: boolean + features: + nullable: true + in_stock: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + low_stock_alert: + type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true + id: type: integer + createdAt: + type: string + updatedAt: + type: string required: - - discounts - - currency - - shipping_address + - digital_assets - integration + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited - domain - - email - - customer - - amount - - pay_for_me - - shipping - - shipping_fees + - active + - features + - in_stock - metadata - - order_code - - status - - refunded - - is_viewed - - expiration_date + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in - id - createdAt - updatedAt - - items - - pay_for_me_code - - discount_amount required: - status - message - data - OrderFetchResponse: + ProductUpdate: + type: object + properties: + name: + description: Name of product + type: string + description: + description: The description of the product + type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer + currency: + description: | + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: + description: | + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock + type: boolean + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: JSON object of custom data + type: object + example: + name: Spoon + description: Environment friendly paper spoons + price: 5000 + currency: NGN + ProductUpdateResponse: type: object properties: status: @@ -13949,266 +14301,177 @@ components: data: type: object properties: - discounts: - type: array - items: {} - order_code: + name: type: string - domain: + description: type: string - currency: + product_code: type: string - amount: + price: type: integer - email: + currency: type: string - status: + quantity: + type: integer + quantity_sold: + type: integer + type: type: string - refunded: + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: type: boolean - paid_at: + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: type: string - shipping_address: + active: + type: boolean + features: nullable: true + in_stock: + type: boolean metadata: type: object - shipping_fees: + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: type: integer - shipping_method: + maximum_orderable: nullable: true - is_viewed: - type: boolean - expiration_date: - type: string - pay_for_me: + low_stock_alert: type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true id: type: integer integration: type: integer - page: - nullable: true - customer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - shipping: - nullable: true createdAt: type: string updatedAt: type: string - transaction: - type: integer - is_gift: - type: boolean - payer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - fully_refunded: - type: boolean - refunded_amount: - type: integer - items: - type: array - items: - $ref: '#/components/schemas/OrderItemsArray' - discount_amount: - nullable: true required: - - discounts - - order_code - - domain + - name + - description + - product_code + - price - currency - - amount - - email - - status - - refunded - - paid_at - - shipping_address + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited + - domain + - active + - features + - in_stock - metadata - - shipping_fees - - shipping_method - - is_viewed - - expiration_date - - pay_for_me + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in - id - integration - - page - - customer - - shipping - createdAt - updatedAt - - transaction - - is_gift - - payer - - fully_refunded - - refunded_amount - - items - - discount_amount required: - status - message - data - OrderFetchProductResponseArray: + ProductDeleteResponse: type: object properties: - order_id: - type: integer - transaction: - type: integer - order_code: - type: string - customer: - type: integer - first_name: - type: string - last_name: - type: string - customer_name: - type: string - phone: - type: string - email: - type: string - product_code: + status: + type: boolean + message: type: string - product_id: + required: + - status + - message + StorefrontListResponseArray: + type: object + properties: + id: type: integer - product_name: + name: type: string - price: - type: integer - quantity_sold: - type: integer - currency: + slug: type: string - quantity: - type: integer - variant_id: - nullable: true - variant_price: - nullable: true - variant_code: - nullable: true - amount: + orders_count: type: integer - shipping_method: - nullable: true status: type: string - shipping_address: - nullable: true - refunded: - type: boolean - shipping: - nullable: true - paid_at: - type: string - created_at: - type: string - is_shipped: - type: boolean - is_viewed: - type: integer - delivery_note: - nullable: true - shipping_fee: + revenue: nullable: true - amount_paid: - type: integer - storefront_slug: + currency: type: string + products: + type: array + items: {} + contacts: + type: array + items: {} + social_media: + type: array + items: {} + shipping_fees: + type: array + items: {} required: - - order_id - - transaction - - order_code - - customer - - first_name - - last_name - - customer_name - - phone - - email - - product_code - - product_id - - product_name - - price - - quantity_sold - - currency - - quantity - - variant_id - - variant_price - - variant_code - - amount - - shipping_method + - id + - name + - slug + - orders_count - status - - shipping_address - - refunded - - shipping - - paid_at - - created_at - - is_shipped - - is_viewed - - delivery_note - - shipping_fee - - amount_paid - - storefront_slug - OrderFetchProductResponse: + - revenue + - currency + - products + - contacts + - social_media + - shipping_fees + StorefrontListResponse: type: object properties: status: @@ -14218,36 +14481,165 @@ components: data: type: array items: - $ref: '#/components/schemas/OrderFetchProductResponseArray' + $ref: '#/components/schemas/StorefrontListResponseArray' meta: type: object properties: - quantity_sold: - type: integer - revenue: - type: integer total: type: integer skipped: type: integer perPage: type: integer - pageCount: + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + StorefrontCreate: + type: object + required: + - name + - slug + - currency + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug + type: string + currency: + description: Currency for prices of products in your storefront. + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + description: + description: The description of the storefront + type: string + example: + name: Obi and Sons + slug: obi_and_sons + currency: NGN + StorefrontContactsArray: + type: object + properties: + value: + type: string + id: + type: integer + type_name: + nullable: true + type: + type: integer + required: + - value + - id + - type_name + - type + StorefrontCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: + type: string + slug: + type: string + currency: + type: string + welcome_message: + nullable: true + success_message: + nullable: true + redirect_url: + nullable: true + description: + nullable: true + delivery_note: + type: string + background_color: + type: string + status: + type: string + shippable: + type: boolean + integration: + type: integer + domain: + type: string + digital_product_expiry: + nullable: true + metadata: + type: object + nullable: true + id: type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: {} + shipping_fees: + type: array + items: {} required: - - quantity_sold - - revenue - - total - - skipped - - perPage - - pageCount - additionalProperties: false + - social_media + - contacts + - name + - slug + - currency + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color + - status + - shippable + - integration + - domain + - digital_product_expiry + - id + - createdAt + - updatedAt + - products + - shipping_fees required: - status - message - data - - meta - OrderValidateResponse: + StorefrontFetchResponse: type: object properties: status: @@ -14257,205 +14649,308 @@ components: data: type: object properties: - order_code: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: type: string - domain: + slug: type: string currency: type: string - amount: - type: integer - email: - type: string - status: - type: string - refunded: - type: boolean - paid_at: + welcome_message: nullable: true - shipping_address: + success_message: nullable: true - metadata: + redirect_url: nullable: true - shipping_fees: - type: integer - shipping_method: + description: nullable: true - is_viewed: - type: boolean - expiration_date: + delivery_note: type: string - pay_for_me: + background_color: + type: string + status: + type: string + shippable: type: boolean - id: - type: integer integration: - type: object - properties: - key: - type: string - name: - type: string - logo: - type: string - allowed_currencies: - type: array - items: {} - required: - - key - - name - - logo - - allowed_currencies - transaction: - nullable: true - page: + type: integer + domain: + type: string + digital_product_expiry: nullable: true - customer: + metadata: type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - shipping: nullable: true + id: + type: integer createdAt: type: string updatedAt: type: string - payer: - nullable: true + products: + type: array + items: {} + shipping_fees: + type: array + items: {} required: - - order_code - - domain + - social_media + - contacts + - name + - slug - currency - - amount - - email + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color - status - - refunded - - paid_at - - shipping_address - - metadata - - shipping_fees - - shipping_method - - is_viewed - - expiration_date - - pay_for_me - - id + - shippable - integration - - transaction - - page - - customer - - shipping + - domain + - digital_product_expiry + - id - createdAt - updatedAt - - payer + - products + - shipping_fees + meta: + type: object + properties: + product_count: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - product_count + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false required: - status - message - data - PageListResponseArray: + - meta + StorefrontUpdate: + type: object + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from + https://paystack.shop/your-slug + type: string + description: + description: The description of the storefront + type: string + example: + description: Import and Export + StorefrontUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontAddProducts: type: object + required: + - products properties: - integration: + products: + description: An array of product IDs + type: array + items: + type: integer + example: + products: + - 2196244 + - 2179824 + OrderItemsArray: + type: object + properties: + order_item_id: type: integer - plan: - nullable: true - domain: + orderId: + type: integer + type: + type: string + item: + type: integer + current_total_items_price: + type: integer + files: + type: string + order: + type: integer + amount: + type: integer + quantity: + type: integer + createdAt: type: string name: type: string - description: + product_level_type: type: string + product_id: + type: integer + product_success_message: nullable: true - amount: + product_redirect_url: + nullable: true + IFNULL(p1.expires_in, p2.expires_in): + nullable: true + product_quantity_sold: type: integer + product_notification_emails: nullable: true - currency: + IFNULL(p1.metadata, p2.metadata): type: string - slug: + storefront_redirect_url: + nullable: true + storefront_success_message: + nullable: true + required: + - order_item_id + - orderId + - type + - item + - current_total_items_price + - files + - order + - amount + - quantity + - createdAt + - name + - product_level_type + - product_id + - product_success_message + - product_redirect_url + - IFNULL(p1.expires_in, p2.expires_in) + - product_quantity_sold + - product_notification_emails + - IFNULL(p1.metadata, p2.metadata) + - storefront_redirect_url + - storefront_success_message + OrderListResponseArray: + type: object + properties: + id: + type: integer + order_code: type: string - custom_fields: - type: array + integration: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + transaction: + type: integer + page: nullable: true - items: {} - type: + customer: + type: integer + customer_name: type: string - redirect_url: + status: type: string + shipping_address: nullable: true - success_message: + metadata: + type: string + created_at: + type: string + updated_at: + type: string + email: + type: string + paid_at: type: string + shipping: nullable: true - collect_phone: - type: boolean - active: - type: boolean - published: + shipping_fees: + type: integer + refunded: type: boolean - migrate: + is_viewed: type: boolean - notification_email: + refunded_amount: nullable: true - metadata: - type: object + discount_amount: nullable: true - split_code: + discounts: nullable: true - id: - type: integer - createdAt: - type: string - updatedAt: - type: string + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + fully_refunded: + type: boolean required: + - id + - order_code - integration - - plan - domain - - name - - description - - amount - currency - - slug - - custom_fields - - type - - redirect_url - - success_message - - collect_phone - - active - - published - - migrate - - notification_email + - amount + - transaction + - page + - customer + - customer_name + - status + - shipping_address - metadata - - split_code - - id - - createdAt - - updatedAt - PageListResponse: + - created_at + - updated_at + - email + - paid_at + - shipping + - shipping_fees + - refunded + - is_viewed + - refunded_amount + - discount_amount + - discounts + - items + - fully_refunded + OrderListResponse: type: object properties: status: @@ -14465,12 +14960,14 @@ components: data: type: array items: - $ref: '#/components/schemas/PageListResponseArray' + $ref: '#/components/schemas/OrderListResponseArray' meta: type: object properties: total: type: integer + revenue: + type: object skipped: type: integer perPage: @@ -14481,6 +14978,7 @@ components: type: integer required: - total + - revenue - skipped - perPage - page @@ -14491,75 +14989,128 @@ components: - message - data - meta - PageCreate: + OrderItems: + type: object + description: The collection of items that make up the order + required: + - item + - type + - quantity + - amount + properties: + item: + description: The product ID of the item + type: integer + type: + description: The type of the item. `product` is currently the acceptable value + type: string + quantity: + description: The number of items to get + type: integer + amount: + description: The cost of the item + type: integer + example: + item: 2179824 + type: product + quantity: 200000 + amount: 2 + OrderShipping: type: object + description: The shipping details of the order required: - - name + - street_line + - city + - state + - country + - shipping_fee properties: - name: - description: Name of page + street_line: + description: The address of for the delivery + type: string + city: + description: The city of the delivery address + type: string + state: + description: The state of the delivery address + type: string + country: + description: The country of the delivery address + type: string + shipping_fee: + description: The cost of delivery + type: integer + delivery_note: + description: Extra details to be aware of for the delivery + type: string + example: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreate: + type: object + required: + - email + - first_name + - last_name + - phone + - currency + - items + - shipping + properties: + email: + description: The email of the customer placing the order + type: string + first_name: + description: The customer's first name type: string - description: - description: The description of the page + last_name: + description: The customer's last name + type: string + phone: + description: The customer's mobile number type: string - amount: - description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR - type: integer currency: - description: The transaction currency. Defaults to your integration currency. + description: Currency in which amount is set type: string enum: - - NGN - GHS - - ZAR - KES + - NGN - USD - slug: - description: URL slug you would like to be associated with this page. Page will be accessible at `https://paystack.com/pay/[slug]` - type: string - type: - description: | - The type of payment page to create. Defaults to `payment` if no type is specified. - type: string - enum: - - payment - - subscription - - product - - plan - plan: - description: The ID of the plan to subscribe customers on this payment page to when `type` is set to `subscription`. - type: string - fixed_amount: - description: Specifies whether to collect a fixed amount on the payment page. If true, `amount` must be passed. - type: boolean - split_code: - description: The split code of the transaction split. e.g. `SPL_98WF13Eb3w` - type: string - metadata: - description: JSON object of custom data - type: object - redirect_url: - description: | - If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. - type: string - success_message: - description: | - A success message to display to the customer after a successful transaction - type: string - notification_email: - description: | - An email address that will receive transaction notifications for this payment page - type: string - collect_phone: - description: | - Specify whether to collect phone numbers on the payment page - type: boolean - custom_fields: - description: If you would like to accept custom fields, specify them here. + - ZAR + items: type: array items: - type: object - PageCreateResponse: + $ref: '#/components/schemas/OrderItems' + shipping: + $ref: '#/components/schemas/OrderShipping' + is_gift: + description: A flag to indicate if the order is for someone else + type: boolean + pay_for_me: + description: A flag to indicate if the someone else should pay for the order + type: boolean + example: + email: test@email.com + first_name: Demo + last_name: User + phone: '+2348031245678' + currency: NGN + items: + - item: 2179824 + type: product + quantity: 200000 + amount: 2 + shipping: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreateResponse: type: object properties: status: @@ -14569,96 +15120,98 @@ components: data: type: object properties: - name: - type: string - integration: - type: integer - domain: - type: string - slug: - type: string + discounts: + type: array + items: {} currency: type: string - type: - type: string - collect_phone: - type: boolean - active: - type: boolean - published: - type: boolean - migrate: - type: boolean - id: - type: integer - createdAt: - type: string - updatedAt: - type: string - required: - - name - - integration - - domain - - slug - - currency - - type - - collect_phone - - active - - published - - migrate - - id - - createdAt - - updatedAt - required: - - status - - message - - data - PageFetchResponse: - type: object - properties: - status: - type: boolean - message: - type: string - data: - type: object - properties: + shipping_address: + nullable: true integration: type: integer domain: type: string - name: + email: type: string - description: - nullable: true + customer: + type: integer amount: type: integer + pay_for_me: + type: boolean + shipping: + type: object + properties: + customer: + type: integer + integration: + type: integer + domain: + type: string + fees: + type: integer + delivery_note: + nullable: true + street_line: + type: string + city: + type: string + state: + type: string + country: + type: string + is_shipped: + type: boolean + delivery_tracking_link: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - customer + - integration + - domain + - fees + - delivery_note + - street_line + - city + - state + - country + - is_shipped + - delivery_tracking_link + - id + - createdAt + - updatedAt nullable: true - currency: - type: string - slug: + shipping_fees: + type: integer + shipping_method: + type: object + properties: + region: + type: string + fee: + type: integer + currency: + type: string + required: + - region + - fee + - currency + metadata: + type: object + order_code: type: string - custom_fields: - nullable: true - type: + status: type: string - redirect_url: - nullable: true - success_message: - nullable: true - collect_phone: - type: boolean - active: - type: boolean - published: + refunded: type: boolean - migrate: + is_viewed: type: boolean - notification_email: - nullable: true - metadata: - nullable: true - split_code: + expiration_date: nullable: true id: type: integer @@ -14666,48 +15219,42 @@ components: type: string updatedAt: type: string + items: + type: array + items: {} + pay_for_me_code: + type: string + discount_amount: + type: integer required: + - discounts + - currency + - shipping_address - integration - domain - - name - - description + - email + - customer - amount - - currency - - slug - - custom_fields - - type - - redirect_url - - success_message - - collect_phone - - active - - published - - migrate - - notification_email + - pay_for_me + - shipping + - shipping_fees - metadata - - split_code + - order_code + - status + - refunded + - is_viewed + - expiration_date - id - createdAt - updatedAt + - items + - pay_for_me_code + - discount_amount required: - status - message - data - PageUpdate: - type: object - properties: - name: - description: Name of page - type: string - description: - description: The description of the page - type: string - amount: - description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR - type: integer - active: - description: Set to false to deactivate page url - type: boolean - PageUpdateResponse: + OrderFetchResponse: type: object properties: status: @@ -14717,147 +15264,266 @@ components: data: type: object properties: + discounts: + type: array + items: {} + order_code: + type: string domain: type: string - name: + currency: type: string - description: - nullable: true amount: - nullable: true - currency: + type: integer + email: type: string - slug: + status: type: string - custom_fields: - nullable: true - type: + refunded: + type: boolean + paid_at: type: string - redirect_url: + shipping_address: nullable: true - success_message: + metadata: + type: object + shipping_fees: + type: integer + shipping_method: nullable: true - collect_phone: - type: boolean - active: - type: boolean - published: + is_viewed: type: boolean - migrate: + expiration_date: + type: string + pay_for_me: type: boolean - notification_email: - nullable: true - metadata: - nullable: true - split_code: - nullable: true id: type: integer integration: type: integer - plan: + page: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: nullable: true createdAt: type: string updatedAt: type: string + transaction: + type: integer + is_gift: + type: boolean + payer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + fully_refunded: + type: boolean + refunded_amount: + type: integer + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + discount_amount: + nullable: true required: + - discounts + - order_code - domain - - name - - description - - amount - currency - - slug - - custom_fields - - type - - redirect_url - - success_message - - collect_phone - - active - - published - - migrate - - notification_email + - amount + - email + - status + - refunded + - paid_at + - shipping_address - metadata - - split_code + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me - id - integration - - plan + - page + - customer + - shipping - createdAt - updatedAt + - transaction + - is_gift + - payer + - fully_refunded + - refunded_amount + - items + - discount_amount required: - status - message - data - PageCheckSlugAvailabilityResponse: + OrderFetchProductResponseArray: type: object properties: - status: - type: boolean - message: + order_id: + type: integer + transaction: + type: integer + order_code: type: string - required: - - status - - message - PageProduct: - type: object - required: - - product - properties: - product: - description: IDs of all products to add to a page - type: array - items: - type: string - PageProductsArray: - type: object - properties: - product_id: + customer: type: integer - name: + first_name: type: string - description: + last_name: + type: string + customer_name: + type: string + phone: + type: string + email: type: string product_code: type: string - page: + product_id: type: integer + product_name: + type: string price: type: integer + quantity_sold: + type: integer currency: type: string quantity: type: integer - type: + variant_id: + nullable: true + variant_price: + nullable: true + variant_code: + nullable: true + amount: + type: integer + shipping_method: + nullable: true + status: type: string - features: + shipping_address: + nullable: true + refunded: + type: boolean + shipping: + nullable: true + paid_at: + type: string + created_at: + type: string + is_shipped: + type: boolean + is_viewed: + type: integer + delivery_note: nullable: true - is_shippable: + shipping_fee: + nullable: true + amount_paid: type: integer - domain: + storefront_slug: type: string - integration: - type: integer - active: - type: integer - in_stock: - type: integer required: - - product_id - - name - - description + - order_id + - transaction + - order_code + - customer + - first_name + - last_name + - customer_name + - phone + - email - product_code - - page + - product_id + - product_name - price + - quantity_sold - currency - quantity - - type - - features - - is_shippable - - domain - - integration - - active - - in_stock - PageAddProductsResponse: + - variant_id + - variant_price + - variant_code + - amount + - shipping_method + - status + - shipping_address + - refunded + - shipping + - paid_at + - created_at + - is_shipped + - is_viewed + - delivery_note + - shipping_fee + - amount_paid + - storefront_slug + OrderFetchProductResponse: type: object properties: status: @@ -14865,220 +15531,246 @@ components: message: type: string data: + type: array + items: + $ref: '#/components/schemas/OrderFetchProductResponseArray' + meta: type: object properties: - integration: + quantity_sold: type: integer - plan: - nullable: true + revenue: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + pageCount: + type: integer + required: + - quantity_sold + - revenue + - total + - skipped + - perPage + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + OrderValidateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + order_code: + type: string domain: type: string - name: + currency: type: string - description: - nullable: true amount: - nullable: true - currency: + type: integer + email: type: string - slug: + status: type: string - custom_fields: + refunded: + type: boolean + paid_at: nullable: true - type: - type: string - redirect_url: + shipping_address: nullable: true - success_message: + metadata: nullable: true - collect_phone: - type: boolean - active: - type: boolean - published: + shipping_fees: + type: integer + shipping_method: + nullable: true + is_viewed: type: boolean - migrate: + expiration_date: + type: string + pay_for_me: type: boolean - notification_email: + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: {} + required: + - key + - name + - logo + - allowed_currencies + transaction: nullable: true - metadata: + page: nullable: true - split_code: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: nullable: true - id: - type: integer createdAt: type: string updatedAt: type: string - products: - type: array - items: - $ref: '#/components/schemas/PageProductsArray' + payer: + nullable: true required: - - integration - - plan + - order_code - domain - - name - - description - - amount - currency - - slug - - custom_fields - - type - - redirect_url - - success_message - - collect_phone - - active - - published - - migrate - - notification_email + - amount + - email + - status + - refunded + - paid_at + - shipping_address - metadata - - split_code + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me - id + - integration + - transaction + - page + - customer + - shipping - createdAt - updatedAt - - products + - payer required: - status - message - data - PaymentRequestLineItemsArray: - type: object - properties: - name: - type: string - amount: - type: integer - quantity: - type: integer - required: - - name - - amount - - quantity - PaymentRequestTaxArray: - type: object - properties: - name: - type: string - amount: - type: integer - required: - - name - - amount - PaymentRequestListResponseArray: + PageListResponseArray: type: object properties: - id: - type: integer integration: type: integer + plan: + nullable: true domain: type: string - amount: - type: integer - currency: + name: type: string - due_date: + description: type: string nullable: true - has_invoice: - type: boolean - invoice_number: + amount: type: integer nullable: true - description: + currency: type: string - nullable: true - pdf_url: + slug: type: string - nullable: true - line_items: - type: array - items: - $ref: '#/components/schemas/PaymentRequestLineItemsArray' - tax: + custom_fields: type: array - items: - $ref: '#/components/schemas/PaymentRequestTaxArray' - request_code: + nullable: true + items: {} + type: type: string - status: + redirect_url: type: string - paid: + nullable: true + success_message: + type: string + nullable: true + collect_phone: type: boolean - paid_at: + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: nullable: true metadata: - nullable: true - notifications: - type: array - items: {} - offline_reference: - type: string - customer: type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - created_at: - type: string - discount: nullable: true split_code: - type: string nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string required: - - id - integration + - plan - domain + - name + - description - amount - currency - - due_date - - has_invoice - - invoice_number - - description - - pdf_url - - line_items - - tax - - request_code - - status - - paid - - paid_at + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email - metadata - - notifications - - offline_reference - - customer - - created_at - - discount - split_code - PaymentRequestListResponse: + - id + - createdAt + - updatedAt + PageListResponse: type: object properties: status: @@ -15088,7 +15780,7 @@ components: data: type: array items: - $ref: '#/components/schemas/PaymentRequestListResponseArray' + $ref: '#/components/schemas/PageListResponseArray' meta: type: object properties: @@ -15097,236 +15789,95 @@ components: skipped: type: integer perPage: - anyOf: - - type: integer - - type: string - page: - type: integer - pageCount: - type: integer - required: - - total - - skipped - - perPage - - page - - pageCount - additionalProperties: false - required: - - status - - message - - data - - meta - PaymentRequestCreate: - type: object - required: - - customer - properties: - customer: - description: Customer id or code - type: string - amount: - description: |- - Payment request amount. Only useful if line items and tax values are ignored. - The endpoint will throw a friendly warning if neither is available. - type: integer - currency: - description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN - type: string - due_date: - description: ISO 8601 representation of request due date - type: string - format: date-time - description: - description: A short description of the payment request - type: string - line_items: - description: Array of line items - type: array - items: - type: object - tax: - description: Array of taxes - type: array - items: - type: object - send_notification: - description: Indicates whether Paystack sends an email notification to customer. Defaults to true - type: boolean - items: - type: object - draft: - description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification - type: boolean - items: - type: object - has_invoice: - description: |- - Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) - even if there are no line_items or tax passed - type: boolean - items: - type: object - invoice_number: - description: |- - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help - override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. - type: integer - split_code: - description: The split code of the transaction split. - type: string - PaymentRequestCreateResponse: - type: object - properties: - status: - type: boolean - message: - type: string - data: - type: object - properties: - id: - type: integer - integration: - type: integer - domain: - type: string - amount: - type: integer - currency: - type: string - due_date: - type: string - nullable: true - has_invoice: - type: boolean - invoice_number: type: integer - nullable: true - description: - type: string - nullable: true - line_items: - type: array - items: {} - tax: - type: array - items: {} - request_code: - type: string - status: - type: string - paid: - type: boolean - metadata: - type: object - nullable: true - notifications: - type: array - items: {} - offline_reference: - type: string - customer: + page: + type: integer + pageCount: type: integer - created_at: - type: string - discount: - nullable: true - split_code: - type: string - nullable: true required: - - id - - integration - - domain - - amount - - currency - - due_date - - has_invoice - - invoice_number - - description - - line_items - - tax - - request_code - - status - - paid - - metadata - - notifications - - offline_reference - - customer - - created_at - - discount - - split_code + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false required: - status - message - data - PaymentRequestUpdate: + - meta + PageCreate: type: object + required: + - name properties: - customer: - description: Customer id or code + name: + description: Name of page + type: string + description: + description: The description of the page type: string amount: - description: |- - Payment request amount. Only useful if line items and tax values are ignored. - The endpoint will throw a friendly warning if neither is available. + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR type: integer currency: - description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN + description: The transaction currency. Defaults to your integration currency. type: string - due_date: - description: ISO 8601 representation of request due date + enum: + - NGN + - GHS + - ZAR + - KES + - USD + slug: + description: URL slug you would like to be associated with this page. Page will be accessible at `https://paystack.com/pay/[slug]` type: string - format: date-time - description: - description: A short description of the payment request + type: + description: | + The type of payment page to create. Defaults to `payment` if no type is specified. type: string - line_items: - description: Array of line items - type: array - items: - type: object - tax: - description: Array of taxes - type: array - items: - type: object - send_notification: - description: Indicates whether Paystack sends an email notification to customer. Defaults to true - type: boolean - items: - type: object - draft: - description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification - type: boolean - items: - type: object - has_invoice: - description: |- - Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) - even if there are no line_items or tax passed + enum: + - payment + - subscription + - product + - plan + plan: + description: The ID of the plan to subscribe customers on this payment page to when `type` is set to `subscription`. + type: string + fixed_amount: + description: Specifies whether to collect a fixed amount on the payment page. If true, `amount` must be passed. type: boolean - items: - type: object - invoice_number: - description: |- - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help - override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. - type: integer split_code: - description: The split code of the transaction split. + description: The split code of the transaction split. e.g. `SPL_98WF13Eb3w` type: string - PaymentRequestNotificationsArray: - type: object - properties: - sent_at: + metadata: + description: JSON object of custom data + type: object + redirect_url: + description: | + If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. type: string - channel: + success_message: + description: | + A success message to display to the customer after a successful transaction type: string - required: - - sent_at - - channel - PaymentRequestUpdateResponse: + notification_email: + description: | + An email address that will receive transaction notifications for this payment page + type: string + collect_phone: + description: | + Specify whether to collect phone numbers on the payment page + type: boolean + custom_fields: + description: If you would like to accept custom fields, specify them here. + type: array + items: + type: object + example: + name: Extra Charges + amount: 200000 + PageCreateResponse: type: object properties: status: @@ -15336,120 +15887,51 @@ components: data: type: object properties: - id: - type: integer + name: + type: string integration: type: integer domain: type: string - amount: - type: integer + slug: + type: string currency: type: string - due_date: + type: type: string - nullable: true - has_invoice: + collect_phone: type: boolean - invoice_number: - type: integer - nullable: true - description: - nullable: true - pdf_url: - type: string - nullable: true - line_items: - type: array - items: {} - tax: - type: array - items: {} - request_code: - type: string - status: - type: string - paid: + active: type: boolean - paid_at: - nullable: true - metadata: - nullable: true - notifications: - type: array - items: - $ref: '#/components/schemas/PaymentRequestNotificationsArray' - offline_reference: + published: + type: boolean + migrate: + type: boolean + id: + type: integer + createdAt: type: string - customer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - properties: - calling_code: - type: string - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - created_at: + updatedAt: type: string - discount: - nullable: true - split_code: - nullable: true required: - - id + - name - integration - domain - - amount + - slug - currency - - due_date - - has_invoice - - invoice_number - - description - - pdf_url - - line_items - - tax - - request_code - - status - - paid - - paid_at - - metadata - - notifications - - offline_reference - - customer - - created_at - - discount - - split_code + - type + - collect_phone + - active + - published + - migrate + - id + - createdAt + - updatedAt required: - status - message - data - PaymentRequestVerifyResponse: + PageFetchResponse: type: object properties: status: @@ -15459,209 +15941,93 @@ components: data: type: object properties: - id: - type: integer integration: - type: object - properties: - key: - type: string - name: - type: string - logo: - type: string - allowed_currencies: - type: array - items: - type: string - required: - - key - - name - - logo - - allowed_currencies + type: integer domain: type: string + name: + type: string + description: + nullable: true amount: type: integer + nullable: true currency: type: string - due_date: + slug: type: string + custom_fields: nullable: true - has_invoice: - type: boolean - invoice_number: - type: integer - nullable: true - description: - nullable: true - pdf_url: + type: type: string + redirect_url: nullable: true - line_items: - type: array - items: {} - tax: - type: array - items: {} - request_code: - type: string - status: - type: string - paid: + success_message: + nullable: true + collect_phone: type: boolean - paid_at: + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: nullable: true metadata: nullable: true - notifications: - type: array - items: - $ref: '#/components/schemas/PaymentRequestNotificationsArray' - offline_reference: - type: string - customer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - properties: - calling_code: - type: string - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - created_at: - type: string - discount: - nullable: true split_code: nullable: true - pending_amount: + id: type: integer + createdAt: + type: string + updatedAt: + type: string required: - - id - integration - domain + - name + - description - amount - currency - - due_date - - has_invoice - - invoice_number - - description - - pdf_url - - line_items - - tax - - request_code - - status - - paid - - paid_at + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email - metadata - - notifications - - offline_reference - - customer - - created_at - - discount - split_code - - pending_amount + - id + - createdAt + - updatedAt required: - status - message - data - PaymentRequestSendNotificationResponse: - type: object - properties: - status: - type: boolean - message: - type: string - required: - - status - - message - PaymentRequestPendingArray: - type: object - properties: - currency: - type: string - amount: - type: integer - required: - - currency - - amount - PaymentRequestSuccessfulArray: + PageUpdate: type: object properties: - currency: + name: + description: Name of page type: string - amount: - type: integer - required: - - currency - - amount - PaymentRequestTotalArray: - type: object - properties: - currency: + description: + description: The description of the page type: string amount: + description: Amount should be in the subunit of the currency type: integer - required: - - currency - - amount - PaymentRequestTotalResponse: - type: object - properties: - status: + active: + description: Set to false to deactivate page url type: boolean - message: - type: string - data: - type: object - properties: - pending: - type: array - items: - $ref: '#/components/schemas/PaymentRequestPendingArray' - successful: - type: array - items: - $ref: '#/components/schemas/PaymentRequestSuccessfulArray' - total: - type: array - items: - $ref: '#/components/schemas/PaymentRequestTotalArray' - required: - - pending - - successful - - total - required: - - status - - message - - data - PaymentRequestFinalizeResponse: + example: + name: Backyard Sale + PageUpdateResponse: type: object properties: status: @@ -15671,133 +16037,78 @@ components: data: type: object properties: - id: - type: integer - integration: - type: integer domain: type: string - amount: - type: integer - currency: - type: string - due_date: + name: type: string - nullable: true - has_invoice: - type: boolean - invoice_number: - type: integer - nullable: true description: - type: string nullable: true - pdf_url: + amount: nullable: true - line_items: - type: array - items: - $ref: '#/components/schemas/PaymentRequestLineItemsArray' - tax: - type: array - items: - $ref: '#/components/schemas/PaymentRequestTaxArray' - request_code: + currency: type: string - status: + slug: + type: string + custom_fields: + nullable: true + type: type: string - paid: + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: type: boolean - paid_at: + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: nullable: true metadata: nullable: true - notifications: - type: array - items: {} - offline_reference: - type: string - customer: - type: object - properties: - id: - type: integer - first_name: - type: string - last_name: - type: string - email: - type: string - customer_code: - type: string - phone: - type: string - metadata: - type: object - properties: - calling_code: - type: string - risk_action: - type: string - international_format_phone: - type: string - required: - - id - - first_name - - last_name - - email - - customer_code - - phone - - metadata - - risk_action - - international_format_phone - created_at: - type: string - discount: - type: object - properties: - type: - type: string - amount: - type: integer - required: - - type - - amount - nullable: true split_code: nullable: true - pending_amount: + id: + type: integer + integration: type: integer + plan: + nullable: true + createdAt: + type: string + updatedAt: + type: string required: - - id - - integration - domain + - name + - description - amount - currency - - due_date - - has_invoice - - invoice_number - - description - - pdf_url - - line_items - - tax - - request_code - - status - - paid - - paid_at + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email - metadata - - notifications - - offline_reference - - customer - - created_at - - discount - split_code - - pending_amount + - id + - integration + - plan + - createdAt + - updatedAt required: - status - message - data - PaymentRequestArchiveResponse: + PageCheckSlugAvailabilityResponse: type: object properties: status: @@ -15807,69 +16118,70 @@ components: required: - status - message - BalanceCheckResponseArray: + PageProduct: type: object - properties: - currency: - type: string - balance: - type: integer required: - - currency - - balance - BalanceCheckResponse: - type: object + - products properties: - status: - type: boolean - message: - type: string - data: + products: + description: A list of IDs of products to add to a page. type: array items: - $ref: '#/components/schemas/BalanceCheckResponseArray' - required: - - status - - message - - data - BalanceFetchLedgerResponseArray: + type: integer + example: + products: + - 2196244 + - 2179824 + PageProductsArray: type: object properties: - integration: + product_id: type: integer - domain: + name: type: string - balance: + description: + type: string + product_code: + type: string + page: + type: integer + price: type: integer currency: type: string - difference: + quantity: type: integer - reason: + type: type: string - model_responsible: + features: + nullable: true + is_shippable: + type: integer + domain: type: string - model_row: + integration: type: integer - id: + active: + type: integer + in_stock: type: integer - createdAt: - type: string - updatedAt: - type: string required: - - integration - - domain - - balance + - product_id + - name + - description + - product_code + - page + - price - currency - - difference - - reason - - model_responsible - - model_row - - id - - createdAt - - updatedAt - BalanceFetchLedgerResponse: + - quantity + - type + - features + - is_shippable + - domain + - integration + - active + - in_stock + PageAddProductsResponse: type: object properties: status: @@ -15877,34 +16189,84 @@ components: message: type: string data: - type: array - items: - $ref: '#/components/schemas/BalanceFetchLedgerResponseArray' - meta: type: object properties: - total: - type: integer - skipped: - type: integer - perPage: - type: integer - page: + integration: type: integer - pageCount: + plan: + nullable: true + domain: + type: string + name: + type: string + description: + nullable: true + amount: + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: + $ref: '#/components/schemas/PageProductsArray' required: - - total - - skipped - - perPage - - page - - pageCount - additionalProperties: false + - integration + - plan + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + - products required: - status - message - data - - meta ControlPanelFetchPaymentSessionTimeoutResponse: type: object properties: @@ -15930,8 +16292,8 @@ components: properties: timeout: description: Time in seconds before a transaction becomes invalid - type: string - example: '30' + type: integer + example: 30 ControlPanelUpdatePaymentSessionTimeoutResponse: type: object properties: @@ -16107,22 +16469,28 @@ components: - 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: @@ -16261,6 +16629,123 @@ components: - 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' + RefundRetryResponse: + title: Generated schema for Root + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: number + transaction: + type: number + dispute: + type: object + settlement: + type: object + id: + type: number + domain: + type: string + currency: + type: string + amount: + type: number + status: + type: string + refunded_at: + type: string + nullable: true + expected_at: + type: string + channel: + type: string + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: number + fully_deducted: + type: boolean + bank_reference: + type: string + nullable: true + reason: + type: string + customer: + type: object + initiated_by: + type: string + reversed_at: + type: string + nullable: true + session_id: + type: string + nullable: true + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - expected_at + - channel + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - bank_reference + - reason + - customer + - initiated_by + - reversed_at + - session_id + required: + - status + - message + - data RefundFetchResponse: type: object properties: @@ -16952,11 +17437,13 @@ components: - refund_amount properties: refund_amount: - description: The amount to refund, in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR - type: string + description: The amount to refund, in the subunit of your currency + type: integer uploaded_filename: description: Filename of attachment returned via response from the Dispute upload URL type: string + example: + refund_amount: 50000 DisputeUpdateResponse: type: object properties: @@ -17522,14 +18009,19 @@ components: description: Reason for resolving type: string refund_amount: - description: The amount to refund, in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR - type: string + description: The amount to refund, in the subunit of your integration currency + type: integer uploaded_filename: description: Filename of attachment returned via response from the Dispute upload URL type: string evidence: description: Evidence Id for fraud claims type: integer + example: + resolution: merchant-accepted + message: Merchant accepted + refund_amount: 50000 + uploaded_filename: qesp8a4df1xejihd9x5q DisputeResolveResponse: type: object properties: @@ -17658,6 +18150,11 @@ components: description: ISO 8601 representation of delivery date (YYYY-MM-DD) type: string format: date-time + example: + customer_email: customer@email.com + customer_name: Mensah King + customer_phone: '08012345678' + service_details: claim for buying cups DisputeAddEvidenceResponse: type: object properties: @@ -17834,6 +18331,14 @@ components: document_number: description: Customer’s mode of identity number type: string + example: + account_name: Ann Bron + account_number: '0123456789' + account_type: personal + bank_code: '632005' + country_code: ZA + document_type: identityNumber + document_number: '1234567890123' VerificationValidateAccountResponse: type: object properties: @@ -18354,6 +18859,54 @@ components: application/json: schema: $ref: '#/components/schemas/SubscriptionDisableResponse' + PaymentRequestListSuccess: + description: Payment Request List response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestListResponse' + PaymentRequestCreateSuccess: + description: Payment Request Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestCreateResponse' + PaymentRequestUpdateSuccess: + description: Payment Request Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestUpdateResponse' + PaymentRequestVerifySuccess: + description: Payment Request Verify response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestVerifyResponse' + PaymentRequestSendNotificationSuccess: + description: Payment Request Send Notification response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestSendNotificationResponse' + PaymentRequestTotalSuccess: + description: Payment Request Total response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestTotalResponse' + PaymentRequestFinalizeSuccess: + description: Payment Request Finalize response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestFinalizeResponse' + PaymentRequestArchiveSuccess: + description: Payment Request Archive response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestArchiveResponse' ProductListsSuccess: description: Product Lists response content: @@ -18480,54 +19033,6 @@ components: application/json: schema: $ref: '#/components/schemas/PageAddProductsResponse' - PaymentRequestListSuccess: - description: Payment Request List response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestListResponse' - PaymentRequestCreateSuccess: - description: Payment Request Create response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestCreateResponse' - PaymentRequestUpdateSuccess: - description: Payment Request Update response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestUpdateResponse' - PaymentRequestVerifySuccess: - description: Payment Request Verify response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestVerifyResponse' - PaymentRequestSendNotificationSuccess: - description: Payment Request Send Notification response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestSendNotificationResponse' - PaymentRequestTotalSuccess: - description: Payment Request Total response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestTotalResponse' - PaymentRequestFinalizeSuccess: - description: Payment Request Finalize response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestFinalizeResponse' - PaymentRequestArchiveSuccess: - description: Payment Request Archive response - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentRequestArchiveResponse' RefundListSuccess: description: Refund List response content: @@ -18540,6 +19045,12 @@ components: application/json: schema: $ref: '#/components/schemas/RefundCreateResponse' + RefundRetrySuccess: + description: Refund Create response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRetryResponse' RefundFetchSuccess: description: Refund Fetch response content: @@ -18565,7 +19076,7 @@ components: schema: $ref: '#/components/schemas/DisputeUpdateResponse' DisputeUploadURLSuccess: - description: Dispute Upload U R L response + description: Dispute Upload URL response content: application/json: schema: diff --git a/src/assets/openapi/components/responses/DisputeUploadURLSuccess.yaml b/src/assets/openapi/components/responses/DisputeUploadURLSuccess.yaml index 1f4728f..5aa40a4 100644 --- a/src/assets/openapi/components/responses/DisputeUploadURLSuccess.yaml +++ b/src/assets/openapi/components/responses/DisputeUploadURLSuccess.yaml @@ -1,4 +1,4 @@ -description: Dispute Upload U R L response +description: Dispute Upload URL response content: application/json: schema: diff --git a/src/assets/openapi/components/responses/RefundRetrySuccess.yaml b/src/assets/openapi/components/responses/RefundRetrySuccess.yaml new file mode 100644 index 0000000..e1e1fa6 --- /dev/null +++ b/src/assets/openapi/components/responses/RefundRetrySuccess.yaml @@ -0,0 +1,5 @@ +description: Refund Create response +content: + application/json: + schema: + $ref: ../schemas/RefundRetryResponse.yaml diff --git a/src/assets/openapi/components/schemas/BankValidateRequest.yaml b/src/assets/openapi/components/schemas/BankValidateRequest.yaml index ada9129..9fe6976 100644 --- a/src/assets/openapi/components/schemas/BankValidateRequest.yaml +++ b/src/assets/openapi/components/schemas/BankValidateRequest.yaml @@ -37,3 +37,11 @@ properties: document_number: description: Customer’s mode of identity number type: string +example: + account_name: Ann Bron + account_number: '0123456789' + account_type: personal + bank_code: '632005' + country_code: ZA + document_type: identityNumber + document_number: '1234567890123' \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/DisputeEvidence.yaml b/src/assets/openapi/components/schemas/DisputeEvidence.yaml index 01e9b4f..7cc4629 100644 --- a/src/assets/openapi/components/schemas/DisputeEvidence.yaml +++ b/src/assets/openapi/components/schemas/DisputeEvidence.yaml @@ -24,3 +24,9 @@ properties: description: ISO 8601 representation of delivery date (YYYY-MM-DD) type: string format: date-time +example: + customer_email: customer@email.com + customer_name: Mensah King + customer_phone: '08012345678' + service_details: claim for buying cups + diff --git a/src/assets/openapi/components/schemas/DisputeResolve.yaml b/src/assets/openapi/components/schemas/DisputeResolve.yaml index e18d4a5..a417773 100644 --- a/src/assets/openapi/components/schemas/DisputeResolve.yaml +++ b/src/assets/openapi/components/schemas/DisputeResolve.yaml @@ -12,13 +12,16 @@ properties: description: Reason for resolving type: string refund_amount: - description: >- - The amount to refund, in kobo if currency is NGN, pesewas, if currency is - GHS, and cents, if currency is ZAR - type: string + description: The amount to refund, in the subunit of your integration currency + type: integer uploaded_filename: description: Filename of attachment returned via response from the Dispute upload URL type: string evidence: description: Evidence Id for fraud claims type: integer +example: + resolution: 'merchant-accepted' + message: Merchant accepted + refund_amount: 50000 + uploaded_filename: qesp8a4df1xejihd9x5q \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/DisputeUpdate.yaml b/src/assets/openapi/components/schemas/DisputeUpdate.yaml index 451816a..aecec21 100644 --- a/src/assets/openapi/components/schemas/DisputeUpdate.yaml +++ b/src/assets/openapi/components/schemas/DisputeUpdate.yaml @@ -3,10 +3,10 @@ required: - refund_amount properties: refund_amount: - description: >- - The amount to refund, in kobo if currency is NGN, pesewas, if currency is - GHS, and cents, if currency is ZAR - type: string + description: The amount to refund, in the subunit of your currency + type: integer uploaded_filename: description: Filename of attachment returned via response from the Dispute upload URL type: string +example: + refund_amount: 50000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/OrderCreate.yaml b/src/assets/openapi/components/schemas/OrderCreate.yaml index b062789..f17d469 100644 --- a/src/assets/openapi/components/schemas/OrderCreate.yaml +++ b/src/assets/openapi/components/schemas/OrderCreate.yaml @@ -21,8 +21,14 @@ properties: description: The customer's mobile number type: string currency: - description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD + description: Currency in which amount is set type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR items: type: array items: @@ -30,10 +36,25 @@ properties: shipping: $ref: ./OrderShipping.yaml is_gift: - description: | - A flag to indicate if the order is for someone else + description: A flag to indicate if the order is for someone else type: boolean pay_for_me: - description: | - A flag to indicate if the someone else should pay for the order + description: A flag to indicate if the someone else should pay for the order type: boolean +example: + email: test@email.com + first_name: Demo + last_name: User + phone: '+2348031245678' + currency: NGN + items: + - item: 2179824 + type: product + quantity: 200000 + amount: 2 + shipping: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/OrderItems.yaml b/src/assets/openapi/components/schemas/OrderItems.yaml index e165ebe..35c9b6e 100644 --- a/src/assets/openapi/components/schemas/OrderItems.yaml +++ b/src/assets/openapi/components/schemas/OrderItems.yaml @@ -8,7 +8,7 @@ required: properties: item: description: The product ID of the item - type: string + type: integer type: description: The type of the item. `product` is currently the acceptable value type: string @@ -18,3 +18,8 @@ properties: amount: description: The cost of the item type: integer +example: + item: 2179824 + type: product + quantity: 200000 + amount: 2 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/OrderShipping.yaml b/src/assets/openapi/components/schemas/OrderShipping.yaml index a438862..0ba5065 100644 --- a/src/assets/openapi/components/schemas/OrderShipping.yaml +++ b/src/assets/openapi/components/schemas/OrderShipping.yaml @@ -25,3 +25,9 @@ properties: delivery_note: description: Extra details to be aware of for the delivery type: string +example: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/PageCreate.yaml b/src/assets/openapi/components/schemas/PageCreate.yaml index b21cbb6..ddf77a2 100644 --- a/src/assets/openapi/components/schemas/PageCreate.yaml +++ b/src/assets/openapi/components/schemas/PageCreate.yaml @@ -77,3 +77,6 @@ properties: type: array items: type: object +example: + name: "Extra Charges" + amount: 200000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/PageProduct.yaml b/src/assets/openapi/components/schemas/PageProduct.yaml index 89160a2..2646aea 100644 --- a/src/assets/openapi/components/schemas/PageProduct.yaml +++ b/src/assets/openapi/components/schemas/PageProduct.yaml @@ -1,9 +1,13 @@ type: object required: - - product + - products properties: - product: - description: IDs of all products to add to a page + products: + description: A list of IDs of products to add to a page. type: array items: - type: string + type: integer +example: + products: + - 2196244 + - 2179824 diff --git a/src/assets/openapi/components/schemas/PageUpdate.yaml b/src/assets/openapi/components/schemas/PageUpdate.yaml index 7818df9..eb5cec3 100644 --- a/src/assets/openapi/components/schemas/PageUpdate.yaml +++ b/src/assets/openapi/components/schemas/PageUpdate.yaml @@ -8,9 +8,10 @@ properties: type: string amount: description: >- - Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, - and cents, if currency is ZAR + Amount should be in the subunit of the currency type: integer active: description: Set to false to deactivate page url type: boolean +example: + name: "Backyard Sale" \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/PaymentRequestCreate.yaml b/src/assets/openapi/components/schemas/PaymentRequestCreate.yaml index 13fbcc0..c616dea 100644 --- a/src/assets/openapi/components/schemas/PaymentRequestCreate.yaml +++ b/src/assets/openapi/components/schemas/PaymentRequestCreate.yaml @@ -1,6 +1,7 @@ type: object required: - customer + - amount properties: customer: description: Customer id or code @@ -39,32 +40,25 @@ properties: Indicates whether Paystack sends an email notification to customer. Defaults to true type: boolean - items: - type: object draft: description: >- Indicate if request should be saved as draft. Defaults to false and overrides send_notification type: boolean - items: - type: object has_invoice: description: >- Set to true to create a draft invoice (adds an auto incrementing invoice - number if none is provided) - - even if there are no line_items or tax passed + number if none is provided) even if there are no line_items or tax passed type: boolean - items: - type: object invoice_number: description: >- - Numeric value of invoice. Invoice will start from 1 and auto increment - from there. This field is to help - - override whatever value Paystack decides. Auto increment for subsequent - invoices continue from this point. + Numeric value of invoice. Invoice will start from 1 and auto increment from there. + This field is to help override whatever value Paystack decides. Auto increment for + subsequent invoices continue from this point. type: integer split_code: description: The split code of the transaction split. type: string +example: + customer: CUS_xqp6o5oja5cackf + amount: 10000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/PaymentRequestUpdate.yaml b/src/assets/openapi/components/schemas/PaymentRequestUpdate.yaml index 86aa0c7..6275fc8 100644 --- a/src/assets/openapi/components/schemas/PaymentRequestUpdate.yaml +++ b/src/assets/openapi/components/schemas/PaymentRequestUpdate.yaml @@ -37,32 +37,26 @@ properties: Indicates whether Paystack sends an email notification to customer. Defaults to true type: boolean - items: - type: object draft: description: >- Indicate if request should be saved as draft. Defaults to false and overrides send_notification type: boolean - items: - type: object has_invoice: description: >- Set to true to create a draft invoice (adds an auto incrementing invoice - number if none is provided) - - even if there are no line_items or tax passed + number if none is provided) even if there are no line_items or tax passed type: boolean items: type: object invoice_number: description: >- Numeric value of invoice. Invoice will start from 1 and auto increment - from there. This field is to help - - override whatever value Paystack decides. Auto increment for subsequent - invoices continue from this point. + from there. This field is to help override whatever value Paystack decides. + Auto increment for subsequent invoices continue from this point. type: integer split_code: description: The split code of the transaction split. type: string +example: + amount: 15000 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/PaymentSession.yaml b/src/assets/openapi/components/schemas/PaymentSession.yaml index ae57d41..8c5f718 100644 --- a/src/assets/openapi/components/schemas/PaymentSession.yaml +++ b/src/assets/openapi/components/schemas/PaymentSession.yaml @@ -4,5 +4,5 @@ required: properties: timeout: description: Time in seconds before a transaction becomes invalid - type: string - example: '30' + type: integer + example: 30 diff --git a/src/assets/openapi/components/schemas/ProductCreate.yaml b/src/assets/openapi/components/schemas/ProductCreate.yaml index e4d3343..33d77d2 100644 --- a/src/assets/openapi/components/schemas/ProductCreate.yaml +++ b/src/assets/openapi/components/schemas/ProductCreate.yaml @@ -34,3 +34,8 @@ properties: metadata: description: Stringified JSON object of custom data type: string +example: + name: Cups + description: Environment friendly paper cups + price: 10000 + currency: NGN \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/ProductUpdate.yaml b/src/assets/openapi/components/schemas/ProductUpdate.yaml index 627bd63..e800c1a 100644 --- a/src/assets/openapi/components/schemas/ProductUpdate.yaml +++ b/src/assets/openapi/components/schemas/ProductUpdate.yaml @@ -29,3 +29,8 @@ properties: metadata: description: JSON object of custom data type: object +example: + name: Spoon + description: Environment friendly paper spoons + price: 5000 + currency: NGN \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/RefundCreate.yaml b/src/assets/openapi/components/schemas/RefundCreate.yaml index e20a753..ab8323a 100644 --- a/src/assets/openapi/components/schemas/RefundCreate.yaml +++ b/src/assets/openapi/components/schemas/RefundCreate.yaml @@ -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 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/RefundRetry.yaml b/src/assets/openapi/components/schemas/RefundRetry.yaml new file mode 100644 index 0000000..4f179a4 --- /dev/null +++ b/src/assets/openapi/components/schemas/RefundRetry.yaml @@ -0,0 +1,6 @@ +type: object +required: + - refund_account_details +properties: + refund_account_details: + $ref: './RefundRetryAccountDetails.yaml' \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/RefundRetryAccountDetails.yaml b/src/assets/openapi/components/schemas/RefundRetryAccountDetails.yaml new file mode 100644 index 0000000..a86c80d --- /dev/null +++ b/src/assets/openapi/components/schemas/RefundRetryAccountDetails.yaml @@ -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' \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/RefundRetryResponse.yaml b/src/assets/openapi/components/schemas/RefundRetryResponse.yaml new file mode 100644 index 0000000..1952d3c --- /dev/null +++ b/src/assets/openapi/components/schemas/RefundRetryResponse.yaml @@ -0,0 +1,88 @@ +title: Generated schema for Root +type: object +properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: number + transaction: + type: number + dispute: + type: object + settlement: + type: object + id: + type: number + domain: + type: string + currency: + type: string + amount: + type: number + status: + type: string + refunded_at: + type: string + nullable: true + expected_at: + type: string + channel: + type: string + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: number + fully_deducted: + type: boolean + bank_reference: + type: string + nullable: true + reason: + type: string + customer: + type: object + initiated_by: + type: string + reversed_at: + type: string + nullable: true + session_id: + type: string + nullable: true + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - expected_at + - channel + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - bank_reference + - reason + - customer + - initiated_by + - reversed_at + - session_id +required: + - status + - message + - data diff --git a/src/assets/openapi/components/schemas/StorefrontAddProducts.yaml b/src/assets/openapi/components/schemas/StorefrontAddProducts.yaml index 5a3a944..5304d90 100644 --- a/src/assets/openapi/components/schemas/StorefrontAddProducts.yaml +++ b/src/assets/openapi/components/schemas/StorefrontAddProducts.yaml @@ -7,3 +7,7 @@ properties: type: array items: type: integer +example: + products: + - 2196244 + - 2179824 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/StorefrontCreate.yaml b/src/assets/openapi/components/schemas/StorefrontCreate.yaml index 64c4f53..e738db3 100644 --- a/src/assets/openapi/components/schemas/StorefrontCreate.yaml +++ b/src/assets/openapi/components/schemas/StorefrontCreate.yaml @@ -11,14 +11,21 @@ properties: description: > A unique identifier to access your store. Once the storefront is created, it can be accessed from - https://paystack.shop/your-slug type: string currency: - description: > - Currency for prices of products in your storefront. Allowed values are: - `NGN`, `GHS`, `KES`, `ZAR` or `USD` + description: Currency for prices of products in your storefront. type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR description: description: The description of the storefront type: string +example: + name: Obi and Sons + slug: 'obi_and_sons' + currency: NGN \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/StorefrontUpdate.yaml b/src/assets/openapi/components/schemas/StorefrontUpdate.yaml index ee96df1..e027ae5 100644 --- a/src/assets/openapi/components/schemas/StorefrontUpdate.yaml +++ b/src/assets/openapi/components/schemas/StorefrontUpdate.yaml @@ -13,3 +13,5 @@ properties: description: description: The description of the storefront type: string +example: + description: Import and Export \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/SubscriptionCreate.yaml b/src/assets/openapi/components/schemas/SubscriptionCreate.yaml index bf3acfb..8c499f1 100644 --- a/src/assets/openapi/components/schemas/SubscriptionCreate.yaml +++ b/src/assets/openapi/components/schemas/SubscriptionCreate.yaml @@ -23,3 +23,6 @@ properties: 2017-05-16T00:30:13+01:00 type: string format: date-time +example: + customer: "CUS_xnxdt6s1zg1f4nx" + plan: "PLN_gx2wn530m0i3w3m" diff --git a/src/assets/openapi/components/schemas/SubscriptionToggle.yaml b/src/assets/openapi/components/schemas/SubscriptionToggle.yaml index 07ddf7b..c09d662 100644 --- a/src/assets/openapi/components/schemas/SubscriptionToggle.yaml +++ b/src/assets/openapi/components/schemas/SubscriptionToggle.yaml @@ -9,3 +9,6 @@ properties: token: description: Email token type: string +example: + code: "SUB_vsyqdmlzble3uii" + token: "d7gofp6yppn3qz7" \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferBase.yaml b/src/assets/openapi/components/schemas/TransferBase.yaml index 57b650c..c894584 100644 --- a/src/assets/openapi/components/schemas/TransferBase.yaml +++ b/src/assets/openapi/components/schemas/TransferBase.yaml @@ -22,3 +22,7 @@ properties: reason: description: The reason or narration for the transfer. type: string +example: + amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferBulk.yaml b/src/assets/openapi/components/schemas/TransferBulk.yaml index 46aaac3..0e2ee50 100644 --- a/src/assets/openapi/components/schemas/TransferBulk.yaml +++ b/src/assets/openapi/components/schemas/TransferBulk.yaml @@ -4,8 +4,9 @@ required: - transfers properties: source: - description: Where should we transfer from? Only balance is allowed for now + description: The source of funds for the transfer. type: string + default: balance currency: description: Specify the currency of the transfer. type: string @@ -20,3 +21,9 @@ properties: type: array items: $ref: ./TransferBase.yaml +example: + source: balance + transfers: + - amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferFinalize.yaml b/src/assets/openapi/components/schemas/TransferFinalize.yaml index 1e1dbcf..0b93eae 100644 --- a/src/assets/openapi/components/schemas/TransferFinalize.yaml +++ b/src/assets/openapi/components/schemas/TransferFinalize.yaml @@ -9,3 +9,6 @@ properties: otp: description: OTP sent to business phone to verify transfer type: string +example: + transfer_code: TRF_vsyqdmlzble3uii + otp: "928783" \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferFinalizeDisableOTP.yaml b/src/assets/openapi/components/schemas/TransferFinalizeDisableOTP.yaml index 6bb0350..c0bb4ab 100644 --- a/src/assets/openapi/components/schemas/TransferFinalizeDisableOTP.yaml +++ b/src/assets/openapi/components/schemas/TransferFinalizeDisableOTP.yaml @@ -5,3 +5,5 @@ properties: otp: description: OTP sent to business phone to verify disabling OTP requirement type: string +example: + otp: "928783" \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferInitiate.yaml b/src/assets/openapi/components/schemas/TransferInitiate.yaml index c56fc49..f1c69a5 100644 --- a/src/assets/openapi/components/schemas/TransferInitiate.yaml +++ b/src/assets/openapi/components/schemas/TransferInitiate.yaml @@ -4,12 +4,9 @@ allOf: - type: object required: - source - - amount - - recipient - - reference properties: source: - description: The origin of the funds to send from + description: The source of funds to send from type: string default: balance currency: @@ -21,3 +18,5 @@ allOf: - ZAR - KES - GHS + example: + source: balance diff --git a/src/assets/openapi/components/schemas/TransferRecipientCreate.yaml b/src/assets/openapi/components/schemas/TransferRecipientCreate.yaml index 9477ba2..8241948 100644 --- a/src/assets/openapi/components/schemas/TransferRecipientCreate.yaml +++ b/src/assets/openapi/components/schemas/TransferRecipientCreate.yaml @@ -7,10 +7,15 @@ required: properties: type: description: Recipient Type - default: nuban type: string + enum: + - nuban + - ghipss + - mobile_money + - basa + - authorization name: - description: Recipient's name + description: The recipient's name according to their account registration. type: string account_number: description: Recipient's bank account number @@ -32,3 +37,8 @@ properties: metadata: description: JSON object of custom data type: object +example: + type: nuban + name: Smith Taplo + account_number: '01000000010' + bank_code: '058' \ No newline at end of file diff --git a/src/assets/openapi/components/schemas/TransferResendOTP.yaml b/src/assets/openapi/components/schemas/TransferResendOTP.yaml index c698904..de1e231 100644 --- a/src/assets/openapi/components/schemas/TransferResendOTP.yaml +++ b/src/assets/openapi/components/schemas/TransferResendOTP.yaml @@ -12,4 +12,8 @@ properties: default: transfer enum: - disable_otp + - resend_otp - transfer +example: + transfer_code: TRF_vsyqdmlzble3uii + reason: resend_otp diff --git a/src/assets/openapi/openapi.yaml b/src/assets/openapi/openapi.yaml index 58502b6..07b7583 100644 --- a/src/assets/openapi/openapi.yaml +++ b/src/assets/openapi/openapi.yaml @@ -84,6 +84,16 @@ tags: description: | A collection of endpoints for automating sending money to beneficiaries x-product-name: Transfers + - name: Balance + description: > + A collection of endpoints gaining insights into the amount on an + integration + x-product-name: Balance + - name: Payment Request + description: | + A collection of endpoints for managing invoices for the payment of goods + and services + x-product-name: Payment Requests - name: Product description: | A collection of endpoints for creating and managing inventories @@ -101,20 +111,10 @@ tags: A collection of endpoints for creating and managing links for the collection of payment for products x-product-name: Payment Pages - - name: Payment Request - description: | - A collection of endpoints for managing invoices for the payment of goods - and services - x-product-name: Payment Requests - name: Settlement description: | A collection of endpoints for gaining insights into payouts x-product-name: Settlements - - name: Balance - description: > - A collection of endpoints gaining insights into the amount on an - integration - x-product-name: Balance - name: Integration description: | A collection of endpoints for managing some settings on an integration @@ -298,6 +298,24 @@ paths: $ref: paths/transfer_disable_otp_finalize.yaml /transfer/enable_otp: $ref: paths/transfer_enable_otp.yaml + /balance: + $ref: paths/balance.yaml + /balance/ledger: + $ref: paths/balance_ledger.yaml + /paymentrequest: + $ref: paths/paymentrequest.yaml + /paymentrequest/{id}: + $ref: paths/paymentrequest_{id}.yaml + /paymentrequest/verify/{id}: + $ref: paths/paymentrequest_verify_{id}.yaml + /paymentrequest/notify/{id}: + $ref: paths/paymentrequest_notify_{id}.yaml + /paymentrequest/totals: + $ref: paths/paymentrequest_totals.yaml + /paymentrequest/finalize/{id}: + $ref: paths/paymentrequest_finalize_{id}.yaml + /paymentrequest/archive/{id}: + $ref: paths/paymentrequest_archive_{id}.yaml /product: $ref: paths/product.yaml /product/{id}: @@ -332,32 +350,16 @@ paths: $ref: paths/page_check_slug_availability_{slug}.yaml /page/{id}/product: $ref: paths/page_{id}_product.yaml - /paymentrequest: - $ref: paths/paymentrequest.yaml - /paymentrequest/{id}: - $ref: paths/paymentrequest_{id}.yaml - /paymentrequest/verify/{id}: - $ref: paths/paymentrequest_verify_{id}.yaml - /paymentrequest/notify/{id}: - $ref: paths/paymentrequest_notify_{id}.yaml - /paymentrequest/totals: - $ref: paths/paymentrequest_totals.yaml - /paymentrequest/finalize/{id}: - $ref: paths/paymentrequest_finalize_{id}.yaml - /paymentrequest/archive/{id}: - $ref: paths/paymentrequest_archive_{id}.yaml /settlement: $ref: paths/settlement.yaml - /settlement/{id}/transaction: - $ref: paths/settlement_{id}_transaction.yaml - /balance: - $ref: paths/balance.yaml - /balance/ledger: - $ref: paths/balance_ledger.yaml + /settlement/{id}/transactions: + $ref: paths/settlement_{id}_transactions.yaml /integration/payment_session_timeout: $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: diff --git a/src/assets/openapi/paths/address_verification_states.yaml b/src/assets/openapi/paths/address_verification_states.yaml index e386722..215ac28 100644 --- a/src/assets/openapi/paths/address_verification_states.yaml +++ b/src/assets/openapi/paths/address_verification_states.yaml @@ -10,7 +10,7 @@ get: description: The country code of the states to list. It is gotten after the charge request schema: type: string - example: CA + example: CA responses: '200': $ref: ../components/responses/MiscellaneousListStatesSuccess.yaml diff --git a/src/assets/openapi/paths/balance.yaml b/src/assets/openapi/paths/balance.yaml index ae9bc5f..b52a331 100644 --- a/src/assets/openapi/paths/balance.yaml +++ b/src/assets/openapi/paths/balance.yaml @@ -3,7 +3,7 @@ get: - Balance summary: Fetch Balance operationId: balance_fetch - description: You can only transfer from what you have + description: Fetch the available balance on your integration responses: '200': description: '' diff --git a/src/assets/openapi/paths/balance_ledger.yaml b/src/assets/openapi/paths/balance_ledger.yaml index 39b2ca1..093ab39 100644 --- a/src/assets/openapi/paths/balance_ledger.yaml +++ b/src/assets/openapi/paths/balance_ledger.yaml @@ -2,6 +2,7 @@ get: tags: - Balance summary: Balance Ledger + description: Fetch all pay-ins and pay-outs that occured on your integration operationId: balance_ledger parameters: - in: query diff --git a/src/assets/openapi/paths/bank.yaml b/src/assets/openapi/paths/bank.yaml index b268427..a83deec 100644 --- a/src/assets/openapi/paths/bank.yaml +++ b/src/assets/openapi/paths/bank.yaml @@ -2,12 +2,12 @@ get: tags: - Bank summary: List Banks + description: List banks supported on Paystack operationId: bank_list parameters: - in: query name: country - description: | - The country from which to obtain the list of supported banks. + description: The country from which to obtain the list of supported banks schema: type: string enum: @@ -15,30 +15,90 @@ get: - kenya - nigeria - south africa + example: nigeria - in: query - name: pay_with_bank_transfer + name: currency + description: The country from which to obtain the list of supported banks schema: - type: boolean + type: string + enum: + - GHS + - KES + - NGN + - ZAR + example: NGN - in: query name: use_cursor + description: A flag to indicate if cursor based pagination should be used schema: type: boolean - in: query name: perPage + description: The number of records to fetch per request + schema: + type: integer + - name: page + in: query + description: The offset to retrieve data from schema: type: integer - in: query name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the next set of data schema: type: string - in: query name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the previous set of data schema: type: string + - in: query + name: pay_with_bank_transfer + description: A flag to filter for available banks a customer can make a transfer to complete a payment + schema: + type: boolean + - in: query + name: pay_with_bank + description: A flag to filter for banks a customer can pay directly from + schema: + type: boolean + - in: query + name: enabled_for_verification + description: | + A flag to filter the banks that are supported for account verification in South Africa. + You need to combine this with either the `currency` or `country` filter. + schema: + type: boolean - in: query name: gateway + description: The type of gateway for a Nigerian bank + schema: + type: string + enum: + - emandate + - digitalbankmandate + - in: query + name: type + description: Type of financial channel schema: type: string + enum: + - ghipps + - mobile_money + - nuban + - kepss + - basa + - in: query + name: include_nip_sort_code + description: | + A flag that returns Nigerian banks with their NIP institution code. + The returned value can be used in identifying institutions on NIP. + schema: + type: boolean responses: '200': $ref: ../components/responses/MiscellaneousListBanksSuccess.yaml diff --git a/src/assets/openapi/paths/bank_resolve.yaml b/src/assets/openapi/paths/bank_resolve.yaml index 299449d..b5978f0 100644 --- a/src/assets/openapi/paths/bank_resolve.yaml +++ b/src/assets/openapi/paths/bank_resolve.yaml @@ -2,14 +2,17 @@ get: tags: - Bank summary: Resolve Account Number + description: Resolve an account number to confirm the name associated with it operationId: bank_resolveAccountNumber parameters: - name: account_number + description: The account number of interest in: query schema: type: integer example: 22728151 - name: bank_code + description: The bank code associated with the account number in: query schema: type: integer diff --git a/src/assets/openapi/paths/bank_validate.yaml b/src/assets/openapi/paths/bank_validate.yaml index bf85390..82fba05 100644 --- a/src/assets/openapi/paths/bank_validate.yaml +++ b/src/assets/openapi/paths/bank_validate.yaml @@ -2,6 +2,7 @@ post: tags: - Bank summary: Validate Bank Account + description: Confirm the authenticity of a customer's account number before sending money operationId: bank_validateAccountNumber requestBody: content: diff --git a/src/assets/openapi/paths/country.yaml b/src/assets/openapi/paths/country.yaml index c7073c8..91a55b2 100644 --- a/src/assets/openapi/paths/country.yaml +++ b/src/assets/openapi/paths/country.yaml @@ -2,6 +2,7 @@ get: tags: - Miscellaneous summary: List Countries + description: List all supported countries on Paystack operationId: miscellaneous_listCountries responses: '200': diff --git a/src/assets/openapi/paths/decision_bin_{bin}.yaml b/src/assets/openapi/paths/decision_bin_{bin}.yaml index 1d4b770..90c2688 100644 --- a/src/assets/openapi/paths/decision_bin_{bin}.yaml +++ b/src/assets/openapi/paths/decision_bin_{bin}.yaml @@ -2,13 +2,16 @@ get: tags: - Miscellaneous summary: Resolve Card BIN + description: Get the details of a card BIN operationId: miscellaneous_resolveCardBin parameters: - name: bin + description: The card bank identification number in: path required: true schema: - type: string + type: integer + example: 539983 responses: '200': $ref: ../components/responses/VerificationResolveCardBINSuccess.yaml diff --git a/src/assets/openapi/paths/dispute.yaml b/src/assets/openapi/paths/dispute.yaml index e9e88c0..8c22b76 100644 --- a/src/assets/openapi/paths/dispute.yaml +++ b/src/assets/openapi/paths/dispute.yaml @@ -2,6 +2,7 @@ get: tags: - Dispute summary: List Disputes + description: List transaction disputes filed by customers operationId: dispute_list parameters: - in: query @@ -16,11 +17,15 @@ get: type: integer - in: query name: status - description: >- - Dispute Status. Acceptable values are awaiting-merchant-feedback, - awaiting-bank-feedback, pending, resolved + description: Dispute status schema: type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback - in: query name: transaction description: Transaction ID diff --git a/src/assets/openapi/paths/dispute_export.yaml b/src/assets/openapi/paths/dispute_export.yaml index 12b9f24..57eab8e 100644 --- a/src/assets/openapi/paths/dispute_export.yaml +++ b/src/assets/openapi/paths/dispute_export.yaml @@ -2,6 +2,7 @@ get: tags: - Dispute summary: Export Disputes + description: Export the disputes available on your integration operationId: dispute_download parameters: - in: query @@ -18,6 +19,12 @@ get: name: status schema: type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback - in: query name: from schema: diff --git a/src/assets/openapi/paths/dispute_transaction_{id}.yaml b/src/assets/openapi/paths/dispute_transaction_{id}.yaml index 83785a4..19f3b52 100644 --- a/src/assets/openapi/paths/dispute_transaction_{id}.yaml +++ b/src/assets/openapi/paths/dispute_transaction_{id}.yaml @@ -2,14 +2,16 @@ get: tags: - Dispute summary: List Transaction Disputes + description: List all disputes filed for a transaction operationId: dispute_transaction parameters: - name: id - description: Transaction ID + description: The unique identifier of the transaction in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: ../components/responses/DisputeListTransactionSuccess.yaml diff --git a/src/assets/openapi/paths/dispute_{id}.yaml b/src/assets/openapi/paths/dispute_{id}.yaml index 489579e..bb41a91 100644 --- a/src/assets/openapi/paths/dispute_{id}.yaml +++ b/src/assets/openapi/paths/dispute_{id}.yaml @@ -1,14 +1,16 @@ parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 1801929 get: tags: - Dispute summary: Fetch Dispute + description: Fetch a transaction dispute operationId: dispute_fetch responses: '200': @@ -23,6 +25,7 @@ put: tags: - Dispute summary: Update Dispute + description: Update a transaction dispute operationId: dispute_update requestBody: content: diff --git a/src/assets/openapi/paths/dispute_{id}_evidence.yaml b/src/assets/openapi/paths/dispute_{id}_evidence.yaml index 82af031..6ef2aef 100644 --- a/src/assets/openapi/paths/dispute_{id}_evidence.yaml +++ b/src/assets/openapi/paths/dispute_{id}_evidence.yaml @@ -2,6 +2,7 @@ post: tags: - Dispute summary: Add Evidence + description: Provide evidence for a dispute operationId: dispute_evidence requestBody: content: @@ -13,11 +14,12 @@ post: $ref: ../components/schemas/DisputeEvidence.yaml parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: ../components/responses/DisputeAddEvidenceSuccess.yaml diff --git a/src/assets/openapi/paths/dispute_{id}_resolve.yaml b/src/assets/openapi/paths/dispute_{id}_resolve.yaml index a481156..f730c92 100644 --- a/src/assets/openapi/paths/dispute_{id}_resolve.yaml +++ b/src/assets/openapi/paths/dispute_{id}_resolve.yaml @@ -1,15 +1,17 @@ put: tags: - Dispute - summary: Resolve a Dispute + summary: Resolve Dispute + description: Resolve a transaction dispute operationId: dispute_resolve parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 requestBody: content: application/json: diff --git a/src/assets/openapi/paths/dispute_{id}_upload_url.yaml b/src/assets/openapi/paths/dispute_{id}_upload_url.yaml index 772299b..9a89a6a 100644 --- a/src/assets/openapi/paths/dispute_{id}_upload_url.yaml +++ b/src/assets/openapi/paths/dispute_{id}_upload_url.yaml @@ -1,15 +1,17 @@ get: tags: - Dispute - summary: Get Upload URL + summary: Fetch Upload URL + description: Get the URL to upload a dispute evidence operationId: dispute_uploadUrl parameters: - name: id - description: Dispute ID + description: The unique identifier of the dispute in: path required: true schema: - type: string + type: integer + example: 4734583785 responses: '200': $ref: ../components/responses/DisputeUploadURLSuccess.yaml diff --git a/src/assets/openapi/paths/integration_payment_session_timeout.yaml b/src/assets/openapi/paths/integration_payment_session_timeout.yaml index b9f1968..25f68a0 100644 --- a/src/assets/openapi/paths/integration_payment_session_timeout.yaml +++ b/src/assets/openapi/paths/integration_payment_session_timeout.yaml @@ -2,6 +2,7 @@ get: tags: - Integration summary: Fetch Payment Session Timeout + description: Fetch the session timeout of a transaction operationId: integration_fetchPaymentSessionTimeout responses: '200': @@ -21,6 +22,7 @@ put: tags: - Integration summary: Update Payment Session Timeout + description: Update the session timeout of a transaction operationId: integration_updatePaymentSessionTimeout requestBody: content: diff --git a/src/assets/openapi/paths/order.yaml b/src/assets/openapi/paths/order.yaml index 1eee9de..c5d2016 100644 --- a/src/assets/openapi/paths/order.yaml +++ b/src/assets/openapi/paths/order.yaml @@ -2,6 +2,7 @@ post: tags: - Order summary: Create Order + description: Create an order for selected items operationId: order_create requestBody: content: @@ -22,6 +23,7 @@ get: tags: - Order summary: List Orders + description: List the previously created orders operationId: order_list parameters: - in: query diff --git a/src/assets/openapi/paths/order_product_{id}.yaml b/src/assets/openapi/paths/order_product_{id}.yaml index 20bb37b..ca01bcb 100644 --- a/src/assets/openapi/paths/order_product_{id}.yaml +++ b/src/assets/openapi/paths/order_product_{id}.yaml @@ -1,14 +1,17 @@ parameters: - name: id + description: The unique identifier of the order in: path required: true schema: - type: string + type: integer + example: 1559046 get: tags: - Order - summary: Fetch Products Order - operationId: order_fetchProducts + summary: Fetch Product Orders + description: Fetch all orders for a particular product + operationId: order_product responses: '200': $ref: ../components/responses/OrderFetchProductSuccess.yaml diff --git a/src/assets/openapi/paths/order_{code}_validate.yaml b/src/assets/openapi/paths/order_{code}_validate.yaml index e85fad7..6d20023 100644 --- a/src/assets/openapi/paths/order_{code}_validate.yaml +++ b/src/assets/openapi/paths/order_{code}_validate.yaml @@ -1,14 +1,17 @@ parameters: - name: code + description: The unique code of a previously created order in: path required: true schema: type: string + example: ORD_6z0lqwpmxrm7dsp get: tags: - Order - summary: Validate pay for me order - operationId: order_validatePayForMe + summary: Validate Order + description: Validate a pay for me order + operationId: order_validate responses: '200': $ref: ../components/responses/OrderValidateSuccess.yaml diff --git a/src/assets/openapi/paths/order_{id}.yaml b/src/assets/openapi/paths/order_{id}.yaml index 5b6d1af..9add038 100644 --- a/src/assets/openapi/paths/order_{id}.yaml +++ b/src/assets/openapi/paths/order_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the order in: path required: true schema: - type: string + type: integer + example: 1559046 get: tags: - Order summary: Fetch Order + description: Fetch the details of a previously created order operationId: order_fetch responses: '200': diff --git a/src/assets/openapi/paths/page.yaml b/src/assets/openapi/paths/page.yaml index 1f14069..6f470c1 100644 --- a/src/assets/openapi/paths/page.yaml +++ b/src/assets/openapi/paths/page.yaml @@ -2,6 +2,7 @@ post: tags: - Page summary: Create Page + description: Create a webpage to receive payments operationId: page_create requestBody: content: @@ -22,13 +23,16 @@ get: tags: - Page summary: List Pages + description: List all previously created payment pages operationId: page_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: diff --git a/src/assets/openapi/paths/page_check_slug_availability_{slug}.yaml b/src/assets/openapi/paths/page_check_slug_availability_{slug}.yaml index 69c67cd..8491194 100644 --- a/src/assets/openapi/paths/page_check_slug_availability_{slug}.yaml +++ b/src/assets/openapi/paths/page_check_slug_availability_{slug}.yaml @@ -1,13 +1,16 @@ parameters: - name: slug in: path + description: The custom slug to check required: true schema: type: string + example: risky-burger get: tags: - Page summary: Check Slug Availability + description: Check if a custom slug is available for use when creating a payment page operationId: page_checkSlugAvailability responses: '200': diff --git a/src/assets/openapi/paths/page_{id}.yaml b/src/assets/openapi/paths/page_{id}.yaml index 55fde57..9246f75 100644 --- a/src/assets/openapi/paths/page_{id}.yaml +++ b/src/assets/openapi/paths/page_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id in: path + description: The unique identifier of a payment page required: true schema: - type: string + type: integer + example: 1891222 get: tags: - Page summary: Fetch Page + description: Get a previously created payment page operationId: page_fetch responses: '200': @@ -22,6 +25,7 @@ put: tags: - Page summary: Update Page + description: Update a previously created payment page operationId: page_update requestBody: content: diff --git a/src/assets/openapi/paths/page_{id}_product.yaml b/src/assets/openapi/paths/page_{id}_product.yaml index ad3bee8..3128db3 100644 --- a/src/assets/openapi/paths/page_{id}_product.yaml +++ b/src/assets/openapi/paths/page_{id}_product.yaml @@ -8,6 +8,9 @@ post: tags: - Page summary: Add Products + description: | + Add products to a previously created payment page. You can only add products to pages + that was created with a `product` type. operationId: page_addProducts requestBody: content: diff --git a/src/assets/openapi/paths/paymentrequest.yaml b/src/assets/openapi/paths/paymentrequest.yaml index db7eb72..3d41dd9 100644 --- a/src/assets/openapi/paths/paymentrequest.yaml +++ b/src/assets/openapi/paths/paymentrequest.yaml @@ -2,6 +2,7 @@ post: tags: - Payment Request summary: Create Payment Request + description: Create a new payment request by issuing an invoice to a customer operationId: paymentRequest_create requestBody: content: @@ -22,6 +23,7 @@ get: tags: - Payment Request summary: List Payment Request + description: List all previously created payment requests to your customers operationId: paymentRequest_list parameters: - in: query @@ -43,6 +45,12 @@ get: name: status schema: type: string + enum: + - draft + - pending + - success + - failed + example: success description: Invoice status to filter - in: query name: currency diff --git a/src/assets/openapi/paths/paymentrequest_archive_{id}.yaml b/src/assets/openapi/paths/paymentrequest_archive_{id}.yaml index 91bb41a..8222a81 100644 --- a/src/assets/openapi/paths/paymentrequest_archive_{id}.yaml +++ b/src/assets/openapi/paths/paymentrequest_archive_{id}.yaml @@ -1,13 +1,18 @@ parameters: - name: id + description: The unique identifier of a previously created payment request in: path required: true schema: - type: string + type: integer + example: 18823736 post: tags: - Payment Request summary: Archive Payment Request + description: | + Archive a payment request to clean up your records. An archived payment request cannot be verified and will not + be returned when listing all previously created payment requests. operationId: paymentRequest_archive responses: '200': diff --git a/src/assets/openapi/paths/paymentrequest_finalize_{id}.yaml b/src/assets/openapi/paths/paymentrequest_finalize_{id}.yaml index ba68ce7..d6b5399 100644 --- a/src/assets/openapi/paths/paymentrequest_finalize_{id}.yaml +++ b/src/assets/openapi/paths/paymentrequest_finalize_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of a draft payment request in: path required: true schema: - type: string + type: integer + example: 18823736 post: tags: - Payment Request summary: Finalize Payment Request + description: Finalise the creation of a draft payment request for a customer operationId: paymentRequest_finalize responses: '200': diff --git a/src/assets/openapi/paths/paymentrequest_notify_{id}.yaml b/src/assets/openapi/paths/paymentrequest_notify_{id}.yaml index e150d37..0fe3884 100644 --- a/src/assets/openapi/paths/paymentrequest_notify_{id}.yaml +++ b/src/assets/openapi/paths/paymentrequest_notify_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of a previously created payment request in: path required: true schema: - type: string + type: integer + example: 18823736 post: tags: - Payment Request summary: Send Notification + description: Trigger an email reminder to a customer for a previously created payment request operationId: paymentRequest_notify responses: '200': diff --git a/src/assets/openapi/paths/paymentrequest_totals.yaml b/src/assets/openapi/paths/paymentrequest_totals.yaml index 1738884..075e0d2 100644 --- a/src/assets/openapi/paths/paymentrequest_totals.yaml +++ b/src/assets/openapi/paths/paymentrequest_totals.yaml @@ -2,6 +2,7 @@ get: tags: - Payment Request summary: Payment Request Total + description: Get the metric of all pending and successful payment requests operationId: paymentRequest_totals responses: '200': diff --git a/src/assets/openapi/paths/paymentrequest_verify_{id}.yaml b/src/assets/openapi/paths/paymentrequest_verify_{id}.yaml index 712b93f..0c5d153 100644 --- a/src/assets/openapi/paths/paymentrequest_verify_{id}.yaml +++ b/src/assets/openapi/paths/paymentrequest_verify_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of a previously created payment request in: path required: true schema: - type: string + type: integer + example: 18823736 get: tags: - Payment Request summary: Verify Payment Request + description: Verify the status of a previously created payment request operationId: paymentRequest_verify responses: '200': diff --git a/src/assets/openapi/paths/paymentrequest_{id}.yaml b/src/assets/openapi/paths/paymentrequest_{id}.yaml index acc81a1..c0d7cea 100644 --- a/src/assets/openapi/paths/paymentrequest_{id}.yaml +++ b/src/assets/openapi/paths/paymentrequest_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of a previously created payment request in: path required: true schema: - type: string + type: integer + example: 18823736 get: tags: - Payment Request summary: Fetch Payment Request + description: Fetch a previously created payment request operationId: paymentRequest_fetch responses: '200': @@ -22,6 +25,7 @@ put: tags: - Payment Request summary: Update Payment Request + description: Update a previously created payment request operationId: paymentRequest_update requestBody: content: diff --git a/src/assets/openapi/paths/plan_{code}.yaml b/src/assets/openapi/paths/plan_{code}.yaml index 02de7bc..9811def 100644 --- a/src/assets/openapi/paths/plan_{code}.yaml +++ b/src/assets/openapi/paths/plan_{code}.yaml @@ -25,6 +25,7 @@ put: tags: - Plan summary: Update Plan + description: Update a plan details on your integration operationId: plan_update requestBody: content: diff --git a/src/assets/openapi/paths/product.yaml b/src/assets/openapi/paths/product.yaml index 078a379..5f08497 100644 --- a/src/assets/openapi/paths/product.yaml +++ b/src/assets/openapi/paths/product.yaml @@ -2,6 +2,7 @@ post: tags: - Product summary: Create Product + description: Create a new product on your integration operationId: product_create requestBody: content: @@ -22,20 +23,25 @@ get: tags: - Product summary: List Products + description: List all previously created products operationId: product_list parameters: - name: perPage + description: Number of records to fetch per page in: query schema: type: integer - name: page + description: The section to retrieve in: query schema: type: integer - name: active + description: The state of the product in: query schema: type: boolean + example: true - in: query name: from schema: diff --git a/src/assets/openapi/paths/product_{id}.yaml b/src/assets/openapi/paths/product_{id}.yaml index ee16451..00ca04e 100644 --- a/src/assets/openapi/paths/product_{id}.yaml +++ b/src/assets/openapi/paths/product_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the product in: path required: true schema: - type: string + type: integer + example: 2196244 get: tags: - Product summary: Fetch Product + description: Fetch a previously created product operationId: product_fetch responses: '200': @@ -22,6 +25,7 @@ put: tags: - Product summary: Update product + description: Update a previously created product operationId: product_update requestBody: content: @@ -44,6 +48,7 @@ delete: tags: - Product summary: Delete Product + description: Delete a previously created product operationId: product_delete responses: '200': diff --git a/src/assets/openapi/paths/refund.yaml b/src/assets/openapi/paths/refund.yaml index 8ffcb6a..95f25bc 100644 --- a/src/assets/openapi/paths/refund.yaml +++ b/src/assets/openapi/paths/refund.yaml @@ -2,6 +2,7 @@ post: tags: - Refund summary: Create Refund + description: Initiate a refund for a previously completed transaction operationId: refund_create requestBody: content: @@ -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: diff --git a/src/assets/openapi/paths/refund_retry_with_customer_details_{id}.yaml b/src/assets/openapi/paths/refund_retry_with_customer_details_{id}.yaml new file mode 100644 index 0000000..b4437cf --- /dev/null +++ b/src/assets/openapi/paths/refund_retry_with_customer_details_{id}.yaml @@ -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/RefundRetrySuccess.yaml + '422': + $ref: ../components/responses/Unauthorized.yaml + default: + description: Server error diff --git a/src/assets/openapi/paths/refund_{id}.yaml b/src/assets/openapi/paths/refund_{id}.yaml index 94f128a..9d44c0f 100644 --- a/src/assets/openapi/paths/refund_{id}.yaml +++ b/src/assets/openapi/paths/refund_{id}.yaml @@ -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 diff --git a/src/assets/openapi/paths/settlement.yaml b/src/assets/openapi/paths/settlement.yaml index d7e0445..89f945d 100644 --- a/src/assets/openapi/paths/settlement.yaml +++ b/src/assets/openapi/paths/settlement.yaml @@ -1,15 +1,18 @@ get: tags: - Settlement - summary: Fetch Settlements + summary: List Settlements + description: List settlements made to your settlement accounts operationId: settlements_fetch parameters: - name: perPage + description: The number of records to fetch per request in: query schema: type: integer example: 50 - name: page + description: The offset to retrieve data from in: query schema: type: integer diff --git a/src/assets/openapi/paths/settlement_{id}_transaction.yaml b/src/assets/openapi/paths/settlement_{id}_transactions.yaml similarity index 61% rename from src/assets/openapi/paths/settlement_{id}_transaction.yaml rename to src/assets/openapi/paths/settlement_{id}_transactions.yaml index bfada86..dfdce7f 100644 --- a/src/assets/openapi/paths/settlement_{id}_transaction.yaml +++ b/src/assets/openapi/paths/settlement_{id}_transactions.yaml @@ -1,14 +1,17 @@ get: tags: - Settlement - summary: Settlement Transactions + summary: Fetch Settlement Transactions + description: Get the transactions that make up a particular settlement operationId: settlements_transaction parameters: - name: id + description: The settlement ID in which you want to fetch its transactions in: path required: true schema: - type: string + type: integer + example: 8610870 responses: '200': $ref: ../components/responses/Ok.yaml diff --git a/src/assets/openapi/paths/storefront.yaml b/src/assets/openapi/paths/storefront.yaml index 555b779..98b758b 100644 --- a/src/assets/openapi/paths/storefront.yaml +++ b/src/assets/openapi/paths/storefront.yaml @@ -2,6 +2,7 @@ post: tags: - Storefront summary: Create Storefront + description: Create a digital shop to manage and display your products operationId: storefront_create requestBody: content: @@ -22,16 +23,21 @@ get: tags: - Storefront summary: List Storefronts + description: List the storefronts you previously created operationId: storefront_list parameters: - - name: perPage - in: query + - in: query + name: perPage + description: Number of records to fetch per request schema: type: integer - - name: page - in: query + default: 50 + - in: query + name: page + description: The offset to retrieve data from schema: type: integer + default: 1 - name: status in: query schema: @@ -39,6 +45,7 @@ get: enum: - active - inactive + example: active responses: '200': $ref: ../components/responses/StorefrontListSuccess.yaml diff --git a/src/assets/openapi/paths/storefront_verify_{slug}.yaml b/src/assets/openapi/paths/storefront_verify_{slug}.yaml index 7c06b6b..732d805 100644 --- a/src/assets/openapi/paths/storefront_verify_{slug}.yaml +++ b/src/assets/openapi/paths/storefront_verify_{slug}.yaml @@ -1,13 +1,16 @@ parameters: - name: slug + description: The custom slug to check in: path required: true schema: type: string + example: struct_and_faces get: tags: - Storefront summary: Verify Storefront Slug + description: Verify the availability of a slug before using it for your Storefront operationId: storefront_verifySlug responses: '200': diff --git a/src/assets/openapi/paths/storefront_{id}.yaml b/src/assets/openapi/paths/storefront_{id}.yaml index 36bcaa2..2b98749 100644 --- a/src/assets/openapi/paths/storefront_{id}.yaml +++ b/src/assets/openapi/paths/storefront_{id}.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 get: tags: - Storefront summary: Fetch Storefront + description: Get the details of a previously created Storefront operationId: storefront_fetch responses: '200': @@ -22,6 +25,7 @@ put: tags: - Storefront summary: Update Storefront + description: Update the details of a previously created Storefront operationId: storefront_update requestBody: content: @@ -44,6 +48,7 @@ delete: tags: - Storefront summary: Delete Storefront + description: Delete a previously created Storefront operationId: storefront_delete responses: '200': diff --git a/src/assets/openapi/paths/storefront_{id}_duplicate.yaml b/src/assets/openapi/paths/storefront_{id}_duplicate.yaml index 9bc6f65..d2f51f7 100644 --- a/src/assets/openapi/paths/storefront_{id}_duplicate.yaml +++ b/src/assets/openapi/paths/storefront_{id}_duplicate.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Duplicate Storefront + description: Duplicate a previously created Storefront operationId: storefront_duplicate responses: '200': diff --git a/src/assets/openapi/paths/storefront_{id}_order.yaml b/src/assets/openapi/paths/storefront_{id}_order.yaml index 31e1eaa..12a660b 100644 --- a/src/assets/openapi/paths/storefront_{id}_order.yaml +++ b/src/assets/openapi/paths/storefront_{id}_order.yaml @@ -6,11 +6,12 @@ get: operationId: storefront_fetchOrders parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string - example: Z0R4orOU + type: integer + example: 1559046 responses: '200': $ref: ../components/responses/Ok.yaml diff --git a/src/assets/openapi/paths/storefront_{id}_product.yaml b/src/assets/openapi/paths/storefront_{id}_product.yaml index b75d7ac..9aa9d35 100644 --- a/src/assets/openapi/paths/storefront_{id}_product.yaml +++ b/src/assets/openapi/paths/storefront_{id}_product.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Add Products to Storefront + description: Add previously created products to a Storefront operationId: storefront_addProducts requestBody: content: @@ -29,7 +32,8 @@ post: get: tags: - Storefront - summary: List Products in Storefront + summary: List Storefront Products + description: List the products in a Storefront operationId: storefront_listProducts responses: '200': diff --git a/src/assets/openapi/paths/storefront_{id}_publish.yaml b/src/assets/openapi/paths/storefront_{id}_publish.yaml index 3f6bc70..eab4e24 100644 --- a/src/assets/openapi/paths/storefront_{id}_publish.yaml +++ b/src/assets/openapi/paths/storefront_{id}_publish.yaml @@ -1,13 +1,16 @@ parameters: - name: id + description: The unique identifier of the Storefront in: path required: true schema: - type: string + type: integer + example: 1559046 post: tags: - Storefront summary: Publish Storefront + description: Make your Storefront publicly available operationId: storefront_publish responses: '200': diff --git a/src/assets/openapi/paths/subscription.yaml b/src/assets/openapi/paths/subscription.yaml index 2b132f0..d0ceddd 100644 --- a/src/assets/openapi/paths/subscription.yaml +++ b/src/assets/openapi/paths/subscription.yaml @@ -2,6 +2,7 @@ post: tags: - Subscription summary: Create Subscription + description: Create a subscription a customer operationId: subscription_create requestBody: content: @@ -22,6 +23,7 @@ get: tags: - Subscription summary: List Subscriptions + description: List all subscriptions available on your integration operationId: subscription_list parameters: - in: query @@ -36,9 +38,10 @@ get: description: The section to retrieve - in: query name: plan - schema: - type: string description: Plan ID + schema: + type: integer + example: 2697466 - in: query name: customer schema: diff --git a/src/assets/openapi/paths/subscription_disable.yaml b/src/assets/openapi/paths/subscription_disable.yaml index 46fcd9b..016de64 100644 --- a/src/assets/openapi/paths/subscription_disable.yaml +++ b/src/assets/openapi/paths/subscription_disable.yaml @@ -2,6 +2,7 @@ post: tags: - Subscription summary: Disable Subscription + description: Disable a subscription on your integration operationId: subscription_disable requestBody: content: diff --git a/src/assets/openapi/paths/subscription_enable.yaml b/src/assets/openapi/paths/subscription_enable.yaml index 2ed04c1..3c8afa3 100644 --- a/src/assets/openapi/paths/subscription_enable.yaml +++ b/src/assets/openapi/paths/subscription_enable.yaml @@ -2,6 +2,7 @@ post: tags: - Subscription summary: Enable Subscription + description: Enable a subscription on your integration operationId: subscription_enable requestBody: content: diff --git a/src/assets/openapi/paths/subscription_{code}.yaml b/src/assets/openapi/paths/subscription_{code}.yaml index bc1a183..51f42b7 100644 --- a/src/assets/openapi/paths/subscription_{code}.yaml +++ b/src/assets/openapi/paths/subscription_{code}.yaml @@ -2,12 +2,15 @@ parameters: - name: code in: path required: true + description: The subscription code for the subscription you want to fetch schema: type: string + example: "SUB_5co81xgmwg78x3d" get: tags: - Subscription summary: Fetch Subscription + description: Get details of a customer's subscription operationId: subscription_fetch responses: '200': diff --git a/src/assets/openapi/paths/subscription_{code}_manage_email.yaml b/src/assets/openapi/paths/subscription_{code}_manage_email.yaml index 1e336fb..fa888cb 100644 --- a/src/assets/openapi/paths/subscription_{code}_manage_email.yaml +++ b/src/assets/openapi/paths/subscription_{code}_manage_email.yaml @@ -2,13 +2,16 @@ post: tags: - Subscription summary: Send Update Subscription Link + description: Email a customer a link for updating the card on their subscription operationId: subscription_manageEmail parameters: - name: code in: path required: true + description: Subscription code schema: type: string + example: "qlgwhpyq1ts9nsw" responses: '200': $ref: ../components/responses/Ok.yaml diff --git a/src/assets/openapi/paths/subscription_{code}_manage_link.yaml b/src/assets/openapi/paths/subscription_{code}_manage_link.yaml index 4673c06..b367f76 100644 --- a/src/assets/openapi/paths/subscription_{code}_manage_link.yaml +++ b/src/assets/openapi/paths/subscription_{code}_manage_link.yaml @@ -2,13 +2,16 @@ get: tags: - Subscription summary: Generate Update Subscription Link + description: Generate a link for updating the card on a subscription operationId: subscription_manageLink parameters: - name: code in: path required: true + description: Subscription code schema: type: string + example: "qlgwhpyq1ts9nsw" responses: '200': $ref: ../components/responses/Ok.yaml diff --git a/src/assets/openapi/paths/transfer.yaml b/src/assets/openapi/paths/transfer.yaml index 7614eed..ee418be 100644 --- a/src/assets/openapi/paths/transfer.yaml +++ b/src/assets/openapi/paths/transfer.yaml @@ -2,6 +2,7 @@ post: tags: - Transfer summary: Initiate Transfer + description: Send money to your customers operationId: transfer_initiate requestBody: content: @@ -13,7 +14,7 @@ post: $ref: ../components/schemas/TransferInitiate.yaml responses: '200': - description: '' + description: 'Successful operation' content: application/json: schema: @@ -26,6 +27,7 @@ get: tags: - Transfer summary: List Transfers + description: List the transfers made on your integration operationId: transfer_list parameters: - in: query @@ -33,6 +35,7 @@ get: description: A flag to indicate if cursor based pagination should be used schema: type: boolean + example: true - in: query name: next description: > diff --git a/src/assets/openapi/paths/transfer_bulk.yaml b/src/assets/openapi/paths/transfer_bulk.yaml index 284d8ae..a386ac9 100644 --- a/src/assets/openapi/paths/transfer_bulk.yaml +++ b/src/assets/openapi/paths/transfer_bulk.yaml @@ -2,6 +2,10 @@ post: tags: - Transfer summary: Initiate Bulk Transfer + description: | + Batch multiple transfers in a single request. + + You need to disable the Transfers OTP requirement to use this endpoint. operationId: transfer_bulk requestBody: content: diff --git a/src/assets/openapi/paths/transfer_disable_otp.yaml b/src/assets/openapi/paths/transfer_disable_otp.yaml index 36f3d07..0e71db3 100644 --- a/src/assets/openapi/paths/transfer_disable_otp.yaml +++ b/src/assets/openapi/paths/transfer_disable_otp.yaml @@ -2,10 +2,13 @@ post: tags: - Transfer summary: Disable OTP for Transfers + description: | + This is used in the event that you want to be able to complete transfers programmatically without use of OTPs. + No arguments required. You will get an OTP to complete the request. operationId: transfer_disableOtp responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: diff --git a/src/assets/openapi/paths/transfer_disable_otp_finalize.yaml b/src/assets/openapi/paths/transfer_disable_otp_finalize.yaml index d8c1a2b..b93a97a 100644 --- a/src/assets/openapi/paths/transfer_disable_otp_finalize.yaml +++ b/src/assets/openapi/paths/transfer_disable_otp_finalize.yaml @@ -2,6 +2,7 @@ post: tags: - Transfer summary: Finalize Disabling OTP for Transfers + description: Finalize the request to disable OTP on your transfers operationId: transfer_disableOtpFinalize requestBody: content: @@ -13,7 +14,7 @@ post: $ref: ../components/schemas/TransferFinalizeDisableOTP.yaml responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: diff --git a/src/assets/openapi/paths/transfer_enable_otp.yaml b/src/assets/openapi/paths/transfer_enable_otp.yaml index b4d8d13..4294e9d 100644 --- a/src/assets/openapi/paths/transfer_enable_otp.yaml +++ b/src/assets/openapi/paths/transfer_enable_otp.yaml @@ -2,10 +2,13 @@ post: tags: - Transfer summary: Enable OTP requirement for Transfers + description: | + In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. + No arguments required. operationId: transfer_enableOtp responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: diff --git a/src/assets/openapi/paths/transfer_export.yaml b/src/assets/openapi/paths/transfer_export.yaml index 50cc7b0..d2e9819 100644 --- a/src/assets/openapi/paths/transfer_export.yaml +++ b/src/assets/openapi/paths/transfer_export.yaml @@ -2,6 +2,7 @@ get: tags: - Transfer summary: Export Transfers + description: Export a list of transfers carried out on your integration operationId: transfer_exportTransfer parameters: - in: query @@ -25,6 +26,7 @@ get: - blocked - rejected - received + example: success - in: query name: from schema: diff --git a/src/assets/openapi/paths/transfer_finalize_transfer.yaml b/src/assets/openapi/paths/transfer_finalize_transfer.yaml index 7108822..5ab439f 100644 --- a/src/assets/openapi/paths/transfer_finalize_transfer.yaml +++ b/src/assets/openapi/paths/transfer_finalize_transfer.yaml @@ -2,6 +2,7 @@ post: tags: - Transfer summary: Finalize Transfer + description: Finalize an initiated transfer operationId: transfer_finalize requestBody: content: diff --git a/src/assets/openapi/paths/transfer_resend_otp.yaml b/src/assets/openapi/paths/transfer_resend_otp.yaml index fb85d2d..54667df 100644 --- a/src/assets/openapi/paths/transfer_resend_otp.yaml +++ b/src/assets/openapi/paths/transfer_resend_otp.yaml @@ -2,6 +2,7 @@ post: tags: - Transfer summary: Resend OTP for Transfer + description: Generates and send a new OTP to customer in the event they are having trouble receiving one. operationId: transfer_resendOtp requestBody: content: diff --git a/src/assets/openapi/paths/transfer_verify_{reference}.yaml b/src/assets/openapi/paths/transfer_verify_{reference}.yaml index 24c5c2e..aee0077 100644 --- a/src/assets/openapi/paths/transfer_verify_{reference}.yaml +++ b/src/assets/openapi/paths/transfer_verify_{reference}.yaml @@ -2,13 +2,16 @@ get: tags: - Transfer summary: Verify Transfer + description: Verify the status of a transfer on your integration operationId: transfer_verify parameters: - name: reference + description: Transfer reference in: path required: true schema: type: string + example: acv_9ee55786-2323-4760-98e2-6380c9cb3f67 responses: '200': description: '' diff --git a/src/assets/openapi/paths/transfer_{code}.yaml b/src/assets/openapi/paths/transfer_{code}.yaml index 60048e4..958bcbb 100644 --- a/src/assets/openapi/paths/transfer_{code}.yaml +++ b/src/assets/openapi/paths/transfer_{code}.yaml @@ -5,14 +5,16 @@ parameters: required: true schema: type: string + example: TRF_1ptvuv321ahaa7q get: tags: - Transfer summary: Fetch Transfer + description: Get details of a transfer on your integration operationId: transfer_fetch responses: '200': - description: '' + description: 'Succesful operation' content: application/json: schema: diff --git a/src/assets/openapi/paths/transferrecipient.yaml b/src/assets/openapi/paths/transferrecipient.yaml index 144f4db..979ae98 100644 --- a/src/assets/openapi/paths/transferrecipient.yaml +++ b/src/assets/openapi/paths/transferrecipient.yaml @@ -2,6 +2,7 @@ post: tags: - Transfer Recipient summary: Create Transfer Recipient + description: Creates a new recipient. A duplicate account number will lead to the retrieval of the existing record. operationId: transferrecipient_create requestBody: content: @@ -26,6 +27,7 @@ get: tags: - Transfer Recipient summary: List Transfer Recipients + description: List transfer recipients available on your integration operationId: transferrecipient_list parameters: - in: query diff --git a/src/assets/openapi/paths/transferrecipient_bulk.yaml b/src/assets/openapi/paths/transferrecipient_bulk.yaml index f0679b0..ebc4bf8 100644 --- a/src/assets/openapi/paths/transferrecipient_bulk.yaml +++ b/src/assets/openapi/paths/transferrecipient_bulk.yaml @@ -2,6 +2,8 @@ post: tags: - Transfer Recipient summary: Bulk Create Transfer Recipient + description: | + Create multiple transfer recipients in batches. A duplicate account number will lead to the retrieval of the existing record. operationId: transferrecipient_bulk requestBody: content: @@ -13,7 +15,7 @@ post: $ref: ../components/schemas/TransferRecipientBulk.yaml responses: '200': - description: '' + description: 'Sucessful response' content: application/json: schema: diff --git a/src/assets/openapi/paths/transferrecipient_{code}.yaml b/src/assets/openapi/paths/transferrecipient_{code}.yaml index 09c445d..b900011 100644 --- a/src/assets/openapi/paths/transferrecipient_{code}.yaml +++ b/src/assets/openapi/paths/transferrecipient_{code}.yaml @@ -5,14 +5,16 @@ parameters: required: true schema: type: string + example: RCP_5ap8rcimmcj8lbi get: tags: - Transfer Recipient summary: Fetch Transfer recipient + description: Fetch the details of a transfer recipient operationId: transferrecipient_fetch responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: @@ -26,7 +28,8 @@ get: put: tags: - Transfer Recipient - summary: Update Transfer recipient + summary: Update Transfer Recipient + description: Update the details of a transfer recipient operationId: transferrecipient_update requestBody: content: @@ -38,7 +41,7 @@ put: $ref: ../components/schemas/TransferRecipientUpdate.yaml responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: @@ -53,10 +56,11 @@ delete: tags: - Transfer Recipient summary: Delete Transfer Recipient + description: Delete a transfer recipient (sets the transfer recipient to inactive) operationId: transferrecipient_delete responses: '200': - description: '' + description: 'Successful response' content: application/json: schema: diff --git a/src/index.js b/src/index.js index 33e79cd..e4b6544 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,7 @@ import path from 'path' import open from 'open'; const app = express() -const port = 3031 +const port = 7070 const __dirname = new URL('.', import.meta.url).pathname; const file = fs.readFileSync(path.join(__dirname, '../dist/paystack.yaml'), 'utf8')