airwallex-payment-elements 0.2.66 → 0.2.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- /* Airwallex Checkout Component Version [0.2.66] */
1
+ /* Airwallex Checkout Component Version [0.2.73] */
2
2
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,o="/assets/elements.bundle.min.js",t=e=>{const r=document.createElement("script");r.src=`${e}${o}`;const t=document.head||document.body;if(!t)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return t.appendChild(r),r};exports.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},exports.confirmPaymentIntentWithSavedCard=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},exports.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),exports.createPaymentConsent=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},exports.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},exports.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),exports.get3dsReturnUrl=e=>window.Airwallex.get3dsReturnUrl(e),exports.getBrowserInfo=e=>window.Airwallex.getBrowserInfo(e),exports.getDeviceFingerprint=e=>window.Airwallex.getDeviceFingerprint(e),exports.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),exports.getGatewayUrl=r,exports.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},exports.handle3ds=e=>window.Airwallex.handle3ds(e),exports.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},exports.loadAirwallex=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let n=0;const l=async()=>{const n=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||t(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{n.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),n.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),n.remove&&n.remove()}))}))};for(;n<3;)try{return await l()}catch(e){n++,await new Promise((e=>window.setTimeout(e,500)))}return null},exports.loadAirwallexJs=t,exports.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")};
3
3
  //# sourceMappingURL=airwallex.cjs.js.map
@@ -1,3 +1,3 @@
1
- /* Airwallex Checkout Component Version [0.2.66] */
1
+ /* Airwallex Checkout Component Version [0.2.73] */
2
2
  const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,o="/assets/elements.bundle.min.js",l=e=>{const r=document.createElement("script");r.src=`${e}${o}`;const l=document.head||document.body;if(!l)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return l.appendChild(r),r},n=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let n=0;const w=async()=>{const n=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||l(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{n.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),n.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),n.remove&&n.remove()}))}))};for(;n<3;)try{return await w()}catch(e){n++,await new Promise((e=>window.setTimeout(e,500)))}return null},w=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},i=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},t=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),a=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),d=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),c=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},s=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},x=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},m=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},A=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},u=e=>window.Airwallex.getBrowserInfo(e),f=e=>window.Airwallex.getDeviceFingerprint(e),h=e=>window.Airwallex.get3dsReturnUrl(e),y=e=>window.Airwallex.handle3ds(e);export{c as confirmPaymentIntent,s as confirmPaymentIntentWithSavedCard,t as createElement,A as createPaymentConsent,x as createPaymentMethod,a as destroyElement,h as get3dsReturnUrl,u as getBrowserInfo,f as getDeviceFingerprint,d as getElement,r as getGatewayUrl,m as getPaymentIntent,y as handle3ds,w as init,n as loadAirwallex,l as loadAirwallexJs,i as redirectToCheckout};
3
3
  //# sourceMappingURL=airwallex.es.js.map
@@ -1,3 +1,3 @@
1
- /* Airwallex Checkout Component Version [0.2.66] */
1
+ /* Airwallex Checkout Component Version [0.2.73] */
2
2
  var Airwallex=function(e){"use strict";const r={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},n=e=>`https://${r[e]||r.prod}`,o="/assets/elements.bundle.min.js",l=e=>{const r=document.createElement("script");r.src=`${e}${o}`;const n=document.head||document.body;if(!n)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return n.appendChild(r),r};return e.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},e.confirmPaymentIntentWithSavedCard=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},e.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),e.createPaymentConsent=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},e.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},e.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),e.get3dsReturnUrl=e=>window.Airwallex.get3dsReturnUrl(e),e.getBrowserInfo=e=>window.Airwallex.getBrowserInfo(e),e.getDeviceFingerprint=e=>window.Airwallex.getDeviceFingerprint(e),e.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),e.getGatewayUrl=n,e.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},e.handle3ds=e=>window.Airwallex.handle3ds(e),e.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},e.loadAirwallex=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let r=0;const t=async()=>{const r=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||l(n((null==e?void 0:e.env)||"prod"));return new Promise(((n,o)=>{r.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),n(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),r.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),r.remove&&r.remove()}))}))};for(;r<3;)try{return await t()}catch(e){r++,await new Promise((e=>window.setTimeout(e,500)))}return null},e.loadAirwallexJs=l,e.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
3
3
  //# sourceMappingURL=airwallex.iife.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airwallex-payment-elements",
3
- "version": "0.2.66",
3
+ "version": "0.2.73",
4
4
  "module": "lib/bin/airwallex.es.js",
5
5
  "main": "lib/bin/airwallex.cjs.js",
6
6
  "bin": "lib/bin/airwallex.cjs.js",
@@ -95,6 +95,7 @@
95
95
  ]
96
96
  },
97
97
  "dependencies": {
98
+ "@types/googlepay": "^0.6.4",
98
99
  "@types/applepayjs": "^3.0.3",
99
100
  "csstype": "^3.0.6"
100
101
  }
@@ -12,7 +12,7 @@ import {
12
12
  } from './element';
13
13
  import { QrcodeElementOptions } from './qrcodeElement';
14
14
  import { Intent, PaymentMethodBasicInfo } from './cardNumber';
15
- import { BoxStyle, PaymentMethodType, ApplePayHppOrDropInRequestOptions } from './element';
15
+ import { BoxStyle, PaymentMethodType, ApplePayHppOrDropInRequestOptions, GooglePayHppRequestOptions } from './element';
16
16
  import { getBrowserInfo, getDeviceFingerprint, get3dsReturnUrl, handle3ds } from './fraud';
17
17
  import { DropInElementOptions } from './dropInElement';
18
18
  import { RedirectElementOptions } from './redirectElement';
@@ -176,6 +176,10 @@ export interface HostPaymentPage {
176
176
  * If you want to integrate with apple pay, you need to provide the following options
177
177
  */
178
178
  applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
179
+ /**
180
+ * Define google pay type and it's mapped option type
181
+ */
182
+ googlePayRequestOptions?: GooglePayHppRequestOptions;
179
183
  /**
180
184
  * Currency of your payment intent or consent. Three-letter ISO currency code
181
185
  */
@@ -34,7 +34,19 @@ export interface Intent {
34
34
  status: 'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED';
35
35
  payment_method: {
36
36
  id?: string;
37
- type: string;
37
+ type: 'card' | 'ach_direct_debit' | 'becs_direct_debit';
38
+ ach_direct_debit?: {
39
+ aba_routing_number: string;
40
+ account_number: string;
41
+ owner_name: string;
42
+ owner_email: string;
43
+ };
44
+ becs_direct_debit?: {
45
+ bsb_number: string;
46
+ account_number: string;
47
+ owner_name: string;
48
+ owner_email: string;
49
+ };
38
50
  };
39
51
  }[];
40
52
  customer_payment_methods?: {
@@ -1,6 +1,6 @@
1
1
  import { ElementOptions, PaymentMethodType, BoxStyle } from './element';
2
- import { Mode, HppRecurringOptions } from './airwallex';
3
- import { ApplePayHppOrDropInRequestOptions } from './element';
2
+ import { Mode, HppRecurringOptions, Billing } from './airwallex';
3
+ import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions } from './element';
4
4
 
5
5
  /**
6
6
  * Apply to dropIn element type integration, interface used when call createElement with type `dropIn`
@@ -33,6 +33,11 @@ export interface DropInElementOptions extends ElementOptions {
33
33
  * If you want to integrate with apple pay, you need to provide the following options
34
34
  */
35
35
  applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
36
+ /**
37
+ * The options of apple pay
38
+ * If you want to integrate with apple pay, you need to provide the following options
39
+ */
40
+ googlePayRequestOptions?: GooglePayRequestOptions;
36
41
  /**
37
42
  * Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
38
43
  */
@@ -42,7 +47,7 @@ export interface DropInElementOptions extends ElementOptions {
42
47
  */
43
48
  style?: BoxStyle;
44
49
  /**
45
- * Container for authentication form
50
+ * Container for authentication form, it's an element id
46
51
  */
47
52
  authFormContainer?: string;
48
53
  /**
@@ -74,4 +79,8 @@ export interface DropInElementOptions extends ElementOptions {
74
79
  * Customer email
75
80
  */
76
81
  shopper_email?: string;
82
+ /**
83
+ * Billing info from merchant
84
+ */
85
+ billing?: Billing;
77
86
  }
@@ -14,6 +14,7 @@ export type ElementType =
14
14
  | 'cardNumber'
15
15
  | 'expiry'
16
16
  | 'cvc'
17
+ | 'googlePayButton'
17
18
  /**
18
19
  * @deprecated paymentRequestButton is no longer supported by airwallex
19
20
  */
@@ -86,7 +87,8 @@ export type PaymentMethodWithRedirect =
86
87
  | 'payu'
87
88
  | 'ovo'
88
89
  | 'bitpay'
89
- | 'truemoney';
90
+ | 'truemoney'
91
+ | 'atome';
90
92
 
91
93
  export type DirectDebitPaymentMethod =
92
94
  | 'ach_direct_debit'
@@ -98,6 +100,7 @@ export type DirectDebitPaymentMethod =
98
100
  * Supported integration payment method type for dropin and hostPaymentPage
99
101
  */
100
102
  export type PaymentMethodType =
103
+ | 'googlepay'
101
104
  | 'applepay'
102
105
  | 'card'
103
106
  | 'wechatpay'
@@ -356,7 +359,7 @@ export interface CardElementOptions extends ElementOptions {
356
359
  */
357
360
  style?: InputStyle;
358
361
  /**
359
- * Container for authentication form
362
+ * Container for authentication form, it's an element id
360
363
  */
361
364
  authFormContainer?: string;
362
365
  }
@@ -388,7 +391,7 @@ export interface CardNumberElementOptions extends ElementOptions {
388
391
  */
389
392
  style?: InputStyle;
390
393
  /**
391
- * Container for authentication form
394
+ * Container for authentication form, it's an element id
392
395
  */
393
396
  authFormContainer?: string;
394
397
  }
@@ -432,7 +435,7 @@ export interface CvcElementOptions extends ElementOptions {
432
435
  */
433
436
  style?: InputStyle;
434
437
  /**
435
- * Container for authentication form
438
+ * Container for authentication form, it's an element id
436
439
  */
437
440
  authFormContainer?: string;
438
441
  }
@@ -460,7 +463,7 @@ export interface FullFeaturedCardPaymentOptions extends ElementOptions {
460
463
  */
461
464
  style?: BoxStyle;
462
465
  /**
463
- * Container for authentication form
466
+ * Container for authentication form, it's an element id
464
467
  */
465
468
  authFormContainer?: string;
466
469
  /**
@@ -530,21 +533,25 @@ export interface ApplePayRequestOriginalOptions {
530
533
 
531
534
  /**
532
535
  * The shipping information that you require from the user in order to fulfill the order.
536
+ * @deprecated Airwallex won't save shipping info in apple pay
533
537
  */
534
538
  requiredShippingContactFields?: ApplePayJS.ApplePayContactField[];
535
539
 
536
540
  /**
537
541
  * Shipping contact information for the user.
542
+ * @deprecated Airwallex won't save shipping info in apple pay
538
543
  */
539
544
  shippingContact?: ApplePayJS.ApplePayPaymentContact;
540
545
 
541
546
  /**
542
547
  * A set of shipping method objects that describe the available shipping methods.
548
+ * @deprecated Airwallex won't save shipping info in apple pay
543
549
  */
544
550
  shippingMethods?: ApplePayJS.ApplePayShippingMethod[];
545
551
 
546
552
  /**
547
553
  * How the items are to be shipped.
554
+ * @deprecated Airwallex won't save shipping info in apple pay
548
555
  */
549
556
  shippingType?: ApplePayJS.ApplePayShippingType;
550
557
 
@@ -558,6 +565,190 @@ export interface ApplePayRequestOriginalOptions {
558
565
  */
559
566
  applicationData?: string;
560
567
  }
568
+ export interface GooglePayHppRequestOptions extends Omit<GooglePayRequestOptions, 'merchantInfo'> {
569
+ /**
570
+ * Detailed information about the merchant.
571
+ */
572
+ merchantInfo?: {
573
+ /**
574
+ * Merchant name encoded as UTF-8.
575
+ */
576
+ merchantName?: string;
577
+ /**
578
+ *The fully qualified domain of the requesting merchant.
579
+ */
580
+ merchantOrigin?: string;
581
+ };
582
+ }
583
+
584
+ export type GoogleSupportedCardNetWork = 'MASTERCARD' | 'MAESTRO' | 'VISA';
585
+ export interface GooglePayRequestOptions {
586
+ /**
587
+ * The two-letter ISO-3166 country code.
588
+ */
589
+ countryCode: string;
590
+ /**
591
+ * Detailed information about the merchant.
592
+ */
593
+ merchantInfo?: {
594
+ /**
595
+ * Merchant name encoded as UTF-8.
596
+ */
597
+ merchantName?: string;
598
+ };
599
+ /**
600
+ * Whether to collect the email from the buyer.
601
+ *
602
+ * If omitted, defaults to `false`.
603
+ *
604
+ * @default false
605
+ */
606
+ emailRequired?: boolean;
607
+ /**
608
+ * Specifies the text to be displayed within the Google Pay button.
609
+ *
610
+ * @default "buy"
611
+ */
612
+ buttonType?: google.payments.api.ButtonType;
613
+ /**
614
+ * Specifies the button color of the Google Pay button.
615
+ *
616
+ * @default "default"
617
+ */
618
+ buttonColor?: google.payments.api.ButtonColor;
619
+ /**
620
+ * Determines how the button's size should change relative to the
621
+ * button's parent element.
622
+ *
623
+ * @default "static"
624
+ */
625
+ buttonSizeMode?: google.payments.api.ButtonSizeMode;
626
+ /**
627
+ * Correlation ID to refer to this transaction.
628
+ *
629
+ * This field is optional. It is generated by the merchant and is used
630
+ * for referring to this transaction later on (e.g. for debugging issues
631
+ * when communicating with Google).
632
+ */
633
+ transactionId?: string;
634
+ /**
635
+ * Definition of a cart item.
636
+ */
637
+ displayItems?: google.payments.api.DisplayItem[];
638
+ /**
639
+ * Total price label of this transaction.
640
+ *
641
+ * The string will be shown as the total price label on the cart modal
642
+ * dialog page.
643
+ *
644
+ * This field is optional, but required if developer wants to show cart
645
+ * information. Otherwise the cart modal dialog will not be rendered
646
+ * even if transactionInfo.displayItems is set.
647
+ */
648
+ totalPriceLabel?: string;
649
+ /**
650
+ * The options for checkout.
651
+ */
652
+ checkoutOption?: google.payments.api.CheckoutOption;
653
+ /**
654
+ * Defines callback methods for handling payment data changed and payment
655
+ * authorized events.
656
+ *
657
+ * If you set up Dynamic Price Updates in your integration, be sure to add
658
+ * the following [[PaymentDataChangedHandler|`onPaymentDataChanged`]] and
659
+ * [[PaymentAuthorizedHandler|`onPaymentAuthorized`]] callbacks.
660
+ *
661
+ * Example:
662
+ *
663
+ * The following example configuration uses the callbacks needed to set up
664
+ * Dynamic Price Updates:
665
+ *
666
+ * ```js
667
+ * {
668
+ * onPaymentDataChanged: onPaymentDataChanged,
669
+ * onPaymentAuthorized: onPaymentAuthorized
670
+ * }
671
+ * ```
672
+ */
673
+ paymentDataCallbacks?: google.payments.api.PaymentDataCallbacks;
674
+ /**
675
+ * Allowed authentication methods. The default value is ["PAN_ONLY", "CRYPTOGRAM_3DS"]
676
+ */
677
+ allowedAuthMethods?: google.payments.api.CardAuthMethod[];
678
+ /**
679
+ * One or more card networks that you support, The default value is ["MASTERCARD", "MAESTRO", "VISA"]
680
+ */
681
+ allowedCardNetworks?: GoogleSupportedCardNetWork[];
682
+ /**
683
+ * Whether a prepaid card may be used for this transaction.
684
+ *
685
+ * If omitted, defaults to `true`.
686
+ *
687
+ * @default true
688
+ */
689
+ allowPrepaidCards?: boolean;
690
+ /**
691
+ * Whether a credit card may be used for this transaction.
692
+ *
693
+ * If omitted, defaults to `true`.
694
+ *
695
+ * @default true
696
+ */
697
+ allowCreditCards?: boolean;
698
+ /**
699
+ * Set to `true` to request assuranceDetails.
700
+ *
701
+ * If omitted, defaults to `false`.
702
+ *
703
+ * You may set if you need object provides information about the validation performed on the returned payment data.
704
+ *
705
+ * @default false
706
+ */
707
+ assuranceDetailsRequired?: boolean;
708
+ /**
709
+ * Set to `true` to request assuranceDetails.
710
+ *
711
+ * If omitted, defaults to `false`.
712
+ *
713
+ * You may set if you need object provides information about the validation performed on the returned payment data.
714
+ *
715
+ * @default false
716
+ */
717
+ billingAddressRequired?: boolean;
718
+
719
+ /**
720
+ * Optional billing address parameters for the returned billing address.
721
+ */
722
+ billingAddressParameters?: google.payments.api.BillingAddressParameters;
723
+ }
724
+
725
+ export interface GooglePayButtonOptions extends GooglePayRequestOptions, ElementOptions {
726
+ /**
727
+ * The payment intent id you would like to checkout
728
+ * Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
729
+ *
730
+ */
731
+ intent_id: string;
732
+ /**
733
+ * This should be the client_secret of the intent
734
+ */
735
+ client_secret: string;
736
+ /**
737
+ * Indicate the amount and currency of the intent.
738
+ */
739
+ amount: {
740
+ value: number;
741
+ currency: string;
742
+ };
743
+ /**
744
+ * Indicate whether to capture immediate when authentication success
745
+ */
746
+ autoCapture?: boolean;
747
+ /**
748
+ * Container for authentication form, it's an element id
749
+ */
750
+ authFormContainer?: string;
751
+ }
561
752
 
562
753
  export interface ApplePayRequestOptions extends ApplePayRequestOriginalOptions {
563
754
  /**
@@ -638,7 +829,7 @@ export interface PaymentRequestButtonOptions extends ElementOptions {
638
829
  */
639
830
  shippingOptions?: Array<PaymentShippingOption>;
640
831
  /**
641
- * Container for authentication form
832
+ * Container for authentication form, it's an element id
642
833
  */
643
834
  authFormContainer?: string;
644
835
  }
@@ -724,6 +915,8 @@ export interface Element {
724
915
  | WechatElementOptions
725
916
  | QrcodeElementOptions
726
917
  | RedirectElementOptions
918
+ | ApplePayButtonOptions
919
+ | GooglePayButtonOptions
727
920
  | PaymentRequestButtonOptions,
728
921
  ): void;
729
922
  }