airwallex-payment-elements 1.45.0 → 1.62.0

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,24 +1,24 @@
1
1
  /**
2
- * The payment intent you would like to checkout
2
+ * The Payment Intent you would like to checkout.
3
3
  * Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
4
4
  *
5
5
  * ***Hint***:
6
- * This interface only contain the necessary information when shopper checkout
7
- * For the detail meaning of each field you can refer to above api document
6
+ * This interface only contains information necessary for a checkout via UI elements.
7
+ * For detailed information on each field refer to the API Reference.
8
8
  */
9
9
  import { Billing } from './airwallex';
10
10
 
11
11
  export interface Intent {
12
12
  /**
13
- * Id of intent
13
+ * The ID of the Paymnent Intent.
14
14
  */
15
15
  id: string;
16
16
  /**
17
- * client_secret of intent
17
+ * The `client_secret` of the Payment Intent when Payment Intent is provided. Otherwise, this should be the `client_secret` of the Customer object.
18
18
  */
19
19
  client_secret?: string;
20
20
  /**
21
- * Your request id when create payment intent
21
+ * Unique request ID specified by the merchant.
22
22
  */
23
23
  request_id?: string;
24
24
  amount?: number;
@@ -70,7 +70,7 @@ export interface Intent {
70
70
  }
71
71
 
72
72
  /**
73
- * Interface for paymentmethod which will return to merchant, trigger by method call with createPaymentConsent
73
+ * Interface for Payment Method returned to the merchant when provided in createPaymentConsent.
74
74
  * Refer to the type description: https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Methods/_api_v1_pa_payment_methods_create/post
75
75
  */
76
76
  export interface PaymentMethodBasicInfo {
@@ -3,24 +3,25 @@ import { Mode, RecurringOptions, Billing, AuthorizationType } from './airwallex'
3
3
  import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions, ContactField, LPMFlows } from './element';
4
4
 
5
5
  /**
6
- * Apply to dropIn element type integration, interface used when call createElement with type `dropIn`
6
+ * Apply to dropIn element type integration, interface used when createElement called with type `dropIn`
7
7
  */
8
8
  export interface DropInElementOptions extends ElementOptions {
9
9
  /**
10
- * If the intent provided, this should be the client_secret of the intent
11
- * If no intent provided, this should be the client_secret of the customer
10
+ * The `client_secret` of the Payment Intent when Payment Intent is provided. Otherwise, this should be the `client_secret` of the Customer object.
12
11
  */
13
12
  client_secret: string;
14
13
  /**
15
- * Currency of your payment intent or consent. Three-letter ISO currency code
14
+ * The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent.
16
15
  */
17
16
  currency: string;
18
17
  /**
19
- * The connected account associated with the payment when you are using Payments for Platforms. You should specify the specific connected account if you want to use its information to process the payment. This includes the statement descriptor displayed on the shopper's credit card or bank statement. The shopper will also see the available payment methods activated by the connected account.
18
+ * When using Payments for Platforms, specify the ID of the connected account associated with the payment if you want to use its information to process the payment.
19
+ * For example, the statement descriptor displayed on the shopper's credit card or bank statement and the payment methods activated by the connected account.
20
+ *
20
21
  */
21
22
  platformConnectedAccount?: string;
22
23
  /**
23
- * Checkout mode, can be one of payment, recurring
24
+ * The checkout mode for the shopper, `payment` or `recurring`.
24
25
  * @default payment
25
26
  */
26
27
  mode?: Mode;
@@ -30,34 +31,40 @@ export interface DropInElementOptions extends ElementOptions {
30
31
  */
31
32
  components?: Array<PaymentMethodType>;
32
33
  /**
33
- * The payment methods your website would like to integrate with
34
+ * The payment methods your website would like to integrate with.
34
35
  */
35
36
  methods?: Array<PaymentMethodType>;
36
37
  /**
37
- * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
38
+ * Whether the amount should be captured automatically upon successful payment authorization.
39
+ * Set it to `false` if you want to place a hold on the payment method and capture the funds sometime later.
38
40
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
39
41
  */
40
42
  autoCapture?: boolean;
41
43
  /**
42
- * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
44
+ * The authorization type for the card payment. Options include: `pre_auth`, `final_auth`.
45
+ * Defaults to `final_auth` to enable funds to be captured immediately after successful authorization.
46
+ * Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days, i.e., extend the authorization time window.
47
+ * Currently `pre_auth` is only available when the card brand is Visa or Mastercard. You should also set `autoCapture` to `false` if you want to enable `pre_auth`.
43
48
  * @defaultValue `final_auth`
44
49
  */
45
50
  authorizationType?: AuthorizationType;
46
51
  /**
47
- * The options of wechatpay
52
+ * Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
53
+ */
54
+ cvcRequired?: boolean;
55
+ /**
56
+ * The options for Wechat Pay.
48
57
  */
49
58
  wechatpay?: {
50
59
  desktopFlow?: LPMFlows;
51
60
  mobileFlow?: LPMFlows;
52
61
  };
53
62
  /**
54
- * The options of apple pay
55
- * If you want to integrate with apple pay, you need to provide the following options
63
+ * Checkout configuration options for Apple Pay.
56
64
  */
57
65
  applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
58
66
  /**
59
- * The options of apple pay
60
- * If you want to integrate with apple pay, you need to provide the following options
67
+ * Checkout configuration options for Google Pay.
61
68
  */
62
69
  googlePayRequestOptions?: GooglePayRequestOptions;
63
70
  /**
@@ -70,50 +77,50 @@ export interface DropInElementOptions extends ElementOptions {
70
77
  */
71
78
  requiredBillingContactFields?: ContactField[];
72
79
  /**
73
- * Style for dropIn element
80
+ * Style for the dropIn element.
74
81
  */
75
82
  style?: BoxStyle;
76
83
  /**
77
- * Container for authentication form, it's an element id
84
+ * The container ID of the authentication form used in 3D Secure authentication.
78
85
  */
79
86
  authFormContainer?: string;
80
87
  /**
81
- * The payment intent id you would like to checkout, it's required when mode is `payment`
88
+ * The ID of the Payment Intent you would like to checkout. Required when `mode` is `payment`.
82
89
  */
83
90
  intent_id?: string;
84
91
  /**
85
- * Checkout for know customer, refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Customers/Intro)
92
+ * The ID of the Customer used in registered user checkout. Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Customers/Intro)
93
+ * This field is required when `mode` is `recurring`.
86
94
  */
87
95
  customer_id?: string;
88
96
  /**
89
- * The options of recurring flow
97
+ * Options for recurring flow.
90
98
  */
91
99
  recurringOptions?: RecurringOptions;
92
100
  /**
93
- * The 2-letter ISO country code from which the consumer will be paying
94
- * If you want to integrate with `bank_transfer` payment method, it would be required
101
+ * The two-letter ISO country code of the shopper's country. This is required for `bank_transfer`, `online_banking`, `skrill` or `seven_eleven` payment methods.
95
102
  */
96
103
  country_code?: string;
97
104
  /**
98
- * Customer name - minimum of 3 characters, up to 100 characters
105
+ * The shopper's full name.
99
106
  */
100
107
  shopper_name?: string;
101
108
  /**
102
- * Customer phone
109
+ * The shoppers's phone number.
103
110
  */
104
111
  shopper_phone?: string;
105
112
  /**
106
- * Customer email
113
+ * The shoppers's email address.
107
114
  */
108
115
  shopper_email?: string;
109
116
  /**
110
- * Billing info from merchant
111
- * This option would override the user input billing fields, so don't set withBilling and requiredBillingContactFields when you use this option
117
+ * Billing information provided by the merchant.
118
+ * This option overrides the billing information from the shopper as provided in the input billing fields. Do not sett `withBilling` and `requiredBillingContactFields` when you use this option.
112
119
  */
113
120
  billing?: Billing;
114
121
 
115
122
  /**
116
- * Customize DropIn Element Style
123
+ * Customize DropIn Element style.
117
124
  */
118
125
  theme?: {
119
126
  palette?: {