import { ElementOptions, PaymentMethodType, BoxStyle } from './element';
import { Mode, RecurringOptions, Billing } from './airwallex';
import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions } from './element';
/**
* Apply to dropIn element type integration, interface used when call createElement with type `dropIn`
*/
export interface DropInElementOptions extends ElementOptions {
/**
* If the intent provided, this should be the client_secret of the intent
* If no intent provided, this should be the client_secret of the customer
*/
client_secret: string;
/**
* Currency of your payment intent or consent. Three-letter ISO currency code
*/
currency: string;
/**
* Checkout mode, can be one of payment, recurring
* @default payment
*/
mode?: Mode;
/**
* The payment methods your website would like to integrate with
* @deprecated use `methods` instead
*/
components?: Array<PaymentMethodType>;
/**
* The payment methods your website would like to integrate with
*/
methods?: Array<PaymentMethodType>;
/**
* Indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
/**
* The options of apple pay
* If you want to integrate with apple pay, you need to provide the following options
*/
applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
/**
* The options of apple pay
* If you want to integrate with apple pay, you need to provide the following options
*/
googlePayRequestOptions?: GooglePayRequestOptions;
/**
* Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
*/
withBilling?: boolean;
/**
* Style for dropIn element
*/
style?: BoxStyle;
/**
* Container for authentication form, it's an element id
*/
authFormContainer?: string;
/**
* The payment intent id you would like to checkout, it's required when mode is `payment`
*/
intent_id?: string;
/**
* Checkout for know customer, refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Customers/Intro)
*/
customer_id?: string;
/**
* The options of recurring flow
*/
recurringOptions?: RecurringOptions;
/**
* The 2-letter ISO country code from which the consumer will be paying
* If you want to integrate with `bank_transfer` payment method, it would be required
*/
country_code?: string;
/**
* Customer name - minimum of 3 characters, up to 100 characters
*/
shopper_name?: string;
/**
* Customer phone
*/
shopper_phone?: string;
/**
* Customer email
*/
shopper_email?: string;
/**
* Billing info from merchant
*/
billing?: Billing;
}
Source