@stripe/stripe-js 8.0.0 → 8.2.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
@@ -55,7 +55,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
55
55
 
56
56
  stripe._registerWrapper({
57
57
  name: 'stripe-js',
58
- version: "8.0.0",
58
+ version: "8.2.0",
59
59
  startTime: startTime
60
60
  });
61
61
  };
@@ -151,7 +151,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
151
151
  var expectedVersion = RELEASE_TRAIN;
152
152
 
153
153
  if (isTestKey && version !== expectedVersion) {
154
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.0.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
154
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
155
155
  }
156
156
 
157
157
  var stripe = maybeStripe.apply(undefined, args);
package/dist/index.mjs CHANGED
@@ -51,7 +51,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
51
51
 
52
52
  stripe._registerWrapper({
53
53
  name: 'stripe-js',
54
- version: "8.0.0",
54
+ version: "8.2.0",
55
55
  startTime: startTime
56
56
  });
57
57
  };
@@ -147,7 +147,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
147
147
  var expectedVersion = RELEASE_TRAIN;
148
148
 
149
149
  if (isTestKey && version !== expectedVersion) {
150
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.0.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
150
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
151
151
  }
152
152
 
153
153
  var stripe = maybeStripe.apply(undefined, args);
package/dist/pure.js CHANGED
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
71
71
 
72
72
  stripe._registerWrapper({
73
73
  name: 'stripe-js',
74
- version: "8.0.0",
74
+ version: "8.2.0",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -167,7 +167,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
167
167
  var expectedVersion = RELEASE_TRAIN;
168
168
 
169
169
  if (isTestKey && version !== expectedVersion) {
170
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.0.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
170
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
171
  }
172
172
 
173
173
  var stripe = maybeStripe.apply(undefined, args);
package/dist/pure.mjs CHANGED
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
67
67
 
68
68
  stripe._registerWrapper({
69
69
  name: 'stripe-js',
70
- version: "8.0.0",
70
+ version: "8.2.0",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -163,7 +163,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
163
163
  var expectedVersion = RELEASE_TRAIN;
164
164
 
165
165
  if (isTestKey && version !== expectedVersion) {
166
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.0.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
166
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.2.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
167
167
  }
168
168
 
169
169
  var stripe = maybeStripe.apply(undefined, args);
@@ -617,7 +617,7 @@ export interface StripeCheckout {
617
617
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
618
618
  /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
619
619
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
620
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
621
621
  getTaxIdElement(): StripeTaxIdElement | null;
622
622
  createPaymentElement(
623
623
  options?: StripeCheckoutPaymentElementOptions
@@ -633,6 +633,6 @@ export interface StripeCheckout {
633
633
  ): StripeCheckoutExpressCheckoutElement;
634
634
  /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
635
635
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
636
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
636
+ /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
637
637
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
638
638
  }
@@ -617,7 +617,7 @@ export interface StripeCheckout {
617
617
  getExpressCheckoutElement(): StripeCheckoutExpressCheckoutElement | null;
618
618
  /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
619
619
  getCurrencySelectorElement(): StripeCurrencySelectorElement | null;
620
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
620
+ /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
621
621
  getTaxIdElement(): StripeTaxIdElement | null;
622
622
  createPaymentElement(
623
623
  options?: StripeCheckoutPaymentElementOptions
@@ -633,6 +633,6 @@ export interface StripeCheckout {
633
633
  ): StripeCheckoutExpressCheckoutElement;
634
634
  /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
635
635
  createCurrencySelectorElement(): StripeCurrencySelectorElement;
636
- /* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
636
+ /* Requires beta header when initializing Stripe: @docs https://docs.stripe.com/tax/advanced/tax-ids?payment-ui=embedded-components#render-tax-id-element */
637
637
  createTaxIdElement(options?: StripeTaxIdElementOptions): StripeTaxIdElement;
638
638
  }
@@ -227,6 +227,12 @@ export interface LayoutObject {
227
227
  radios?: boolean;
228
228
  spacedAccordionItems?: boolean;
229
229
  visibleAccordionItemsCount?: number;
230
+ /**
231
+ * The position of the payment method logo in each accordion item.
232
+ *
233
+ * By default, the logo is displayed at the start of each accordion item.
234
+ */
235
+ paymentMethodLogoPosition?: 'start' | 'end';
230
236
  }
231
237
 
232
238
  export interface StripePaymentElementOptions {
@@ -227,6 +227,12 @@ export interface LayoutObject {
227
227
  radios?: boolean;
228
228
  spacedAccordionItems?: boolean;
229
229
  visibleAccordionItemsCount?: number;
230
+ /**
231
+ * The position of the payment method logo in each accordion item.
232
+ *
233
+ * By default, the logo is displayed at the start of each accordion item.
234
+ */
235
+ paymentMethodLogoPosition?: 'start' | 'end';
230
236
  }
231
237
 
232
238
  export interface StripePaymentElementOptions {
@@ -587,11 +587,6 @@ export interface StripeElementsOptionsClientSecret
587
587
  }
588
588
 
589
589
  interface StripeElementsOptionsModeBase extends BaseStripeElementsOptions {
590
- /**
591
- * Three character currency code (e.g., usd).
592
- */
593
- currency: string;
594
-
595
590
  /**
596
591
  * Indicates that you intend to make future payments with this PaymentIntent’s payment method.
597
592
  *
@@ -717,6 +712,10 @@ type StripeElementsOptionsModePayment = StripeElementsOptionsModeBase & {
717
712
  * The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
718
713
  */
719
714
  amount: number;
715
+ /**
716
+ * Three character currency code (e.g., usd).
717
+ */
718
+ currency: string;
720
719
  };
721
720
 
722
721
  type StripeElementsOptionsModeSubscription = StripeElementsOptionsModeBase & {
@@ -726,10 +725,21 @@ type StripeElementsOptionsModeSubscription = StripeElementsOptionsModeBase & {
726
725
  * The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
727
726
  */
728
727
  amount: number;
728
+ /**
729
+ * Three character currency code (e.g., usd).
730
+ */
731
+ currency: string;
729
732
  };
730
733
 
731
734
  type StripeElementsOptionsModeSetup = StripeElementsOptionsModeBase & {
732
735
  mode: 'setup';
736
+ /**
737
+ * Three character currency code (e.g., usd).
738
+ *
739
+ * Required when creating SetupIntents with dynamic payment methods.
740
+ * Payment Element renders the payment methods enabled in the Stripe Dashboard that support the provided currency.
741
+ */
742
+ currency?: string;
733
743
  };
734
744
 
735
745
  export type StripeElementsOptionsMode =
@@ -587,11 +587,6 @@ export interface StripeElementsOptionsClientSecret
587
587
  }
588
588
 
589
589
  interface StripeElementsOptionsModeBase extends BaseStripeElementsOptions {
590
- /**
591
- * Three character currency code (e.g., usd).
592
- */
593
- currency: string;
594
-
595
590
  /**
596
591
  * Indicates that you intend to make future payments with this PaymentIntent’s payment method.
597
592
  *
@@ -717,6 +712,10 @@ type StripeElementsOptionsModePayment = StripeElementsOptionsModeBase & {
717
712
  * The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
718
713
  */
719
714
  amount: number;
715
+ /**
716
+ * Three character currency code (e.g., usd).
717
+ */
718
+ currency: string;
720
719
  };
721
720
 
722
721
  type StripeElementsOptionsModeSubscription = StripeElementsOptionsModeBase & {
@@ -726,10 +725,21 @@ type StripeElementsOptionsModeSubscription = StripeElementsOptionsModeBase & {
726
725
  * The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
727
726
  */
728
727
  amount: number;
728
+ /**
729
+ * Three character currency code (e.g., usd).
730
+ */
731
+ currency: string;
729
732
  };
730
733
 
731
734
  type StripeElementsOptionsModeSetup = StripeElementsOptionsModeBase & {
732
735
  mode: 'setup';
736
+ /**
737
+ * Three character currency code (e.g., usd).
738
+ *
739
+ * Required when creating SetupIntents with dynamic payment methods.
740
+ * Payment Element renders the payment methods enabled in the Stripe Dashboard that support the provided currency.
741
+ */
742
+ currency?: string;
733
743
  };
734
744
 
735
745
  export type StripeElementsOptionsMode =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "8.0.0",
3
+ "version": "8.2.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",