diff --git a/base/paystack.yaml b/base/paystack.yaml index 22c5013..2b91ac4 100644 --- a/base/paystack.yaml +++ b/base/paystack.yaml @@ -23,6 +23,10 @@ tags: description: | A collection of endpoints for building delightful in-person payment experiences x-product-name: Terminal + - name: Virtual Terminal + description: | + A collection of endpoints for building in-person payments without a physical terminal + x-product-name: Virtual Terminal - name: Customer description: | A collection of endpoints for creating and managing customers on an integration @@ -876,6 +880,201 @@ paths: $ref: '#/components/responses/Unauthorized' default: description: Server error + /virtual_terminal: + post: + tags: + - Virtual Terminal + summary: Create Virtual Terminal + operationId: virtualTerminal_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Virtual Terminal + summary: List Virtual Terminals + operationId: virtualTerminal_list + parameters: + - name: perPage + in: query + schema: + type: integer + - name: page + in: query + schema: + type: integer + responses: + '200': + $ref: '#/components/responses/VirtualTerminalListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}: + parameters: + - name: code + in: path + required: true + schema: + type: string + get: + tags: + - Virtual Terminal + summary: Fetch Virtual Terminal + operationId: virtualTerminal_fetch + responses: + '200': + $ref: '#/components/responses/VirtualTerminalFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + put: + tags: + - Virtual Terminal + summary: Update Virtual Terminal + operationId: virtualTerminal_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/deactivate: + parameters: + - name: code + in: path + required: true + schema: + type: string + put: + tags: + - Virtual Terminal + summary: Deactivate Virtual Terminal + operationId: virtualTerminal_deactivate + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeactivateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/assign: + parameters: + - name: code + in: path + required: true + schema: + type: string + post: + tags: + - Virtual Terminal + summary: Assign Destination to Virtual Terminal + operationId: virtualTerminal_destinationAssign + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationAssignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/unassign: + parameters: + - name: code + in: path + required: true + schema: + type: string + post: + tags: + - Virtual Terminal + summary: Unassign Destination from Virtual Terminal + operationId: virtualTerminal_destinationUnassign + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationUnassignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/split_code: + parameters: + - name: code + in: path + required: true + schema: + type: string + put: + tags: + - Virtual Terminal + summary: Add Split Code to Virtual Terminal + operationId: virtualTerminal_addSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalAddSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error + delete: + tags: + - Virtual Terminal + summary: Remove Split Code from Virtual Terminal + operationId: virtualTerminal_deleteSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeleteSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error /customer: post: tags: @@ -5675,25 +5874,309 @@ components: type: integer domain: type: string - name: - type: string - nullable: true - address: + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + TerminalListsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TerminalListsResponseArray' + meta: + type: object + properties: + next: + type: array + nullable: true + items: {} + previous: + type: array + nullable: true + items: {} + perPage: + type: integer + required: + - next + - previous + - perPage + additionalProperties: false + required: + - status + - message + - data + - meta + TerminalGetResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + serial_number: + type: string + device_make: + type: string + nullable: true + terminal_id: + type: string + integration: + type: integer + domain: + type: string + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + split_code: + type: string + nullable: true + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + - split_code + required: + - status + - message + - data + TerminalUpate: + type: object + description: Model for updating a Terminal details + properties: + name: + description: The new name for the Terminal + type: string + address: + description: The new address for the Terminal + type: string + example: + name: Oreos + address: Somewhere on earth + TerminalUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalActivationToggle: + type: object + description: Model for activating and deactivating a debug Terminal + required: + - serial_number + properties: + serial_number: + description: Device Serial Number + type: string + example: + serial_number: '1111150412230003899' + TerminalCommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalDecommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalCreate: + type: object + required: + - name + - destinations + properties: + name: + type: string + description: The name of the virtual terminal + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + split_code: + type: string + description: Split code to associate with the virtual terminal + metadata: + type: object + description: Additional custom data as key-value pairs + example: + name: "Sample Terminal" + destinations: + - target: "+2548012345678" + name: "John Doe" + - target: "+2548098765432" + name: "Jane Smith" + VirtualTerminalCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + integration: + type: integer + domain: + type: string + code: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + metadata: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + currency: + type: string + required: + - id + - name + - integration + - domain + - code + - paymentMethods + - active + - metadata + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/VirtualTerminalListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + VirtualTerminalListResponseArray: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: type: string - nullable: true - status: + currency: type: string required: - id - - serial_number - - device_make - - terminal_id + - code + - name - integration - domain - - name - - address - - status - TerminalListsResponse: + - paymentMethods + - active + - created_at + - currency + VirtualTerminalFetchResponse: type: object properties: status: @@ -5701,33 +6184,67 @@ components: message: type: string data: - type: array - items: - $ref: '#/components/schemas/TerminalListsResponseArray' - meta: type: object properties: - next: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: type: array - nullable: true items: {} - previous: - type: array + active: + type: boolean + created_at: + type: string + connect_account_id: nullable: true - items: {} - perPage: - type: integer + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: + type: string required: - - next - - previous - - perPage - additionalProperties: false + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency required: - status - message - data - - meta - TerminalGetResponse: + VirtualTerminalUpdate: + type: object + properties: + name: + description: Name of the virtual terminal + type: string + required: + - name + VirtualTerminalUpdateResponse: type: object properties: status: @@ -5739,88 +6256,234 @@ components: properties: id: type: integer - serial_number: - type: string - device_make: + code: type: string - nullable: true - terminal_id: + name: type: string integration: type: integer domain: type: string - name: - type: string - nullable: true - address: + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: type: string + connect_account_id: nullable: true - status: - type: string - split_code: + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: type: string - nullable: true required: - id - - serial_number - - device_make - - terminal_id + - code + - name - integration - domain - - name - - address - - status - - split_code + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency required: - status - message - data - TerminalUpate: + VirtualTerminalDeactivateResponse: type: object - description: Model for updating a Terminal details properties: - name: - description: The new name for the Terminal - type: string - address: - description: The new address for the Terminal + status: + type: boolean + message: type: string + required: + - status + - message + VirtualTerminalDestinationAssign: + type: object + required: + - destinations + properties: + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + required: + - target + - name example: - name: Oreos - address: Somewhere on earth - TerminalUpdateResponse: + destinations: + - target: "+2548012345678" + name: "John Doe" + - target: "+2548098765432" + name: "Jane Smith" + VirtualTerminalDestinationAssignResponse: type: object properties: status: type: boolean message: type: string + data: + type: array + items: + type: object + properties: + integration: + type: integer + target: + type: string + name: + type: string + type: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - target + - name + - type + - id + - createdAt + - updatedAt required: - status - message - TerminalActivationToggle: + - data + VirtualTerminalDestinationUnassign: type: object - description: Model for activating and deactivating a debug Terminal + properties: + targets: + type: array + items: + type: string required: - - serial_number + - targets + example: + targets: + - "+2548012345678" + - "+2548098765432" + VirtualTerminalDestinationUnassignResponse: + type: object properties: - serial_number: - description: Device Serial Number + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalAddSplitCode: + type: object + required: + - split_code + properties: + split_code: + description: The split code to assign to the virtual terminal type: string example: - serial_number: '1111150412230003899' - TerminalCommissionDeviceResponse: + split_code: SPL_1234567890abcdef + VirtualTerminalAddSplitCodeResponse: type: object properties: status: type: boolean message: type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + nullable: true + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts required: - status - message - TerminalDecommissionDeviceResponse: + - data + VirtualTerminalDeleteSplitCode: + type: object + properties: + split_code: + description: The split code to assign to the virtual terminal + type: string + example: + split_code: SPL_1234567890abcdef + required: + - split_code + VirtualTerminalDeleteSplitCodeResponse: type: object properties: status: @@ -15944,6 +16607,60 @@ components: application/json: schema: $ref: '#/components/schemas/TerminalDecommissionDeviceResponse' + VirtualTerminalCreateSuccess: + description: Virtual Terminal Create response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreateResponse' + VirtualTerminalListSuccess: + description: Virtual Terminal Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalListResponse' + VirtualTerminalFetchSuccess: + description: Virtual Terminal Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalFetchResponse' + VirtualTerminalUpdateSuccess: + description: Virtual Terminal Update response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdateResponse' + VirtualTerminalDeactivateSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeactivateResponse' + VirtualTerminalDestinationAssignSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssignResponse' + VirtualTerminalDestinationUnassignSuccess: + description: Virtual Terminal unassign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassignResponse' + VirtualTerminalAddSplitCodeSuccess: + description: Virtual Terminal Split Assign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCodeResponse' + VirtualTerminalDeleteSplitCodeSuccess: + description: Virtual Terminal Split Remove response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCodeResponse' CustomerListSuccess: description: Customer List response content: