import { AirwallexEnv } from './airwallex';
import { Intent } from './cardNumber';
import { ExtendEventDetail } from './element';
/**
* The response of getBrowserInfo
*/
export interface GetBrowserInfoResponse {
/**
* The height of the screen
*/
screen_height: number;
/**
* The width of the screen
*/
screen_width: number;
/**
* The color depth of the screen
*/
screen_color_depth: number;
/**
* The language of browser
*/
language: string;
/**
* The offset between browser time zone and UTC in minutes
*/
timezone: number;
/**
* The browser infos
*/
browser: {
/**
* Indicates if the browser supports java
*/
java_enabled: boolean;
/**
* Indicates if the browser supports javascript
*/
javascript_enabled: boolean;
/**
* The user agent of current session
*/
user_agent: string;
};
}
/**
* Method to get browser info which will be used when confirm payment intent
*/
export declare const getBrowserInfo: (props?: GetDeviceFingerprintRequest) => GetBrowserInfoResponse;
/**
* The request payload for getDeviceFingerprint
*
*/
export interface GetDeviceFingerprintRequest {
/**
* The intent id that you would like to pay
*/
intent_id?: string;
/**
* The airwalllex env that you would like to integrate. for example: 'staging' | 'demo' | 'prod'
*/
env?: string;
}
/**
* Method to collect device fingerprint
*/
export declare const getDeviceFingerprint: (props: GetDeviceFingerprintRequest) => string;
/**
* The `next_action` field returned from the confirm request
*/
interface NextAction {
data: {
jwt: string;
stage: string;
version: string;
};
type: string;
url: string;
stage?: string;
}
/**
* The request params when calling handle3ds
*/
interface Handle3dsRequest {
/**
* Indicate which airwallex integration env your merchant site would like to connect with
* If not provide default will be prod which point to [Airwallex Checkout](https://checkout.airwallex.com)
*/
env: AirwallexEnv;
/**
* The intent that you would like to checkout
*/
intent: Intent;
/**
* next_action of the transaction, could got it from confirm response
*/
next_action: NextAction;
/**
* the id of the container you would like the 3ds popup to show
*/
authFormContainer?: string;
/**
* The size of the 3DS challenge popup
* The available options are below. Any invalid option will map to option '05'
*
* '01': ['250px', '400px']
* '02': ['390px', '400px']
* '03': ['500px', '600px']
* '04': ['600px', '400px']
* '05': ['100%', '100%']
*
*/
challengeWindowSize?: string;
}
/**
* @deprecated this function would need exactly the same API version for merchant and element, so better to not use it
* Method to let airwallex fully handle 3ds flow
*/
export declare const handle3ds: (props: Handle3dsRequest) => Promise<ExtendEventDetail>;
/**
* The request params for get3dsReturnUrl
*/
interface Get3dsReturnUrlRequest {
/**
* Indicate which airwallex integration env your merchant site would like to connect with
* If not provide default will be prod which point to [Airwallex Checkout](https://checkout.airwallex.com)
*/
env?: AirwallexEnv;
// The origin of the url where user want to checkout, by default will get the window.location.origin
checkoutOrigin?: String;
}
/**
* @deprecated this function would need exactly the same API version for merchant and element, so better to not use it
* Method to get the return url for 3ds case
*/
export declare const get3dsReturnUrl: (props: Get3dsReturnUrlRequest) => string;
Source