airwallex-payment-elements
Version:
[](https://www.npmjs.org/package/airwallex-payment-elements) [](https://git
46 lines (41 loc) • 1.39 kB
TypeScript
import { Intent } from './cardNumber';
import { CSSProperties } from './element';
/**
* All payment method options for qrcode element, those payment method type integration will render qrcode from your checkout site to specific provider’s authentication page.
*/
export type PaymentMethodWithQrcode = 'alipayhk' | 'kakaopay' | 'wechatpay' | 'fps';
/**
* Apply to qrcode element type integration, interface used when call createElement with type `qrcode`
*/
export interface QrcodeElementPaymentOptions {
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/)
*
*/
/**
* @deprecated Please use {@link intent_id} and {@link client_secret} instead.
*/
intent?: Intent;
qrcodeMethod?: PaymentMethodWithQrcode;
intent_id: string;
client_secret: string;
mode: 'payment';
/**
* Box style for the QRcode element.
*/
style?: CSSProperties;
}
export interface QrcodeElementRecurringOptions {
mode: 'recurring';
client_secret: string;
currency: string;
customer_id: string;
qrcodeMethod: 'wechatpay';
merchant_trigger_reason?: 'scheduled' | 'unscheduled';
/**
* Box style for the QRcode element.
*/
style?: CSSProperties;
}
export type QrcodeElementOptions = QrcodeElementPaymentOptions | QrcodeElementRecurringOptions;