@stripe/stripe-js 4.3.0 → 4.5.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.
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "4.2.0",
45
+ version: "4.4.0",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/dist/index.mjs CHANGED
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "4.2.0",
41
+ version: "4.4.0",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/dist/pure.js CHANGED
@@ -58,7 +58,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
58
58
 
59
59
  stripe._registerWrapper({
60
60
  name: 'stripe-js',
61
- version: "4.2.0",
61
+ version: "4.4.0",
62
62
  startTime: startTime
63
63
  });
64
64
  };
package/dist/pure.mjs CHANGED
@@ -54,7 +54,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
54
54
 
55
55
  stripe._registerWrapper({
56
56
  name: 'stripe-js',
57
- version: "4.2.0",
57
+ version: "4.4.0",
58
58
  startTime: startTime
59
59
  });
60
60
  };
@@ -189,7 +189,12 @@ export type StripeExpressCheckoutElement = StripeElementBase & {
189
189
  ): StripeExpressCheckoutElement;
190
190
  };
191
191
 
192
- export type ExpressPaymentType = 'google_pay' | 'apple_pay' | 'link' | 'paypal';
192
+ export type ExpressPaymentType =
193
+ | 'google_pay'
194
+ | 'apple_pay'
195
+ | 'amazon_pay'
196
+ | 'link'
197
+ | 'paypal';
193
198
 
194
199
  export type ExpressCheckoutPartialAddress = {
195
200
  city: string;
@@ -189,7 +189,12 @@ export type StripeExpressCheckoutElement = StripeElementBase & {
189
189
  ): StripeExpressCheckoutElement;
190
190
  };
191
191
 
192
- export type ExpressPaymentType = 'google_pay' | 'apple_pay' | 'link' | 'paypal';
192
+ export type ExpressPaymentType =
193
+ | 'google_pay'
194
+ | 'apple_pay'
195
+ | 'amazon_pay'
196
+ | 'link'
197
+ | 'paypal';
193
198
 
194
199
  export type ExpressCheckoutPartialAddress = {
195
200
  city: string;
@@ -55,7 +55,13 @@ export interface StripePaymentMethodMessagingElementOptions {
55
55
  /**
56
56
  * Payment methods to show messaging for.
57
57
  */
58
- paymentMethodTypes: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
58
+ paymentMethodTypes?: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
59
+
60
+ /**
61
+ * Override the order in which payment methods are displayed in the Payment Method Messaging Element.
62
+ * By default, the Payment Method Messaging Element will use a dynamic ordering that optimizes payment method display for each user.
63
+ */
64
+ paymentMethodOrder?: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
59
65
 
60
66
  /**
61
67
  * @deprecated Use `paymentMethodTypes` instead.
@@ -89,9 +95,6 @@ export interface StripePaymentMethodMessagingElementOptions {
89
95
  */
90
96
  logoColor?: 'black' | 'white' | 'color';
91
97
 
92
- /**
93
- * The font size of the promotional message.
94
- */
95
98
  metaData?: {
96
99
  messagingClientReferenceId: string | null;
97
100
  };
@@ -55,7 +55,13 @@ export interface StripePaymentMethodMessagingElementOptions {
55
55
  /**
56
56
  * Payment methods to show messaging for.
57
57
  */
58
- paymentMethodTypes: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
58
+ paymentMethodTypes?: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
59
+
60
+ /**
61
+ * Override the order in which payment methods are displayed in the Payment Method Messaging Element.
62
+ * By default, the Payment Method Messaging Element will use a dynamic ordering that optimizes payment method display for each user.
63
+ */
64
+ paymentMethodOrder?: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>;
59
65
 
60
66
  /**
61
67
  * @deprecated Use `paymentMethodTypes` instead.
@@ -89,9 +95,6 @@ export interface StripePaymentMethodMessagingElementOptions {
89
95
  */
90
96
  logoColor?: 'black' | 'white' | 'color';
91
97
 
92
- /**
93
- * The font size of the promotional message.
94
- */
95
98
  metaData?: {
96
99
  messagingClientReferenceId: string | null;
97
100
  };
@@ -1,6 +1,7 @@
1
1
  import {StripeElementBase} from './base';
2
2
  import {StripeError} from '../stripe';
3
3
  import {ApplePayOption} from './apple-pay';
4
+ import {CardNetworkBrand} from '../elements-group';
4
5
 
5
6
  export type StripePaymentElement = StripeElementBase & {
6
7
  /**
@@ -141,6 +142,9 @@ export interface DefaultValuesOption {
141
142
  line2?: string;
142
143
  };
143
144
  };
145
+ card?: {
146
+ network?: CardNetworkBrand[];
147
+ };
144
148
  }
145
149
 
146
150
  export type FieldOption = 'auto' | 'never';
@@ -1,6 +1,7 @@
1
1
  import {StripeElementBase} from './base';
2
2
  import {StripeError} from '../stripe';
3
3
  import {ApplePayOption} from './apple-pay';
4
+ import {CardNetworkBrand} from '../elements-group';
4
5
 
5
6
  export type StripePaymentElement = StripeElementBase & {
6
7
  /**
@@ -141,6 +142,9 @@ export interface DefaultValuesOption {
141
142
  line2?: string;
142
143
  };
143
144
  };
145
+ card?: {
146
+ network?: CardNetworkBrand[];
147
+ };
144
148
  }
145
149
 
146
150
  export type FieldOption = 'auto' | 'never';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",