openapi: 3.0.3 info: title: Kora (Korapay) Merchant Balances Refunds API description: 'The Kora merchant REST API for pan-African payments. It supports pay-ins (card, bank transfer, mobile money, pay-with-bank), payouts (single, bulk, remittance), NGN and USD virtual bank accounts, balances, refunds, multi-currency conversion, and payout utilities (bank / mobile-money lookups and account resolution). All requests are authenticated with API keys - a public key for client-side charge initiation and a secret key (Bearer) for server-side and financial operations - and each account has separate Test and Live mode keys. Card charge payloads must be AES-256 encrypted with your encryption key. Webhook notifications carry an `x-korapay-signature` header that is an HMAC SHA-256 of the response `data` object signed with your secret key. This document is a representative, grounded subset of the public Kora API. Request and response schemas are simplified; consult the Kora developer documentation for the authoritative field-level contract. Endpoints are confirmed against Kora''s published documentation except where a description notes an inferred path.' version: '1.0' contact: name: Kora Developer Support url: https://developers.korapay.com email: support@korapay.com servers: - url: https://api.korapay.com/merchant/api/v1 description: Kora merchant API (Test and Live selected by the API key used) security: - secretKeyAuth: [] tags: - name: Refunds description: Refunds for completed pay-in transactions. paths: /refunds/initiate: post: operationId: initiateRefund tags: - Refunds summary: Initiate a refund description: Initiates a full or partial refund for a completed pay-in transaction. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefundInput' responses: '200': description: The initiated refund. content: application/json: schema: $ref: '#/components/schemas/RefundResponse' '401': $ref: '#/components/responses/Unauthorized' /refunds/{reference}: parameters: - $ref: '#/components/parameters/Reference' get: operationId: getRefund tags: - Refunds summary: Retrieve a refund description: Retrieves the details of a refund by its reference. responses: '200': description: The refund details. content: application/json: schema: $ref: '#/components/schemas/RefundResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /refunds: get: operationId: listRefunds tags: - Refunds summary: List refunds description: Lists refunds within a specified time period. parameters: - $ref: '#/components/parameters/StartDate' - $ref: '#/components/parameters/EndDate' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/Limit' responses: '200': description: A list of refunds. content: application/json: schema: type: object additionalProperties: true '401': $ref: '#/components/responses/Unauthorized' components: schemas: RefundResponse: type: object properties: status: type: boolean message: type: string data: type: object additionalProperties: true RefundInput: type: object required: - reference - transaction_reference properties: reference: type: string description: Unique merchant reference for the refund. transaction_reference: type: string description: The reference of the pay-in transaction to refund. amount: type: number description: Optional partial refund amount; omit for a full refund. reason: type: string ErrorResponse: type: object properties: status: type: boolean message: type: string data: type: object additionalProperties: true parameters: Page: name: page in: query required: false description: Page number for pagination. schema: type: integer StartDate: name: start_date in: query required: false description: Start of the date range (ISO 8601). schema: type: string format: date Reference: name: reference in: path required: true description: The transaction / payment reference. schema: type: string EndDate: name: end_date in: query required: false description: End of the date range (ISO 8601). schema: type: string format: date Limit: name: limit in: query required: false description: Number of records per page. schema: type: integer responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: secretKeyAuth: type: http scheme: bearer description: 'Secret API key passed as `Authorization: Bearer sk_...`. Required for server-side and financial operations (payouts, balances, virtual bank accounts, refunds, conversions, charge verification). Test and Live modes use different keys.' publicKeyAuth: type: http scheme: bearer description: Public API key (`pk_...`) used from client-side code to initiate charges. Cannot access financial data.