ecocash-api
Version:
ecocash-api
27 lines (24 loc) • 656 B
text/typescript
interface EcocashConfig {
apiKey: string;
env: "sandbox" | "live";
}
interface PaymentRequest {
customerMsisdn: string;
amount: number;
reason: string;
currency: "USD" | "ZWG";
sourceReference: string;
}
interface PaymentResponse {
status: string;
message?: string;
transactionId?: string;
[key: string]: any;
}
declare class EcocashClient {
private baseUrl;
private apiKey;
constructor(config: EcocashConfig);
requestPayment(payload: Omit<PaymentRequest, "sourceReference">): Promise<PaymentResponse>;
}
export { EcocashClient, type EcocashConfig, type PaymentRequest, type PaymentResponse };