quick-phonepe
Version:
easy to use phonepe sdk for payment integration
33 lines (27 loc) • 735 B
TypeScript
// src/index.ts
import { AxiosRequestConfig } from "axios";
declare module "quick-phonepe" {
export default class QuickPhonePe {
constructor(config: {
merchantId: string;
saltKey: string;
keyIndex?: number;
mode?: "DEV" | "PROD";
});
createTransaction(data: TransactionData): Promise<object>;
verifyTransaction(merchantTransactionId: string): Promise<object>;
}
export interface PaymentInstrument {
type: string;
}
export interface TransactionData {
merchantTransactionId: string;
merchantUserId: string;
name: string;
amount: number;
redirectUrl: string;
redirectMode: string;
mobileNumber: string;
paymentInstrument: PaymentInstrument;
}
}