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.

82 lines (81 loc) 1.87 kB
export interface PawaPayConfig { apiToken: string; baseUrl: 'sandbox' | 'production' | string; } export interface PawaPayDepositPayload { depositId?: string; amount: string; currency: string; country: string; correspondent: string; payer: { type: "MSISDN"; address: { value: string; }; }; customerTimestamp?: string; statementDescription: string; metadata?: { fieldName: string; fieldValue: string; isPII?: boolean; }[]; } export interface PawaPayDepositResponse { depositId: string; status: 'ACCEPTED' | 'REJECTED' | 'DUPLICATE_IGNORED'; created: string; rejectionReason?: { code: string; message: string; }; } export interface PawaPayPayoutPayload { payoutId?: string; amount: string; currency: string; country: string; correspondent: string; recipient: { type: "MSISDN"; address: { value: string; }; }; customerTimestamp?: string; statementDescription: string; metadata?: { fieldName: string; fieldValue: string; isPII?: boolean; }[]; } export interface PawaPayPayoutResponse { payoutId: string; status: 'ACCEPTED' | 'ENQUEUED' | 'REJECTED' | 'DUPLICATE_IGNORED'; created: string; rejectionReason?: { code: string; message: string; }; } export interface PawaPayRefundPayload { refundId?: string; depositId: string; amount?: string; metadata?: { fieldName: string; fieldValue: string; isPII?: boolean; }[]; } export interface PawaPayRefundResponse { refundId: string; status: 'ACCEPTED' | 'REJECTED' | 'DUPLICATE_IGNORED'; created: string; rejectionReason?: { code: string; message: string; }; }