diff --git a/dist/paystack.yaml b/dist/paystack.yaml index 6b57e6b..469c558 100644 --- a/dist/paystack.yaml +++ b/dist/paystack.yaml @@ -77,6 +77,11 @@ tags: 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 @@ -94,11 +99,6 @@ 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 @@ -3345,6 +3345,242 @@ paths: $ref: '#/components/responses/NotFound' default: description: Server error + /paymentrequest: + 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: + 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 + description: List all previously created payment requests to your customers + 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 + 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: + 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 + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: + tags: + - Payment Request + summary: Fetch Payment Request + description: Fetch a previously created 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 + description: Update a previously created 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 + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + 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': + $ref: '#/components/responses/PaymentRequestVerifySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /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: + - 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/PaymentRequestSendNotificationSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/totals: + get: + tags: + - 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/PaymentRequestTotalSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/finalize/{id}: + parameters: + - name: id + description: The unique identifier of a draft payment request + in: path + required: true + schema: + 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': + $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: @@ -3978,235 +4214,26 @@ paths: $ref: '#/components/responses/Unauthorized' default: description: Server error - /paymentrequest: - post: + /settlement: + get: 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' + - Settlement + summary: Fetch Settlements + operationId: settlements_fetch + parameters: + - name: perPage + in: query + schema: + type: integer + example: 50 + - name: page + in: query + schema: + type: integer + example: 2 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: - get: - tags: - - Settlement - summary: Fetch Settlements - operationId: settlements_fetch - parameters: - - name: perPage - in: query - schema: - type: integer - example: 50 - - name: page - in: query - schema: - type: integer - example: 2 - responses: - '200': - $ref: '#/components/responses/Ok' + $ref: '#/components/responses/Ok' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -12741,121 +12768,142 @@ components: - message - data - meta - ProductListsResponseArray: + PaymentRequestLineItemsArray: type: object properties: - id: - type: integer name: type: string - description: - type: string - product_code: - type: string - slug: - type: string - currency: - type: string - price: + amount: type: integer quantity: type: integer - quantity_sold: + required: + - name + - amount + - quantity + PaymentRequestTaxArray: + type: object + properties: + name: + type: string + amount: + type: integer + required: + - name + - amount + PaymentRequestListResponseArray: + type: object + properties: + id: + type: integer + integration: type: integer - active: - type: boolean domain: type: string - type: + amount: + type: integer + currency: + type: string + due_date: 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: + has_invoice: + type: boolean + invoice_number: type: integer - maximum_orderable: nullable: true - createdAt: + description: type: string - updatedAt: + nullable: true + pdf_url: type: string - digital_assets: + nullable: true + line_items: type: array - items: {} - variant_options: + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: type: array - items: {} - is_shippable: + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: type: boolean - shipping_fields: + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: type: object properties: - delivery_note: + id: + type: integer + first_name: type: string - shipping_address: + 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 - shipping_fees: - type: array - items: {} required: - - delivery_note - - shipping_address - - shipping_fees - integration: - type: integer - low_stock_alert: - type: integer + - 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 required: - id - - name - - description - - product_code - - slug - - currency - - price - - quantity - - quantity_sold - - active + - integration - domain - - type - - in_stock - - unlimited + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at - metadata - - files - - success_message - - redirect_url + - notifications + - offline_reference + - customer + - created_at + - discount - split_code - - notification_emails - - minimum_orderable - - maximum_orderable - - createdAt - - updatedAt - - digital_assets - - variant_options - - is_shippable - - shipping_fields - - integration - - low_stock_alert - ProductListsResponse: + PaymentRequestListResponse: type: object properties: status: @@ -12865,7 +12913,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ProductListsResponseArray' + $ref: '#/components/schemas/PaymentRequestListResponseArray' meta: type: object properties: @@ -12874,7 +12922,9 @@ components: skipped: type: integer perPage: - type: string + anyOf: + - type: integer + - type: string page: type: integer pageCount: @@ -12891,49 +12941,59 @@ components: - message - data - meta - ProductCreate: + PaymentRequestCreate: type: object required: - - name - - description - - price - - currency + - 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 - type: string - metadata: - description: Stringified JSON object of custom data + description: The split code of the transaction split. type: string example: - name: Cups - description: Environment friendly paper cups - price: 10000 - currency: NGN - ProductCreateResponse: + customer: CUS_xqp6o5oja5cackf + amount: 10000 + PaymentRequestCreateResponse: type: object properties: status: @@ -12943,117 +13003,143 @@ components: data: type: object properties: - variants_options: + 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: {} - variants: + tax: type: array items: {} - name: - type: string - description: + request_code: type: string - currency: + status: type: string - price: - type: integer - quantity: - type: integer - type: - type: string - is_shippable: - type: boolean - unlimited: + paid: 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: - 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: + notifications: + type: array + items: {} + offline_reference: type: string - nullable: true - low_stock_alert: - type: boolean - id: + customer: type: integer - createdAt: + created_at: type: string - updatedAt: + discount: + nullable: true + split_code: type: string + nullable: true required: - - variants_options - - variants - - name - - description - - currency - - price - - quantity - - type - - is_shippable - - unlimited - - files - - shipping_fields + - id - integration - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - line_items + - tax + - request_code + - status + - paid - metadata - - slug - - product_code - - quantity_sold - - active - - deleted_at - - in_stock - - minimum_orderable - - maximum_orderable - - low_stock_alert - - id - - createdAt - - updatedAt + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code required: - status - message - data - ProductFetchResponse: + PaymentRequestUpdate: + type: object + 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 + 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 + 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 + example: + amount: 15000 + PaymentRequestNotificationsArray: + type: object + properties: + sent_at: + type: string + channel: + type: string + required: + - sent_at + - channel + PaymentRequestUpdateResponse: type: object properties: status: @@ -13063,167 +13149,120 @@ components: data: type: object properties: - digital_assets: - type: array - items: {} + id: + type: integer integration: type: integer - name: - type: string - description: - type: string - product_code: + domain: type: string - price: + amount: type: integer currency: type: string - quantity: + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: type: integer - quantity_sold: nullable: true - type: + description: + nullable: true + pdf_url: type: string - files: + nullable: true + line_items: 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: + tax: + type: array + items: {} + request_code: type: string - active: + status: + type: string + paid: type: boolean - features: + paid_at: nullable: true - in_stock: - type: boolean metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: type: object properties: - background_color: + id: + type: integer + first_name: 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: + 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 - expires_in: + split_code: nullable: true - id: - type: integer - createdAt: - type: string - updatedAt: - type: string required: - - digital_assets + - id - integration - - name - - description - - product_code - - price - - currency - - quantity - - quantity_sold - - type - - files - - file_path - - is_shippable - - shipping_fields - - unlimited - domain - - active - - features - - in_stock + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at - 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 - - createdAt - - updatedAt required: - status - message - data - 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: + PaymentRequestVerifyResponse: type: object properties: status: @@ -13233,126 +13272,139 @@ components: data: type: object properties: - name: - type: string - description: - type: string - product_code: - type: string - price: - type: integer - currency: - type: string - quantity: - type: integer - quantity_sold: + id: type: integer - type: - type: string - files: - type: array - items: {} - file_path: - nullable: true - is_shippable: - type: boolean - shipping_fields: + integration: type: object properties: - delivery_note: + key: type: string - shipping_address: + name: type: string - shipping_fees: + logo: + type: string + allowed_currencies: type: array - items: {} + items: + type: string required: - - delivery_note - - shipping_address - - shipping_fees - unlimited: - type: boolean + - key + - name + - logo + - allowed_currencies domain: type: string - active: + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: type: boolean - features: + invoice_number: + type: integer nullable: true - in_stock: + 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: type: boolean + paid_at: + nullable: true metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: type: object properties: - background_color: + 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: - - background_color - slug: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: type: string - success_message: - nullable: true - redirect_url: + discount: nullable: true split_code: nullable: true - notification_emails: - nullable: true - minimum_orderable: + pending_amount: type: integer - maximum_orderable: - nullable: true - low_stock_alert: - type: boolean - stock_threshold: - nullable: true - expires_in: - nullable: true - id: - type: integer - integration: - type: integer - createdAt: - type: string - updatedAt: - type: string 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 + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at - 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 + - pending_amount required: - status - message - data - ProductDeleteResponse: + PaymentRequestSendNotificationResponse: type: object properties: status: @@ -13362,48 +13414,37 @@ components: required: - status - message - StorefrontListResponseArray: + PaymentRequestPendingArray: type: object properties: - id: - type: integer - name: - type: string - slug: + currency: type: string - orders_count: + amount: type: integer - status: + required: + - currency + - amount + PaymentRequestSuccessfulArray: + type: object + properties: + currency: type: string - revenue: - nullable: true + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalArray: + type: object + properties: currency: type: string - products: - type: array - items: {} - contacts: - type: array - items: {} - social_media: - type: array - items: {} - shipping_fees: - type: array - items: {} + amount: + type: integer required: - - id - - name - - slug - - orders_count - - status - - revenue - currency - - products - - contacts - - social_media - - shipping_fees - StorefrontListResponse: + - amount + PaymentRequestTotalResponse: type: object properties: status: @@ -13411,73 +13452,29 @@ components: message: type: string data: - type: array - items: - $ref: '#/components/schemas/StorefrontListResponseArray' - meta: type: object properties: + pending: + type: array + items: + $ref: '#/components/schemas/PaymentRequestPendingArray' + successful: + type: array + items: + $ref: '#/components/schemas/PaymentRequestSuccessfulArray' total: - type: integer - skipped: - type: integer - perPage: - type: integer - page: - type: integer - pageCount: - type: integer + type: array + items: + $ref: '#/components/schemas/PaymentRequestTotalArray' required: + - pending + - successful - 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: string - StorefrontContactsArray: - type: object - properties: - value: - type: string - id: - type: integer - type_name: - nullable: true - type: - type: integer - required: - - value - - id - - type_name - - type - StorefrontCreateResponse: + PaymentRequestFinalizeResponse: type: object properties: status: @@ -13487,388 +13484,257 @@ 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: type: string - background_color: + 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 - 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 - - 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 - StorefrontFetchResponse: - 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: + offline_reference: type: string - shippable: - type: boolean - integration: - type: integer - domain: + 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 - digital_product_expiry: - nullable: true - metadata: + discount: type: object + properties: + type: + type: string + amount: + type: integer + required: + - type + - amount nullable: true - id: + split_code: + nullable: true + pending_amount: type: integer - createdAt: - type: string - updatedAt: - type: string - products: - type: array - items: {} - shipping_fees: - type: array - items: {} 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 + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount required: - status - message - data - - 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 - StorefrontUpdateResponse: - type: object - properties: - status: - type: boolean - message: - type: string - required: - - status - - message - StorefrontDeleteResponse: + PaymentRequestArchiveResponse: type: object properties: status: type: boolean message: - type: string - required: - - status - - message - StorefrontAddProducts: - type: object - required: - - products - properties: - products: - description: An array of product IDs - type: array - items: - type: integer - OrderItemsArray: - 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): - 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: + type: string + required: + - status + - message + ProductListsResponseArray: type: object properties: id: type: integer - order_code: + name: type: string - integration: - type: integer - domain: + 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: @@ -13878,25 +13744,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 @@ -13907,96 +13770,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: @@ -14006,141 +13822,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: @@ -14150,266 +14112,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 + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited - domain - - currency - - amount - - email - - status - - refunded - - paid_at - - shipping_address + - 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: @@ -14419,36 +14292,157 @@ 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. Allowed values are: `NGN`, `GHS`, `KES`, `ZAR` or `USD` + type: string + description: + description: The description of the storefront + type: string + 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: @@ -14458,205 +14452,302 @@ 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 + - 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 + 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 - - data - PageListResponseArray: + StorefrontAddProducts: type: object + required: + - products properties: - integration: + products: + description: An array of product IDs + type: array + items: + type: integer + 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: @@ -14666,12 +14757,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: @@ -14682,6 +14775,7 @@ components: type: integer required: - total + - revenue - skipped - perPage - page @@ -14692,75 +14786,96 @@ components: - message - data - meta - PageCreate: + OrderItems: type: object + description: The collection of items that make up the order required: - - name + - item + - type + - quantity + - amount properties: - name: - description: Name of page + item: + description: The product ID of the item type: string - description: - description: The description of the page + 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: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + description: The cost of the item type: integer - currency: - description: The transaction currency. Defaults to your integration currency. + 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 - 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]` + 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 - type: - description: | - The type of payment page to create. Defaults to `payment` if no type is specified. + 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 - 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`. + first_name: + description: The customer's first name 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` + last_name: + description: The customer's last name 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. + phone: + description: The customer's mobile number type: string - success_message: - description: | - A success message to display to the customer after a successful transaction + currency: + description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD type: string - notification_email: + items: + type: array + items: + $ref: '#/components/schemas/OrderItems' + shipping: + $ref: '#/components/schemas/OrderShipping' + is_gift: description: | - An email address that will receive transaction notifications for this payment page - type: string - collect_phone: + A flag to indicate if the order is for someone else + type: boolean + pay_for_me: description: | - Specify whether to collect phone numbers on the payment page + A flag to indicate if the someone else should pay for the order type: boolean - custom_fields: - description: If you would like to accept custom fields, specify them here. - type: array - items: - type: object - PageCreateResponse: + OrderCreateResponse: type: object properties: status: @@ -14770,96 +14885,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 @@ -14867,48 +14984,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: @@ -14918,147 +15029,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: - type: string - features: + variant_id: nullable: true - is_shippable: + variant_price: + nullable: true + variant_code: + nullable: true + amount: type: integer - domain: + shipping_method: + nullable: true + status: type: string - integration: - type: integer - active: + 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 - in_stock: + delivery_note: + nullable: true + shipping_fee: + nullable: true + amount_paid: type: integer + storefront_slug: + type: string 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: @@ -15066,220 +15296,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: @@ -15289,7 +15545,7 @@ components: data: type: array items: - $ref: '#/components/schemas/PaymentRequestListResponseArray' + $ref: '#/components/schemas/PageListResponseArray' meta: type: object properties: @@ -15298,9 +15554,7 @@ components: skipped: type: integer perPage: - anyOf: - - type: integer - - type: string + type: integer page: type: integer pageCount: @@ -15317,65 +15571,75 @@ components: - message - data - meta - PaymentRequestCreate: + PageCreate: type: object required: - - customer + - 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 + 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 - 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 + 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. + type: array 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: + PageCreateResponse: type: object properties: status: @@ -15385,149 +15649,51 @@ components: 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: + name: type: string - status: + integration: + type: integer + domain: type: string - paid: - type: boolean - metadata: - type: object - nullable: true - notifications: - type: array - items: {} - offline_reference: + slug: type: string - customer: + currency: + type: string + type: + type: string + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + id: type: integer - created_at: + createdAt: type: string - discount: - nullable: true - split_code: + updatedAt: type: string - nullable: true required: - - id + - name - integration - domain - - amount + - slug - 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 + - type + - collect_phone + - active + - published + - migrate + - id + - createdAt + - updatedAt required: - status - message - data - PaymentRequestUpdate: - type: object - 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 - PaymentRequestNotificationsArray: - type: object - properties: - sent_at: - type: string - channel: - type: string - required: - - sent_at - - channel - PaymentRequestUpdateResponse: + PageFetchResponse: type: object properties: status: @@ -15537,120 +15703,91 @@ components: data: type: object properties: - id: - type: integer integration: 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 + 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 + - id + - createdAt + - updatedAt required: - status - message - data - PaymentRequestVerifyResponse: + 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: type: object properties: status: @@ -15660,139 +15797,78 @@ 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 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 + 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 - PaymentRequestSendNotificationResponse: + PageCheckSlugAvailabilityResponse: type: object properties: status: @@ -15802,67 +15878,66 @@ components: required: - status - message - PaymentRequestPendingArray: + PageProduct: type: object - properties: - currency: - type: string - amount: - type: integer required: - - currency - - amount - PaymentRequestSuccessfulArray: + - product + properties: + product: + description: IDs of all products to add to a page + type: array + items: + type: string + PageProductsArray: type: object properties: - currency: + product_id: + type: integer + name: type: string - amount: + description: + type: string + product_code: + type: string + page: + type: integer + price: type: integer - required: - - currency - - amount - PaymentRequestTotalArray: - type: object - properties: currency: type: string - amount: + quantity: type: integer - required: - - currency - - amount - PaymentRequestTotalResponse: - type: object - properties: - status: - type: boolean - message: + type: 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 + features: + nullable: true + is_shippable: + type: integer + domain: + type: string + integration: + type: integer + active: + type: integer + in_stock: + type: integer required: - - status - - message - - data - PaymentRequestFinalizeResponse: + - product_id + - name + - description + - product_code + - page + - price + - currency + - quantity + - type + - features + - is_shippable + - domain + - integration + - active + - in_stock + PageAddProductsResponse: type: object properties: status: @@ -15872,142 +15947,82 @@ components: data: type: object properties: - id: - type: integer integration: type: integer + plan: + nullable: true 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: + type: type: string + redirect_url: nullable: true - pdf_url: + success_message: 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: + 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 + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: + $ref: '#/components/schemas/PageProductsArray' 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 - - pending_amount + - id + - createdAt + - updatedAt + - products required: - status - message - data - PaymentRequestArchiveResponse: - type: object - properties: - status: - type: boolean - message: - type: string - required: - - status - - message ControlPanelFetchPaymentSessionTimeoutResponse: type: object properties: @@ -18457,6 +18472,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: @@ -18583,54 +18646,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: 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/openapi.yaml b/src/assets/openapi/openapi.yaml index b955306..df6166c 100644 --- a/src/assets/openapi/openapi.yaml +++ b/src/assets/openapi/openapi.yaml @@ -89,6 +89,11 @@ tags: 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 @@ -106,11 +111,6 @@ 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 @@ -302,6 +302,20 @@ paths: $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}: @@ -336,20 +350,6 @@ 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: 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: