export interface PhonePePaymentSDK { /** * This method is used to initiate PhonePe Payment sdk. * Provide all the information as requested by the method signature. * Params: * - environment: This signified the environment required for the payment sdk * possible values: SANDBOX, PRODUCTION * if any unknown value is provided, PRODUCTION will be considered as default. * - merchantId: The merchant id provided by PhonePe at the time of onboarding. * - flowId : An alphanumeric string without any special character. It acts as a common ID b/w * your app user journey and PhonePe SDK. This helps to debug prod issue. * Recommended - Pass user-specific information or merchant user-id to track the journey. * - enableLogging: If you want to enable / visualize sdk log @IOS * - enabled = TRUE * - disable = FALSE * - Return: Boolean (TRUE -> SUCCESS). * - SUCCESS: TRUE * - FAILURE: FALSE * - in iOS = False (if AppID missing:-Please provide PhonePe AppId) * - in Android = Error in case of invalid arguments ex: "Invalid environment or merchantId!" */ init(options: { environment: string; merchantId: string; flowId: string; enableLogging: boolean | false; }): Promise>; /** * This method is used to initiate PhonePe B2B PG Flow. * Provide all the information as requested by the method signature. * Params: * - request : The request body for the transaction as per the developer docs, Make sure the request body is base64encoded. * - appSchema: @Optional(Not need for Android) For iOS, Your custom URL Schemes, as per the developer docs. * - showLoaderFlag: @Optional(Default: true) used for hiding the loader visibility in phonepe app intent launch. * Return: Will be returning a dictionary / hashMap * { * status: String, // string value to provide the status of the transaction * // possible values: SUCCESS, FAILURE, INTERRUPTED * error: String // if any error occurs * } */ startTransaction(options: { request: string; showLoaderFlag: Boolean | true; appSchema: string | null; }): Promise>; /** * This method is called to get list of upi apps in @Android only. * Return: String * JSON String -> List of UPI App with packageName, applicationName & versionCode * NOTE :- In iOS, it will throw os error at runtime. */ getUpiAppsForAndroid(): Promise>; /** * This method is called to get list of upi apps in @iOS only. * Return: String * JSON String -> List of UPI App with applicationName that are installed in the device and supported by PhonePe SDK * NOTE :- In Android, it will throw os error at runtime. */ getUpiAppsForIos(): Promise>; }