@stripe/stripe-js 9.3.1 → 9.4.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.d.mts CHANGED
@@ -3,7 +3,7 @@ export * from './stripe-js';
3
3
 
4
4
  import {StripeConstructor} from './stripe-js';
5
5
 
6
- export {loadStripe} from './shared';
6
+ export {loadStripe, ReleaseTrain} from './shared';
7
7
 
8
8
  declare global {
9
9
  interface Window {
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export * from './stripe-js';
3
3
 
4
4
  import {StripeConstructor} from './stripe-js';
5
5
 
6
- export {loadStripe} from './shared';
6
+ export {loadStripe, ReleaseTrain} from './shared';
7
7
 
8
8
  declare global {
9
9
  interface Window {
package/dist/index.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: "9.3.1",
74
+ version: "9.4.0",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
172
172
  var expectedVersion = RELEASE_TRAIN;
173
173
 
174
174
  if (isTestKey && version !== expectedVersion) {
175
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.3.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
175
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
176
176
  }
177
177
 
178
178
  var stripe = maybeStripe.apply(undefined, args);
package/dist/index.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: "9.3.1",
70
+ version: "9.4.0",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
168
168
  var expectedVersion = RELEASE_TRAIN;
169
169
 
170
170
  if (isTestKey && version !== expectedVersion) {
171
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.3.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
172
172
  }
173
173
 
174
174
  var stripe = maybeStripe.apply(undefined, args);
package/dist/pure.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import {loadStripe as _loadStripe} from './shared';
2
2
 
3
+ export {ReleaseTrain} from './shared';
4
+
3
5
  export const loadStripe: typeof _loadStripe & {
4
6
  setLoadParameters: (params: {advancedFraudSignals: boolean}) => void;
5
7
  };
package/dist/pure.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import {loadStripe as _loadStripe} from './shared';
2
2
 
3
+ export {ReleaseTrain} from './shared';
4
+
3
5
  export const loadStripe: typeof _loadStripe & {
4
6
  setLoadParameters: (params: {advancedFraudSignals: boolean}) => void;
5
7
  };
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: "9.3.1",
74
+ version: "9.4.0",
75
75
  startTime: startTime
76
76
  });
77
77
  };
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
172
172
  var expectedVersion = RELEASE_TRAIN;
173
173
 
174
174
  if (isTestKey && version !== expectedVersion) {
175
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.3.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
175
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
176
176
  }
177
177
 
178
178
  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: "9.3.1",
70
+ version: "9.4.0",
71
71
  startTime: startTime
72
72
  });
73
73
  };
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
168
168
  var expectedVersion = RELEASE_TRAIN;
169
169
 
170
170
  if (isTestKey && version !== expectedVersion) {
171
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.3.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
171
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
172
172
  }
173
173
 
174
174
  var stripe = maybeStripe.apply(undefined, args);
package/dist/shared.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import {StripeConstructorOptions, Stripe} from './stripe-js';
2
2
 
3
+ export type ReleaseTrain = 'dahlia';
4
+
3
5
  export const loadStripe: (
4
6
  publishableKey: string,
5
7
  options?: StripeConstructorOptions | undefined
package/dist/shared.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import {StripeConstructorOptions, Stripe} from './stripe-js';
2
2
 
3
+ export type ReleaseTrain = 'dahlia';
4
+
3
5
  export const loadStripe: (
4
6
  publishableKey: string,
5
7
  options?: StripeConstructorOptions | undefined
@@ -674,6 +674,19 @@ export interface Stripe {
674
674
  clientSecret: string;
675
675
  }): Promise<PaymentIntentOrSetupIntentResult>;
676
676
 
677
+ /**
678
+ * On your client, display the next action flow. Stripe automatically displays the authentication
679
+ * user interface in a pop-up modal when you call `handleNextAction`.
680
+ *
681
+ * Use `stripe.handleNextAction` to handle the required next action when a SharedPaymentToken
682
+ * has a `requires_action` status.
683
+ *
684
+ * @docs https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens?agent-seller=agent#handle-next-actions
685
+ */
686
+ handleNextAction(options: {
687
+ hashedValue: string;
688
+ }): Promise<PaymentIntentOrSetupIntentResult>;
689
+
677
690
  /**
678
691
  * Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
679
692
  * to verify a customer's bank account with micro-deposits.
@@ -674,6 +674,19 @@ export interface Stripe {
674
674
  clientSecret: string;
675
675
  }): Promise<PaymentIntentOrSetupIntentResult>;
676
676
 
677
+ /**
678
+ * On your client, display the next action flow. Stripe automatically displays the authentication
679
+ * user interface in a pop-up modal when you call `handleNextAction`.
680
+ *
681
+ * Use `stripe.handleNextAction` to handle the required next action when a SharedPaymentToken
682
+ * has a `requires_action` status.
683
+ *
684
+ * @docs https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens?agent-seller=agent#handle-next-actions
685
+ */
686
+ handleNextAction(options: {
687
+ hashedValue: string;
688
+ }): Promise<PaymentIntentOrSetupIntentResult>;
689
+
677
690
  /**
678
691
  * Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
679
692
  * to verify a customer's bank account with micro-deposits.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "9.3.1",
3
+ "version": "9.4.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "lib/index.js",
package/src/shared.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {Stripe, StripeConstructor} from '../types';
1
+ import {Stripe, StripeConstructor, ReleaseTrain} from '../types';
2
2
 
3
3
  export type LoadStripe = (
4
4
  ...args: Parameters<StripeConstructor>
@@ -12,7 +12,7 @@ export interface LoadParams {
12
12
  // containing the package.json version
13
13
  declare const _VERSION: string;
14
14
 
15
- export const RELEASE_TRAIN = 'dahlia';
15
+ export const RELEASE_TRAIN: ReleaseTrain = 'dahlia';
16
16
 
17
17
  const runtimeVersionToUrlVersion = (version: string | number) =>
18
18
  version === 3 ? 'v3' : version;