UNPKG

pawapay-nodejs-sdk

Version:

Unofficial Node.js SDK for the PawaPay Merchant API. Simplify Mobile Money integrations (Deposits, Payouts, Refunds) with this type-safe TypeScript client.

27 lines (26 loc) 1.33 kB
import { PawaPayConfig, PawaPayDepositPayload, PawaPayDepositResponse, PawaPayPayoutPayload, PawaPayPayoutResponse, PawaPayRefundPayload, PawaPayRefundResponse } from './types'; export declare class PawaPayClient { private readonly apiToken; private readonly axiosInstance; constructor(config: PawaPayConfig); /** * Requests a deposit payment. * @param payload - The deposit details. depositId and customerTimestamp are optional. * @returns Promise resolving with the PawaPay deposit response. */ requestDeposit(payload: PawaPayDepositPayload): Promise<PawaPayDepositResponse>; private handleApiError; /** * Requests a payout transfer. (Not Yet Implemented) * @param payload - The payout details. payoutId and customerTimestamp are optional. * @returns Promise resolving with the PawaPay payout response. */ requestPayout(payload: PawaPayPayoutPayload): Promise<PawaPayPayoutResponse>; /** * Requests a refund for a previous deposit. (Not Yet Implemented) * @param payload - The refund details. refundId is optional. Amount is optional for full refund. * @returns Promise resolving with the PawaPay refund response. */ requestRefund(payload: PawaPayRefundPayload): Promise<PawaPayRefundResponse>; } export default PawaPayClient;