@stripe/connect-js 3.4.3 → 3.4.4-preview-1

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,4 +1,4 @@
1
- export declare const connectElementTagNames: readonly ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
1
+ export declare const connectElementTagNames: readonly ["payments", "payouts", "payment-details", "payment-disputes", "disputes-list", "account-onboarding", "payment-method-settings", "account-management", "notification-banner", "instant-payouts", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "recipients", "capital-financing", "capital-financing-application", "capital-financing-promotion", "capital-overview", "documents", "product-tax-code-selector", "export-tax-transactions", "tax-registrations", "tax-settings", "tax-threshold-monitoring", "balances", "payouts-list", "payout-details", "app-install", "app-viewport", "reporting-chart", "check-scanning", "agentic-commerce-settings", "terminal-hardware-orders", "terminal-hardware-shop", "network-cost-passthrough-report", "balance-report", "payout-reconciliation-report", "recipients-list", "financial-accounts", "financial-accounts-transactions"];
2
2
  export type FetchEphemeralKeyFunction = (fetchParams: {
3
3
  issuingCard: string;
4
4
  nonce: string;
@@ -48,6 +48,10 @@ export type NotificationCount = {
48
48
  total: number;
49
49
  actionRequired: number;
50
50
  };
51
+ export type InstallState = {
52
+ appId: string;
53
+ state: "INSTALLED" | "UNINSTALLED";
54
+ };
51
55
  export type LoaderStart = {
52
56
  elementTagName: string;
53
57
  };
@@ -62,6 +66,14 @@ export type EmbeddedError = {
62
66
  type: EmbeddedErrorType;
63
67
  message?: string;
64
68
  };
69
+ export type FinancingProductType = {
70
+ productType: "standard" | "refill" | "none";
71
+ activeFinancingCount: number;
72
+ };
73
+ export type FinancingPromotionLayoutType = "full" | "banner";
74
+ export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
75
+ export type ReportName = "gross_volume" | "net_volume";
76
+ export type RecipientDataSource = "customers";
65
77
  export type EmbeddedErrorType =
66
78
  /**
67
79
  * Failure to connect to Stripe's API.
@@ -96,6 +108,19 @@ export declare const ConnectElementCommonMethodConfig: {
96
108
  setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
97
109
  };
98
110
  export declare const ConnectElementCustomMethodConfig: {
111
+ payments: {
112
+ setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
113
+ };
114
+ "payment-details": {
115
+ setPayment: (_payment: string | undefined) => void;
116
+ setOnClose: (_listener: (() => void) | undefined) => void;
117
+ };
118
+ "payment-disputes": {
119
+ setPayment: (_payment: string | undefined) => void;
120
+ setOnDisputesLoaded: (_listener: (({ total }: {
121
+ total: number;
122
+ }) => void) | undefined) => void;
123
+ };
99
124
  "account-onboarding": {
100
125
  setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
101
126
  setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
@@ -137,19 +162,52 @@ export declare const ConnectElementCustomMethodConfig: {
137
162
  "financial-account-transactions": {
138
163
  setFinancialAccount: (_financialAccount: string) => void;
139
164
  };
140
- payments: {
141
- setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
165
+ recipients: {
166
+ setDataSource: (_dataSource: RecipientDataSource) => void;
142
167
  };
143
- "payment-details": {
144
- setPayment: (_payment: string | undefined) => void;
145
- setOnClose: (_listener: (() => void) | undefined) => void;
168
+ "app-install": {
169
+ setApp: (_app: string | undefined) => void;
170
+ setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
171
+ setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
146
172
  };
147
- "payment-disputes": {
148
- setPayment: (_payment: string | undefined) => void;
149
- setOnDisputesLoaded: (_listener: (({ total }: {
173
+ "app-viewport": {
174
+ setApp: (_app: string | undefined) => void;
175
+ setAppData: (_appData: Record<string, string> | undefined) => void;
176
+ };
177
+ "payment-method-settings": {
178
+ setPaymentMethodConfiguration: (_paymentMethodConfiguration: string | undefined) => void;
179
+ };
180
+ "capital-financing": {
181
+ setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
182
+ setShowFinancingSelector: (_showFinancingSelector: boolean | undefined) => void;
183
+ setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
184
+ setSupportUrl: (_supportUrl: string | undefined) => void;
185
+ setOnFinancingsLoaded: (_listener: (({ total }: {
150
186
  total: number;
151
187
  }) => void) | undefined) => void;
152
188
  };
189
+ "capital-financing-application": {
190
+ setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
191
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
192
+ setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
193
+ setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
194
+ setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
195
+ };
196
+ "capital-financing-promotion": {
197
+ setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
198
+ setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
199
+ setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount, }: FinancingProductType) => void) | undefined) => void;
200
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
201
+ setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
202
+ setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
203
+ setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
204
+ };
205
+ "reporting-chart": {
206
+ setReportName: (_reportName: ReportName) => void;
207
+ setIntervalStart: (_intervalStart: Date | undefined) => void;
208
+ setIntervalEnd: (_intervalEnd: Date | undefined) => void;
209
+ setIntervalType: (_intervalType: IntervalType | undefined) => void;
210
+ };
153
211
  "tax-settings": {
154
212
  setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
155
213
  setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
@@ -166,10 +224,35 @@ export declare const ConnectElementCustomMethodConfig: {
166
224
  id: string;
167
225
  }) => void) | undefined) => void;
168
226
  };
227
+ "tax-threshold-monitoring": {
228
+ setDisplayCountries: (_countries: string[] | undefined) => void;
229
+ };
230
+ "product-tax-code-selector": {
231
+ setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
232
+ analyticsName: string;
233
+ } | null) => void) | undefined) => void;
234
+ setHideDescription: (_hideDescription: boolean | undefined) => void;
235
+ setDisabled: (_disabled: boolean | undefined) => void;
236
+ setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
237
+ };
238
+ "export-tax-transactions": {};
169
239
  "payout-details": {
170
240
  setPayout: (_payout: string | undefined) => void;
171
241
  setOnClose: (_listener: (() => void) | undefined) => void;
172
242
  };
243
+ "check-scanning": {
244
+ setHandleCheckScanSubmitted: (_handleCheckScanSubmitted: ({ checkScanToken, }: {
245
+ checkScanToken: string;
246
+ }) => Promise<void>) => void;
247
+ };
248
+ "agentic-commerce-settings": {
249
+ setOnAgreementUpdated: (_listener: (({ agreementId }: {
250
+ agreementId: string;
251
+ }) => void) | undefined) => void;
252
+ };
253
+ "terminal-hardware-shop": {
254
+ setOnCheckoutFinished: (_listener: (() => void) | undefined) => void;
255
+ };
173
256
  "payout-reconciliation-report": {
174
257
  setOnReportAvailabilityLoaded: (_listener: (({ isReportAvailable }: {
175
258
  isReportAvailable: boolean;
@@ -1,11 +1,22 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  // Source of truth for the entire list of components. When you add a new component, it should be added here.
3
- const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
3
+ const connectElementTagNames = ["payments", "payouts", "payment-details", "payment-disputes", "disputes-list", "account-onboarding", "payment-method-settings", "account-management", "notification-banner", "instant-payouts", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "recipients", "capital-financing", "capital-financing-application", "capital-financing-promotion", "capital-overview", "documents", "product-tax-code-selector", "export-tax-transactions", "tax-registrations", "tax-settings", "tax-threshold-monitoring", "balances", "payouts-list", "payout-details", "app-install", "app-viewport", "reporting-chart", "check-scanning", "agentic-commerce-settings", "terminal-hardware-orders", "terminal-hardware-shop", "network-cost-passthrough-report", "balance-report", "payout-reconciliation-report", "recipients-list", "financial-accounts", "financial-accounts-transactions"];
4
4
  const ConnectElementCommonMethodConfig = {
5
5
  setOnLoadError: _listener => {},
6
6
  setOnLoaderStart: _listener => {}
7
7
  };
8
8
  const ConnectElementCustomMethodConfig = {
9
+ payments: {
10
+ setDefaultFilters: _filters => {}
11
+ },
12
+ "payment-details": {
13
+ setPayment: _payment => {},
14
+ setOnClose: _listener => {}
15
+ },
16
+ "payment-disputes": {
17
+ setPayment: _payment => {},
18
+ setOnDisputesLoaded: _listener => {}
19
+ },
9
20
  "account-onboarding": {
10
21
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
11
22
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -43,16 +54,49 @@ const ConnectElementCustomMethodConfig = {
43
54
  "financial-account-transactions": {
44
55
  setFinancialAccount: _financialAccount => {}
45
56
  },
46
- payments: {
47
- setDefaultFilters: _filters => {}
57
+ recipients: {
58
+ setDataSource: _dataSource => {}
48
59
  },
49
- "payment-details": {
50
- setPayment: _payment => {},
51
- setOnClose: _listener => {}
60
+ "app-install": {
61
+ setApp: _app => {},
62
+ setOnAppInstallStateFetched: _listener => {},
63
+ setOnAppInstallStateChanged: _listener => {}
52
64
  },
53
- "payment-disputes": {
54
- setPayment: _payment => {},
55
- setOnDisputesLoaded: _listener => {}
65
+ "app-viewport": {
66
+ setApp: _app => {},
67
+ setAppData: _appData => {}
68
+ },
69
+ "payment-method-settings": {
70
+ setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
71
+ },
72
+ "capital-financing": {
73
+ setDefaultFinancingOffer: _defaultFinancingOffer => {},
74
+ setShowFinancingSelector: _showFinancingSelector => {},
75
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
76
+ setSupportUrl: _supportUrl => {},
77
+ setOnFinancingsLoaded: _listener => {}
78
+ },
79
+ "capital-financing-application": {
80
+ setOnApplicationSubmitted: _listener => {},
81
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
82
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
83
+ setOnApplicationStepChange: _listener => {},
84
+ setDefaultFinancingOffer: _defaultFinancingOffer => {}
85
+ },
86
+ "capital-financing-promotion": {
87
+ setLayout: _layout => {},
88
+ setOnApplicationSubmitted: _listener => {},
89
+ setOnEligibleFinancingOfferLoaded: _listener => {},
90
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
91
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
92
+ setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
93
+ setOnApplicationStepChange: _listener => {}
94
+ },
95
+ "reporting-chart": {
96
+ setReportName: _reportName => {},
97
+ setIntervalStart: _intervalStart => {},
98
+ setIntervalEnd: _intervalEnd => {},
99
+ setIntervalType: _intervalType => {}
56
100
  },
57
101
  "tax-settings": {
58
102
  setHideProductTaxCodeSelector: _hidden => {},
@@ -64,10 +108,29 @@ const ConnectElementCustomMethodConfig = {
64
108
  setDisplayCountries: _countries => {},
65
109
  setOnAfterTaxRegistrationExpired: _listener => {}
66
110
  },
111
+ "tax-threshold-monitoring": {
112
+ setDisplayCountries: _countries => {}
113
+ },
114
+ "product-tax-code-selector": {
115
+ setOnTaxCodeSelect: _listener => {},
116
+ setHideDescription: _hideDescription => {},
117
+ setDisabled: _disabled => {},
118
+ setInitialTaxCode: _initialTaxCode => {}
119
+ },
120
+ "export-tax-transactions": {},
67
121
  "payout-details": {
68
122
  setPayout: _payout => {},
69
123
  setOnClose: _listener => {}
70
124
  },
125
+ "check-scanning": {
126
+ setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
127
+ },
128
+ "agentic-commerce-settings": {
129
+ setOnAgreementUpdated: _listener => {}
130
+ },
131
+ "terminal-hardware-shop": {
132
+ setOnCheckoutFinished: _listener => {}
133
+ },
71
134
  "payout-reconciliation-report": {
72
135
  setOnReportAvailabilityLoaded: _listener => {}
73
136
  }
@@ -173,7 +236,7 @@ const initStripeConnect = (stripePromise, initParams) => {
173
236
  element[method] = function (value) {
174
237
  stripeConnectInstance.then(() => {
175
238
  if (!this[`${method}InternalOnly`]) {
176
- throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.3`);
239
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.4-preview-1`);
177
240
  }
178
241
  this[`${method}InternalOnly`](value);
179
242
  });
@@ -227,7 +290,7 @@ const createWrapper = stripeConnect => {
227
290
  sdk: true,
228
291
  sdkOptions: {
229
292
  // This will be replaced by the npm package version when bundling
230
- sdkVersion: "3.4.3"
293
+ sdkVersion: "3.4.4-preview-1"
231
294
  }
232
295
  })
233
296
  }));
package/dist/connect.js CHANGED
@@ -4,12 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  // Source of truth for the entire list of components. When you add a new component, it should be added here.
7
- const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
7
+ const connectElementTagNames = ["payments", "payouts", "payment-details", "payment-disputes", "disputes-list", "account-onboarding", "payment-method-settings", "account-management", "notification-banner", "instant-payouts", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "recipients", "capital-financing", "capital-financing-application", "capital-financing-promotion", "capital-overview", "documents", "product-tax-code-selector", "export-tax-transactions", "tax-registrations", "tax-settings", "tax-threshold-monitoring", "balances", "payouts-list", "payout-details", "app-install", "app-viewport", "reporting-chart", "check-scanning", "agentic-commerce-settings", "terminal-hardware-orders", "terminal-hardware-shop", "network-cost-passthrough-report", "balance-report", "payout-reconciliation-report", "recipients-list", "financial-accounts", "financial-accounts-transactions"];
8
8
  const ConnectElementCommonMethodConfig = {
9
9
  setOnLoadError: _listener => {},
10
10
  setOnLoaderStart: _listener => {}
11
11
  };
12
12
  const ConnectElementCustomMethodConfig = {
13
+ payments: {
14
+ setDefaultFilters: _filters => {}
15
+ },
16
+ "payment-details": {
17
+ setPayment: _payment => {},
18
+ setOnClose: _listener => {}
19
+ },
20
+ "payment-disputes": {
21
+ setPayment: _payment => {},
22
+ setOnDisputesLoaded: _listener => {}
23
+ },
13
24
  "account-onboarding": {
14
25
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
15
26
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -47,16 +58,49 @@ const ConnectElementCustomMethodConfig = {
47
58
  "financial-account-transactions": {
48
59
  setFinancialAccount: _financialAccount => {}
49
60
  },
50
- payments: {
51
- setDefaultFilters: _filters => {}
61
+ recipients: {
62
+ setDataSource: _dataSource => {}
52
63
  },
53
- "payment-details": {
54
- setPayment: _payment => {},
55
- setOnClose: _listener => {}
64
+ "app-install": {
65
+ setApp: _app => {},
66
+ setOnAppInstallStateFetched: _listener => {},
67
+ setOnAppInstallStateChanged: _listener => {}
56
68
  },
57
- "payment-disputes": {
58
- setPayment: _payment => {},
59
- setOnDisputesLoaded: _listener => {}
69
+ "app-viewport": {
70
+ setApp: _app => {},
71
+ setAppData: _appData => {}
72
+ },
73
+ "payment-method-settings": {
74
+ setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
75
+ },
76
+ "capital-financing": {
77
+ setDefaultFinancingOffer: _defaultFinancingOffer => {},
78
+ setShowFinancingSelector: _showFinancingSelector => {},
79
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
80
+ setSupportUrl: _supportUrl => {},
81
+ setOnFinancingsLoaded: _listener => {}
82
+ },
83
+ "capital-financing-application": {
84
+ setOnApplicationSubmitted: _listener => {},
85
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
86
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
87
+ setOnApplicationStepChange: _listener => {},
88
+ setDefaultFinancingOffer: _defaultFinancingOffer => {}
89
+ },
90
+ "capital-financing-promotion": {
91
+ setLayout: _layout => {},
92
+ setOnApplicationSubmitted: _listener => {},
93
+ setOnEligibleFinancingOfferLoaded: _listener => {},
94
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
95
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
96
+ setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
97
+ setOnApplicationStepChange: _listener => {}
98
+ },
99
+ "reporting-chart": {
100
+ setReportName: _reportName => {},
101
+ setIntervalStart: _intervalStart => {},
102
+ setIntervalEnd: _intervalEnd => {},
103
+ setIntervalType: _intervalType => {}
60
104
  },
61
105
  "tax-settings": {
62
106
  setHideProductTaxCodeSelector: _hidden => {},
@@ -68,10 +112,29 @@ const ConnectElementCustomMethodConfig = {
68
112
  setDisplayCountries: _countries => {},
69
113
  setOnAfterTaxRegistrationExpired: _listener => {}
70
114
  },
115
+ "tax-threshold-monitoring": {
116
+ setDisplayCountries: _countries => {}
117
+ },
118
+ "product-tax-code-selector": {
119
+ setOnTaxCodeSelect: _listener => {},
120
+ setHideDescription: _hideDescription => {},
121
+ setDisabled: _disabled => {},
122
+ setInitialTaxCode: _initialTaxCode => {}
123
+ },
124
+ "export-tax-transactions": {},
71
125
  "payout-details": {
72
126
  setPayout: _payout => {},
73
127
  setOnClose: _listener => {}
74
128
  },
129
+ "check-scanning": {
130
+ setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
131
+ },
132
+ "agentic-commerce-settings": {
133
+ setOnAgreementUpdated: _listener => {}
134
+ },
135
+ "terminal-hardware-shop": {
136
+ setOnCheckoutFinished: _listener => {}
137
+ },
75
138
  "payout-reconciliation-report": {
76
139
  setOnReportAvailabilityLoaded: _listener => {}
77
140
  }
@@ -177,7 +240,7 @@ const initStripeConnect = (stripePromise, initParams) => {
177
240
  element[method] = function (value) {
178
241
  stripeConnectInstance.then(() => {
179
242
  if (!this[`${method}InternalOnly`]) {
180
- throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.3`);
243
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.4-preview-1`);
181
244
  }
182
245
  this[`${method}InternalOnly`](value);
183
246
  });
@@ -231,7 +294,7 @@ const createWrapper = stripeConnect => {
231
294
  sdk: true,
232
295
  sdkOptions: {
233
296
  // This will be replaced by the npm package version when bundling
234
- sdkVersion: "3.4.3"
297
+ sdkVersion: "3.4.4-preview-1"
235
298
  }
236
299
  })
237
300
  }));
@@ -1,4 +1,4 @@
1
- import type { ConnectElementCommonMethodConfig, ConnectElementCustomMethodConfig, connectElementTagNames } from "../components/componentsAndSetters";
1
+ import type { ConnectElementCommonMethodConfig, ConnectElementCustomMethodConfig, connectElementTagNames, EmbeddedError, EmbeddedErrorType } from "../components/componentsAndSetters";
2
2
  export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
3
3
  export interface StripeConnectWrapper {
4
4
  initialize: (params: IStripeConnectInitParams) => StripeConnectInstance;
@@ -430,7 +430,79 @@ export type IStripeConnectUpdateParams = {
430
430
  * The locale to use for the Connect instance.
431
431
  */
432
432
  locale?: string;
433
+ /**
434
+ * Options that affect how all embedded components under this instance render
435
+ */
436
+ displayOptions?: IStripeConnectDisplayOptions;
437
+ };
438
+ /**
439
+ * Reasons why risk signals collection was skipped.
440
+ */
441
+ export type RiskSignalsCollectionSkippedReason =
442
+ /**
443
+ * Required component (account_onboarding) not enabled.
444
+ */
445
+ "required_component_not_enabled"
446
+ /**
447
+ * The account doesn't have a risk signals collection requirement.
448
+ */
449
+ | "not_required"
450
+ /**
451
+ * The risk signals collection requirement has already been fulfilled.
452
+ */
453
+ | "requirement_fulfilled";
454
+ /**
455
+ * Error types that can occur during risk signals collection.
456
+ */
457
+ export type RiskSignalsCollectionErrorType = Extract<EmbeddedErrorType, "api_connection_error" | "invalid_request_error" | "rate_limit_error" | "api_error">;
458
+ /**
459
+ * Errors that can occur during risk signals collection.
460
+ */
461
+ export type RiskSignalsCollectionError =
462
+ /**
463
+ * Error occurred during general Connect.js loading.
464
+ */
465
+ {
466
+ type: "load_error";
467
+ loadError: EmbeddedError;
468
+ }
469
+ /**
470
+ * Error occurred during risk signals collection.
471
+ */
472
+ | {
473
+ type: RiskSignalsCollectionErrorType;
474
+ message?: string;
433
475
  };
476
+ /**
477
+ * Event emitted during risk signals collection.
478
+ */
479
+ export declare type RiskSignalsCollectionEvent =
480
+ /**
481
+ * Risk signals collection completed and successfully received by Stripe.
482
+ */
483
+ {
484
+ status: "completed";
485
+ }
486
+ /**
487
+ * Risk signals collection skipped with reason.
488
+ */
489
+ | {
490
+ status: "skipped";
491
+ skippedReason: RiskSignalsCollectionSkippedReason;
492
+ }
493
+ /**
494
+ * Risk signals collection failed due to error and was not sent to Stripe server.
495
+ */
496
+ | {
497
+ status: "failed";
498
+ error: RiskSignalsCollectionError;
499
+ };
500
+ export interface IStripeConnectDisplayOptions {
501
+ /**
502
+ * Whether embedded components should show object id's in the UI
503
+ */
504
+ showObjectIds?: boolean;
505
+ }
434
506
  /**
435
507
  * Initialization parameters for Connect JS. See https://stripe.com/docs/connect/get-started-connect-embedded-components#configuring-connect-js for more details.
436
508
  */
@@ -457,6 +529,15 @@ export interface IStripeConnectInitParams {
457
529
  * An array of custom fonts, which embedded components created from a ConnectInstance can use.
458
530
  */
459
531
  fonts?: Array<CssFontSource | CustomFontSource>;
532
+ /**
533
+ * Callback for risk signals collection event
534
+ * @param {RiskSignalsCollectionEvent} event - The risk signals collection event containing status and additional details.
535
+ */
536
+ onRiskSignalsCollection?: (event: RiskSignalsCollectionEvent) => void;
537
+ /**
538
+ * Options that affect how all embedded components under this instance render
539
+ */
540
+ displayOptions?: IStripeConnectDisplayOptions;
460
541
  }
461
542
  type ConnectElementCustomMethods = typeof ConnectElementCustomMethodConfig;
462
543
  type ConnectElementCommonMethods = typeof ConnectElementCommonMethodConfig;
package/dist/init.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ConnectElementTagName, IStripeConnectInitParams, StripeConnectInstance, StripeConnectWrapper } from "./exportedTypes/shared";
2
2
  export type ConnectElementHTMLName = `stripe-connect-${ConnectElementTagName}`;
3
- export declare const componentNameMapping: Record<"account-onboarding" | "disputes-list" | "payments" | "payment-details" | "payment-disputes" | "payouts" | "payouts-list" | "payout-details" | "balances" | "account-management" | "notification-banner" | "instant-payouts-promotion" | "issuing-card" | "issuing-cards-list" | "financial-account" | "financial-account-transactions" | "documents" | "tax-registrations" | "tax-settings" | "balance-report" | "payout-reconciliation-report", "stripe-connect-account-onboarding" | "stripe-connect-disputes-list" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-payouts" | "stripe-connect-payouts-list" | "stripe-connect-payout-details" | "stripe-connect-balances" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts-promotion" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-documents" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-balance-report" | "stripe-connect-payout-reconciliation-report">;
3
+ export declare const componentNameMapping: Record<"payments" | "payouts" | "payment-details" | "payment-disputes" | "disputes-list" | "account-onboarding" | "payment-method-settings" | "account-management" | "notification-banner" | "instant-payouts" | "instant-payouts-promotion" | "issuing-card" | "issuing-cards-list" | "financial-account" | "financial-account-transactions" | "recipients" | "capital-financing" | "capital-financing-application" | "capital-financing-promotion" | "capital-overview" | "documents" | "product-tax-code-selector" | "export-tax-transactions" | "tax-registrations" | "tax-settings" | "tax-threshold-monitoring" | "balances" | "payouts-list" | "payout-details" | "app-install" | "app-viewport" | "reporting-chart" | "check-scanning" | "agentic-commerce-settings" | "terminal-hardware-orders" | "terminal-hardware-shop" | "network-cost-passthrough-report" | "balance-report" | "payout-reconciliation-report" | "recipients-list" | "financial-accounts" | "financial-accounts-transactions", "stripe-connect-payments" | "stripe-connect-payouts" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-disputes-list" | "stripe-connect-account-onboarding" | "stripe-connect-payment-method-settings" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts" | "stripe-connect-instant-payouts-promotion" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-recipients" | "stripe-connect-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" | "stripe-connect-capital-overview" | "stripe-connect-documents" | "stripe-connect-product-tax-code-selector" | "stripe-connect-export-tax-transactions" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-tax-threshold-monitoring" | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-payout-details" | "stripe-connect-app-install" | "stripe-connect-app-viewport" | "stripe-connect-reporting-chart" | "stripe-connect-check-scanning" | "stripe-connect-agentic-commerce-settings" | "stripe-connect-terminal-hardware-orders" | "stripe-connect-terminal-hardware-shop" | "stripe-connect-network-cost-passthrough-report" | "stripe-connect-balance-report" | "stripe-connect-payout-reconciliation-report" | "stripe-connect-recipients-list" | "stripe-connect-financial-accounts" | "stripe-connect-financial-accounts-transactions">;
4
4
  type StripeConnectInstanceExtended = StripeConnectInstance & {
5
5
  debugInstance: () => Promise<StripeConnectInstance>;
6
6
  };
package/dist/pure.esm.js CHANGED
@@ -1,11 +1,22 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  // Source of truth for the entire list of components. When you add a new component, it should be added here.
3
- const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
3
+ const connectElementTagNames = ["payments", "payouts", "payment-details", "payment-disputes", "disputes-list", "account-onboarding", "payment-method-settings", "account-management", "notification-banner", "instant-payouts", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "recipients", "capital-financing", "capital-financing-application", "capital-financing-promotion", "capital-overview", "documents", "product-tax-code-selector", "export-tax-transactions", "tax-registrations", "tax-settings", "tax-threshold-monitoring", "balances", "payouts-list", "payout-details", "app-install", "app-viewport", "reporting-chart", "check-scanning", "agentic-commerce-settings", "terminal-hardware-orders", "terminal-hardware-shop", "network-cost-passthrough-report", "balance-report", "payout-reconciliation-report", "recipients-list", "financial-accounts", "financial-accounts-transactions"];
4
4
  const ConnectElementCommonMethodConfig = {
5
5
  setOnLoadError: _listener => {},
6
6
  setOnLoaderStart: _listener => {}
7
7
  };
8
8
  const ConnectElementCustomMethodConfig = {
9
+ payments: {
10
+ setDefaultFilters: _filters => {}
11
+ },
12
+ "payment-details": {
13
+ setPayment: _payment => {},
14
+ setOnClose: _listener => {}
15
+ },
16
+ "payment-disputes": {
17
+ setPayment: _payment => {},
18
+ setOnDisputesLoaded: _listener => {}
19
+ },
9
20
  "account-onboarding": {
10
21
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
11
22
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -43,16 +54,49 @@ const ConnectElementCustomMethodConfig = {
43
54
  "financial-account-transactions": {
44
55
  setFinancialAccount: _financialAccount => {}
45
56
  },
46
- payments: {
47
- setDefaultFilters: _filters => {}
57
+ recipients: {
58
+ setDataSource: _dataSource => {}
48
59
  },
49
- "payment-details": {
50
- setPayment: _payment => {},
51
- setOnClose: _listener => {}
60
+ "app-install": {
61
+ setApp: _app => {},
62
+ setOnAppInstallStateFetched: _listener => {},
63
+ setOnAppInstallStateChanged: _listener => {}
52
64
  },
53
- "payment-disputes": {
54
- setPayment: _payment => {},
55
- setOnDisputesLoaded: _listener => {}
65
+ "app-viewport": {
66
+ setApp: _app => {},
67
+ setAppData: _appData => {}
68
+ },
69
+ "payment-method-settings": {
70
+ setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
71
+ },
72
+ "capital-financing": {
73
+ setDefaultFinancingOffer: _defaultFinancingOffer => {},
74
+ setShowFinancingSelector: _showFinancingSelector => {},
75
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
76
+ setSupportUrl: _supportUrl => {},
77
+ setOnFinancingsLoaded: _listener => {}
78
+ },
79
+ "capital-financing-application": {
80
+ setOnApplicationSubmitted: _listener => {},
81
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
82
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
83
+ setOnApplicationStepChange: _listener => {},
84
+ setDefaultFinancingOffer: _defaultFinancingOffer => {}
85
+ },
86
+ "capital-financing-promotion": {
87
+ setLayout: _layout => {},
88
+ setOnApplicationSubmitted: _listener => {},
89
+ setOnEligibleFinancingOfferLoaded: _listener => {},
90
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
91
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
92
+ setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
93
+ setOnApplicationStepChange: _listener => {}
94
+ },
95
+ "reporting-chart": {
96
+ setReportName: _reportName => {},
97
+ setIntervalStart: _intervalStart => {},
98
+ setIntervalEnd: _intervalEnd => {},
99
+ setIntervalType: _intervalType => {}
56
100
  },
57
101
  "tax-settings": {
58
102
  setHideProductTaxCodeSelector: _hidden => {},
@@ -64,10 +108,29 @@ const ConnectElementCustomMethodConfig = {
64
108
  setDisplayCountries: _countries => {},
65
109
  setOnAfterTaxRegistrationExpired: _listener => {}
66
110
  },
111
+ "tax-threshold-monitoring": {
112
+ setDisplayCountries: _countries => {}
113
+ },
114
+ "product-tax-code-selector": {
115
+ setOnTaxCodeSelect: _listener => {},
116
+ setHideDescription: _hideDescription => {},
117
+ setDisabled: _disabled => {},
118
+ setInitialTaxCode: _initialTaxCode => {}
119
+ },
120
+ "export-tax-transactions": {},
67
121
  "payout-details": {
68
122
  setPayout: _payout => {},
69
123
  setOnClose: _listener => {}
70
124
  },
125
+ "check-scanning": {
126
+ setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
127
+ },
128
+ "agentic-commerce-settings": {
129
+ setOnAgreementUpdated: _listener => {}
130
+ },
131
+ "terminal-hardware-shop": {
132
+ setOnCheckoutFinished: _listener => {}
133
+ },
71
134
  "payout-reconciliation-report": {
72
135
  setOnReportAvailabilityLoaded: _listener => {}
73
136
  }
@@ -173,7 +236,7 @@ const initStripeConnect = (stripePromise, initParams) => {
173
236
  element[method] = function (value) {
174
237
  stripeConnectInstance.then(() => {
175
238
  if (!this[`${method}InternalOnly`]) {
176
- throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.3`);
239
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.4-preview-1`);
177
240
  }
178
241
  this[`${method}InternalOnly`](value);
179
242
  });
@@ -227,7 +290,7 @@ const createWrapper = stripeConnect => {
227
290
  sdk: true,
228
291
  sdkOptions: {
229
292
  // This will be replaced by the npm package version when bundling
230
- sdkVersion: "3.4.3"
293
+ sdkVersion: "3.4.4-preview-1"
231
294
  }
232
295
  })
233
296
  }));
package/dist/pure.js CHANGED
@@ -4,12 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  // Source of truth for the entire list of components. When you add a new component, it should be added here.
7
- const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
7
+ const connectElementTagNames = ["payments", "payouts", "payment-details", "payment-disputes", "disputes-list", "account-onboarding", "payment-method-settings", "account-management", "notification-banner", "instant-payouts", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "recipients", "capital-financing", "capital-financing-application", "capital-financing-promotion", "capital-overview", "documents", "product-tax-code-selector", "export-tax-transactions", "tax-registrations", "tax-settings", "tax-threshold-monitoring", "balances", "payouts-list", "payout-details", "app-install", "app-viewport", "reporting-chart", "check-scanning", "agentic-commerce-settings", "terminal-hardware-orders", "terminal-hardware-shop", "network-cost-passthrough-report", "balance-report", "payout-reconciliation-report", "recipients-list", "financial-accounts", "financial-accounts-transactions"];
8
8
  const ConnectElementCommonMethodConfig = {
9
9
  setOnLoadError: _listener => {},
10
10
  setOnLoaderStart: _listener => {}
11
11
  };
12
12
  const ConnectElementCustomMethodConfig = {
13
+ payments: {
14
+ setDefaultFilters: _filters => {}
15
+ },
16
+ "payment-details": {
17
+ setPayment: _payment => {},
18
+ setOnClose: _listener => {}
19
+ },
20
+ "payment-disputes": {
21
+ setPayment: _payment => {},
22
+ setOnDisputesLoaded: _listener => {}
23
+ },
13
24
  "account-onboarding": {
14
25
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
15
26
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -47,16 +58,49 @@ const ConnectElementCustomMethodConfig = {
47
58
  "financial-account-transactions": {
48
59
  setFinancialAccount: _financialAccount => {}
49
60
  },
50
- payments: {
51
- setDefaultFilters: _filters => {}
61
+ recipients: {
62
+ setDataSource: _dataSource => {}
52
63
  },
53
- "payment-details": {
54
- setPayment: _payment => {},
55
- setOnClose: _listener => {}
64
+ "app-install": {
65
+ setApp: _app => {},
66
+ setOnAppInstallStateFetched: _listener => {},
67
+ setOnAppInstallStateChanged: _listener => {}
56
68
  },
57
- "payment-disputes": {
58
- setPayment: _payment => {},
59
- setOnDisputesLoaded: _listener => {}
69
+ "app-viewport": {
70
+ setApp: _app => {},
71
+ setAppData: _appData => {}
72
+ },
73
+ "payment-method-settings": {
74
+ setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
75
+ },
76
+ "capital-financing": {
77
+ setDefaultFinancingOffer: _defaultFinancingOffer => {},
78
+ setShowFinancingSelector: _showFinancingSelector => {},
79
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
80
+ setSupportUrl: _supportUrl => {},
81
+ setOnFinancingsLoaded: _listener => {}
82
+ },
83
+ "capital-financing-application": {
84
+ setOnApplicationSubmitted: _listener => {},
85
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
86
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
87
+ setOnApplicationStepChange: _listener => {},
88
+ setDefaultFinancingOffer: _defaultFinancingOffer => {}
89
+ },
90
+ "capital-financing-promotion": {
91
+ setLayout: _layout => {},
92
+ setOnApplicationSubmitted: _listener => {},
93
+ setOnEligibleFinancingOfferLoaded: _listener => {},
94
+ setPrivacyPolicyUrl: _privacyPolicyUrl => {},
95
+ setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
96
+ setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
97
+ setOnApplicationStepChange: _listener => {}
98
+ },
99
+ "reporting-chart": {
100
+ setReportName: _reportName => {},
101
+ setIntervalStart: _intervalStart => {},
102
+ setIntervalEnd: _intervalEnd => {},
103
+ setIntervalType: _intervalType => {}
60
104
  },
61
105
  "tax-settings": {
62
106
  setHideProductTaxCodeSelector: _hidden => {},
@@ -68,10 +112,29 @@ const ConnectElementCustomMethodConfig = {
68
112
  setDisplayCountries: _countries => {},
69
113
  setOnAfterTaxRegistrationExpired: _listener => {}
70
114
  },
115
+ "tax-threshold-monitoring": {
116
+ setDisplayCountries: _countries => {}
117
+ },
118
+ "product-tax-code-selector": {
119
+ setOnTaxCodeSelect: _listener => {},
120
+ setHideDescription: _hideDescription => {},
121
+ setDisabled: _disabled => {},
122
+ setInitialTaxCode: _initialTaxCode => {}
123
+ },
124
+ "export-tax-transactions": {},
71
125
  "payout-details": {
72
126
  setPayout: _payout => {},
73
127
  setOnClose: _listener => {}
74
128
  },
129
+ "check-scanning": {
130
+ setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
131
+ },
132
+ "agentic-commerce-settings": {
133
+ setOnAgreementUpdated: _listener => {}
134
+ },
135
+ "terminal-hardware-shop": {
136
+ setOnCheckoutFinished: _listener => {}
137
+ },
75
138
  "payout-reconciliation-report": {
76
139
  setOnReportAvailabilityLoaded: _listener => {}
77
140
  }
@@ -177,7 +240,7 @@ const initStripeConnect = (stripePromise, initParams) => {
177
240
  element[method] = function (value) {
178
241
  stripeConnectInstance.then(() => {
179
242
  if (!this[`${method}InternalOnly`]) {
180
- throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.3`);
243
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.4-preview-1`);
181
244
  }
182
245
  this[`${method}InternalOnly`](value);
183
246
  });
@@ -231,7 +294,7 @@ const createWrapper = stripeConnect => {
231
294
  sdk: true,
232
295
  sdkOptions: {
233
296
  // This will be replaced by the npm package version when bundling
234
- sdkVersion: "3.4.3"
297
+ sdkVersion: "3.4.4-preview-1"
235
298
  }
236
299
  })
237
300
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.4.3",
3
+ "version": "3.4.4-preview-1",
4
4
  "description": "Connect.js loading utility package (preview version)",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
@@ -63,7 +63,7 @@
63
63
  "jest-environment-jsdom": "^29.5.0",
64
64
  "prettier": "2.8.8",
65
65
  "rimraf": "^2.6.2",
66
- "rollup": "^2.79.2",
66
+ "rollup": "^2.80.0",
67
67
  "rollup-plugin-babel": "^4.4.0",
68
68
  "rollup-plugin-typescript2": "^0.25.3",
69
69
  "ts-jest": "^29.1.0",
@@ -2,30 +2,52 @@
2
2
 
3
3
  // Source of truth for the entire list of components. When you add a new component, it should be added here.
4
4
  export const connectElementTagNames = [
5
- "account-onboarding",
6
- "disputes-list",
7
5
  "payments",
6
+ "payouts",
8
7
  "payment-details",
9
8
  "payment-disputes",
10
- "payouts",
11
- "payouts-list",
12
- "payout-details",
13
- "balances",
9
+ "disputes-list",
10
+ "account-onboarding",
11
+ "payment-method-settings",
14
12
  "account-management",
15
13
  "notification-banner",
14
+ "instant-payouts",
16
15
  "instant-payouts-promotion",
17
16
  "issuing-card",
18
17
  "issuing-cards-list",
19
18
  "financial-account",
20
19
  "financial-account-transactions",
20
+ "recipients",
21
+ "capital-financing",
22
+ "capital-financing-application",
23
+ "capital-financing-promotion",
24
+ "capital-overview",
21
25
  "documents",
26
+ "product-tax-code-selector",
27
+ "export-tax-transactions",
22
28
  "tax-registrations",
23
29
  "tax-settings",
30
+ "tax-threshold-monitoring",
31
+ "balances",
32
+ "payouts-list",
33
+ "payout-details",
34
+ "app-install",
35
+ "app-viewport",
36
+ "reporting-chart",
37
+ "check-scanning",
38
+ "agentic-commerce-settings",
39
+ "terminal-hardware-orders",
40
+ "terminal-hardware-shop",
41
+ "network-cost-passthrough-report",
24
42
  "balance-report",
25
43
  "payout-reconciliation-report",
44
+ "recipients-list",
45
+ "financial-accounts",
46
+ "financial-accounts-transactions",
26
47
  ] as const;
27
48
 
28
49
  // BEGIN: Setter definitions. All setters and their associated types are defined here. When adding a new component, if it has setters, they should be added here as well.
50
+
29
51
  export type FetchEphemeralKeyFunction = (fetchParams: {
30
52
  issuingCard: string;
31
53
  nonce: string;
@@ -166,6 +188,11 @@ export type NotificationCount = {
166
188
  actionRequired: number;
167
189
  };
168
190
 
191
+ export type InstallState = {
192
+ appId: string;
193
+ state: "INSTALLED" | "UNINSTALLED";
194
+ };
195
+
169
196
  export type LoaderStart = {
170
197
  elementTagName: string;
171
198
  };
@@ -184,6 +211,19 @@ export type EmbeddedError = {
184
211
  message?: string;
185
212
  };
186
213
 
214
+ export type FinancingProductType = {
215
+ productType: "standard" | "refill" | "none";
216
+ activeFinancingCount: number;
217
+ };
218
+
219
+ export type FinancingPromotionLayoutType = "full" | "banner";
220
+
221
+ export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
222
+
223
+ export type ReportName = "gross_volume" | "net_volume";
224
+
225
+ export type RecipientDataSource = "customers";
226
+
187
227
  export type EmbeddedErrorType =
188
228
  /**
189
229
  * Failure to connect to Stripe's API.
@@ -224,6 +264,21 @@ export const ConnectElementCommonMethodConfig = {
224
264
  };
225
265
 
226
266
  export const ConnectElementCustomMethodConfig = {
267
+ payments: {
268
+ setDefaultFilters: (
269
+ _filters: PaymentsListDefaultFilters | undefined
270
+ ): void => {},
271
+ },
272
+ "payment-details": {
273
+ setPayment: (_payment: string | undefined): void => {},
274
+ setOnClose: (_listener: (() => void) | undefined): void => {},
275
+ },
276
+ "payment-disputes": {
277
+ setPayment: (_payment: string | undefined): void => {},
278
+ setOnDisputesLoaded: (
279
+ _listener: (({ total }: { total: number }) => void) | undefined
280
+ ): void => {},
281
+ },
227
282
  "account-onboarding": {
228
283
  setFullTermsOfServiceUrl: (
229
284
  _termOfServiceUrl: string | undefined
@@ -289,21 +344,87 @@ export const ConnectElementCustomMethodConfig = {
289
344
  "financial-account-transactions": {
290
345
  setFinancialAccount: (_financialAccount: string): void => {},
291
346
  },
292
- payments: {
293
- setDefaultFilters: (
294
- _filters: PaymentsListDefaultFilters | undefined
347
+ recipients: {
348
+ setDataSource: (_dataSource: RecipientDataSource): void => {},
349
+ },
350
+ "app-install": {
351
+ setApp: (_app: string | undefined): void => {},
352
+ setOnAppInstallStateFetched: (
353
+ _listener: (({ appId, state }: InstallState) => void) | undefined
354
+ ): void => {},
355
+ setOnAppInstallStateChanged: (
356
+ _listener: (({ appId, state }: InstallState) => void) | undefined
295
357
  ): void => {},
296
358
  },
297
- "payment-details": {
298
- setPayment: (_payment: string | undefined): void => {},
299
- setOnClose: (_listener: (() => void) | undefined): void => {},
359
+ "app-viewport": {
360
+ setApp: (_app: string | undefined): void => {},
361
+ setAppData: (_appData: Record<string, string> | undefined): void => {},
300
362
  },
301
- "payment-disputes": {
302
- setPayment: (_payment: string | undefined): void => {},
303
- setOnDisputesLoaded: (
363
+ "payment-method-settings": {
364
+ setPaymentMethodConfiguration: (
365
+ _paymentMethodConfiguration: string | undefined
366
+ ): void => {},
367
+ },
368
+ "capital-financing": {
369
+ setDefaultFinancingOffer: (
370
+ _defaultFinancingOffer: string | undefined
371
+ ): void => {},
372
+ setShowFinancingSelector: (
373
+ _showFinancingSelector: boolean | undefined
374
+ ): void => {},
375
+ setHowCapitalWorksUrl: (
376
+ _howCapitalWorksUrl: string | undefined
377
+ ): void => {},
378
+ setSupportUrl: (_supportUrl: string | undefined): void => {},
379
+ setOnFinancingsLoaded: (
304
380
  _listener: (({ total }: { total: number }) => void) | undefined
305
381
  ): void => {},
306
382
  },
383
+ "capital-financing-application": {
384
+ setOnApplicationSubmitted: (
385
+ _listener: (() => void) | undefined
386
+ ): void => {},
387
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
388
+ setHowCapitalWorksUrl: (
389
+ _howCapitalWorksUrl: string | undefined
390
+ ): void => {},
391
+ setOnApplicationStepChange: (
392
+ _listener: (({ step }: StepChange) => void) | undefined
393
+ ): void => {},
394
+ setDefaultFinancingOffer: (
395
+ _defaultFinancingOffer: string | undefined
396
+ ): void => {},
397
+ },
398
+ "capital-financing-promotion": {
399
+ setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
400
+ setOnApplicationSubmitted: (
401
+ _listener: (() => void) | undefined
402
+ ): void => {},
403
+ setOnEligibleFinancingOfferLoaded: (
404
+ _listener:
405
+ | (({
406
+ productType,
407
+ activeFinancingCount,
408
+ }: FinancingProductType) => void)
409
+ | undefined
410
+ ): void => {},
411
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
412
+ setHowCapitalWorksUrl: (
413
+ _howCapitalWorksUrl: string | undefined
414
+ ): void => {},
415
+ setEligibilityCriteriaUrl: (
416
+ _eligibilityCriteriaUrl: string | undefined
417
+ ): void => {},
418
+ setOnApplicationStepChange: (
419
+ _listener: (({ step }: StepChange) => void) | undefined
420
+ ): void => {},
421
+ },
422
+ "reporting-chart": {
423
+ setReportName: (_reportName: ReportName): void => {},
424
+ setIntervalStart: (_intervalStart: Date | undefined): void => {},
425
+ setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
426
+ setIntervalType: (_intervalType: IntervalType | undefined): void => {},
427
+ },
307
428
  "tax-settings": {
308
429
  setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
309
430
  setDisplayHeadOfficeCountries: (
@@ -322,10 +443,46 @@ export const ConnectElementCustomMethodConfig = {
322
443
  _listener: (({ id }: { id: string }) => void) | undefined
323
444
  ): void => {},
324
445
  },
446
+ "tax-threshold-monitoring": {
447
+ setDisplayCountries: (_countries: string[] | undefined): void => {},
448
+ },
449
+ "product-tax-code-selector": {
450
+ setOnTaxCodeSelect: (
451
+ _listener:
452
+ | ((
453
+ taxCode: string | null,
454
+ _: { analyticsName: string } | null
455
+ ) => void)
456
+ | undefined
457
+ ): void => {},
458
+ setHideDescription: (_hideDescription: boolean | undefined): void => {},
459
+ setDisabled: (_disabled: boolean | undefined): void => {},
460
+ setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
461
+ },
462
+ "export-tax-transactions": {},
325
463
  "payout-details": {
326
464
  setPayout: (_payout: string | undefined): void => {},
327
465
  setOnClose: (_listener: (() => void) | undefined): void => {},
328
466
  },
467
+ "check-scanning": {
468
+ setHandleCheckScanSubmitted: (
469
+ _handleCheckScanSubmitted: ({
470
+ checkScanToken,
471
+ }: {
472
+ checkScanToken: string;
473
+ }) => Promise<void>
474
+ ): void => {},
475
+ },
476
+ "agentic-commerce-settings": {
477
+ setOnAgreementUpdated: (
478
+ _listener:
479
+ | (({ agreementId }: { agreementId: string }) => void)
480
+ | undefined
481
+ ): void => {},
482
+ },
483
+ "terminal-hardware-shop": {
484
+ setOnCheckoutFinished: (_listener: (() => void) | undefined): void => {},
485
+ },
329
486
  "payout-reconciliation-report": {
330
487
  setOnReportAvailabilityLoaded: (
331
488
  _listener:
@@ -2,6 +2,8 @@ import type {
2
2
  ConnectElementCommonMethodConfig,
3
3
  ConnectElementCustomMethodConfig,
4
4
  connectElementTagNames,
5
+ EmbeddedError,
6
+ EmbeddedErrorType,
5
7
  } from "../components/componentsAndSetters";
6
8
 
7
9
  export type LoadConnectAndInitialize = (
@@ -509,8 +511,81 @@ export type IStripeConnectUpdateParams = {
509
511
  * The locale to use for the Connect instance.
510
512
  */
511
513
  locale?: string;
514
+
515
+ /**
516
+ * Options that affect how all embedded components under this instance render
517
+ */
518
+ displayOptions?: IStripeConnectDisplayOptions;
512
519
  };
513
520
 
521
+ /**
522
+ * Reasons why risk signals collection was skipped.
523
+ */
524
+ export type RiskSignalsCollectionSkippedReason =
525
+ /**
526
+ * Required component (account_onboarding) not enabled.
527
+ */
528
+ | "required_component_not_enabled"
529
+ /**
530
+ * The account doesn't have a risk signals collection requirement.
531
+ */
532
+ | "not_required"
533
+ /**
534
+ * The risk signals collection requirement has already been fulfilled.
535
+ */
536
+ | "requirement_fulfilled";
537
+
538
+ /**
539
+ * Error types that can occur during risk signals collection.
540
+ */
541
+ export type RiskSignalsCollectionErrorType = Extract<
542
+ EmbeddedErrorType,
543
+ | "api_connection_error"
544
+ | "invalid_request_error"
545
+ | "rate_limit_error"
546
+ | "api_error"
547
+ >;
548
+
549
+ /**
550
+ * Errors that can occur during risk signals collection.
551
+ */
552
+ export type RiskSignalsCollectionError =
553
+ /**
554
+ * Error occurred during general Connect.js loading.
555
+ */
556
+ | { type: "load_error"; loadError: EmbeddedError }
557
+
558
+ /**
559
+ * Error occurred during risk signals collection.
560
+ */
561
+ | { type: RiskSignalsCollectionErrorType; message?: string };
562
+
563
+ /**
564
+ * Event emitted during risk signals collection.
565
+ */
566
+ export declare type RiskSignalsCollectionEvent =
567
+ /**
568
+ * Risk signals collection completed and successfully received by Stripe.
569
+ */
570
+ | { status: "completed" }
571
+
572
+ /**
573
+ * Risk signals collection skipped with reason.
574
+ */
575
+ | { status: "skipped"; skippedReason: RiskSignalsCollectionSkippedReason }
576
+
577
+ /**
578
+ * Risk signals collection failed due to error and was not sent to Stripe server.
579
+ */
580
+ | { status: "failed"; error: RiskSignalsCollectionError };
581
+
582
+ export interface IStripeConnectDisplayOptions {
583
+ /**
584
+ * Whether embedded components should show object id's in the UI
585
+ */
586
+ showObjectIds?: boolean;
587
+ }
588
+
514
589
  /**
515
590
  * Initialization parameters for Connect JS. See https://stripe.com/docs/connect/get-started-connect-embedded-components#configuring-connect-js for more details.
516
591
  */
@@ -541,6 +616,17 @@ export interface IStripeConnectInitParams {
541
616
  * An array of custom fonts, which embedded components created from a ConnectInstance can use.
542
617
  */
543
618
  fonts?: Array<CssFontSource | CustomFontSource>;
619
+
620
+ /**
621
+ * Callback for risk signals collection event
622
+ * @param {RiskSignalsCollectionEvent} event - The risk signals collection event containing status and additional details.
623
+ */
624
+ onRiskSignalsCollection?: (event: RiskSignalsCollectionEvent) => void;
625
+
626
+ /**
627
+ * Options that affect how all embedded components under this instance render
628
+ */
629
+ displayOptions?: IStripeConnectDisplayOptions;
544
630
  }
545
631
 
546
632
  type ConnectElementCustomMethods = typeof ConnectElementCustomMethodConfig;