@stripe/connect-js 3.4.4 → 3.4.5-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", "bills"];
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", "bills"];
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.4`);
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.5-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.4"
293
+ sdkVersion: "3.4.5-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", "bills"];
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.4`);
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.5-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.4"
297
+ sdkVersion: "3.4.5-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" | "bills", "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" | "stripe-connect-bills">;
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", "bills"];
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.4`);
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.5-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.4"
293
+ sdkVersion: "3.4.5-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", "bills"];
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.4`);
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.5-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.4"
297
+ sdkVersion: "3.4.5-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.4",
3
+ "version": "3.4.5-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,53 @@
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",
47
+ "bills",
26
48
  ] as const;
27
49
 
28
50
  // 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.
51
+
29
52
  export type FetchEphemeralKeyFunction = (fetchParams: {
30
53
  issuingCard: string;
31
54
  nonce: string;
@@ -166,6 +189,11 @@ export type NotificationCount = {
166
189
  actionRequired: number;
167
190
  };
168
191
 
192
+ export type InstallState = {
193
+ appId: string;
194
+ state: "INSTALLED" | "UNINSTALLED";
195
+ };
196
+
169
197
  export type LoaderStart = {
170
198
  elementTagName: string;
171
199
  };
@@ -184,6 +212,19 @@ export type EmbeddedError = {
184
212
  message?: string;
185
213
  };
186
214
 
215
+ export type FinancingProductType = {
216
+ productType: "standard" | "refill" | "none";
217
+ activeFinancingCount: number;
218
+ };
219
+
220
+ export type FinancingPromotionLayoutType = "full" | "banner";
221
+
222
+ export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
223
+
224
+ export type ReportName = "gross_volume" | "net_volume";
225
+
226
+ export type RecipientDataSource = "customers";
227
+
187
228
  export type EmbeddedErrorType =
188
229
  /**
189
230
  * Failure to connect to Stripe's API.
@@ -224,6 +265,21 @@ export const ConnectElementCommonMethodConfig = {
224
265
  };
225
266
 
226
267
  export const ConnectElementCustomMethodConfig = {
268
+ payments: {
269
+ setDefaultFilters: (
270
+ _filters: PaymentsListDefaultFilters | undefined
271
+ ): void => {},
272
+ },
273
+ "payment-details": {
274
+ setPayment: (_payment: string | undefined): void => {},
275
+ setOnClose: (_listener: (() => void) | undefined): void => {},
276
+ },
277
+ "payment-disputes": {
278
+ setPayment: (_payment: string | undefined): void => {},
279
+ setOnDisputesLoaded: (
280
+ _listener: (({ total }: { total: number }) => void) | undefined
281
+ ): void => {},
282
+ },
227
283
  "account-onboarding": {
228
284
  setFullTermsOfServiceUrl: (
229
285
  _termOfServiceUrl: string | undefined
@@ -289,21 +345,87 @@ export const ConnectElementCustomMethodConfig = {
289
345
  "financial-account-transactions": {
290
346
  setFinancialAccount: (_financialAccount: string): void => {},
291
347
  },
292
- payments: {
293
- setDefaultFilters: (
294
- _filters: PaymentsListDefaultFilters | undefined
348
+ recipients: {
349
+ setDataSource: (_dataSource: RecipientDataSource): void => {},
350
+ },
351
+ "app-install": {
352
+ setApp: (_app: string | undefined): void => {},
353
+ setOnAppInstallStateFetched: (
354
+ _listener: (({ appId, state }: InstallState) => void) | undefined
355
+ ): void => {},
356
+ setOnAppInstallStateChanged: (
357
+ _listener: (({ appId, state }: InstallState) => void) | undefined
295
358
  ): void => {},
296
359
  },
297
- "payment-details": {
298
- setPayment: (_payment: string | undefined): void => {},
299
- setOnClose: (_listener: (() => void) | undefined): void => {},
360
+ "app-viewport": {
361
+ setApp: (_app: string | undefined): void => {},
362
+ setAppData: (_appData: Record<string, string> | undefined): void => {},
300
363
  },
301
- "payment-disputes": {
302
- setPayment: (_payment: string | undefined): void => {},
303
- setOnDisputesLoaded: (
364
+ "payment-method-settings": {
365
+ setPaymentMethodConfiguration: (
366
+ _paymentMethodConfiguration: string | undefined
367
+ ): void => {},
368
+ },
369
+ "capital-financing": {
370
+ setDefaultFinancingOffer: (
371
+ _defaultFinancingOffer: string | undefined
372
+ ): void => {},
373
+ setShowFinancingSelector: (
374
+ _showFinancingSelector: boolean | undefined
375
+ ): void => {},
376
+ setHowCapitalWorksUrl: (
377
+ _howCapitalWorksUrl: string | undefined
378
+ ): void => {},
379
+ setSupportUrl: (_supportUrl: string | undefined): void => {},
380
+ setOnFinancingsLoaded: (
304
381
  _listener: (({ total }: { total: number }) => void) | undefined
305
382
  ): void => {},
306
383
  },
384
+ "capital-financing-application": {
385
+ setOnApplicationSubmitted: (
386
+ _listener: (() => void) | undefined
387
+ ): void => {},
388
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
389
+ setHowCapitalWorksUrl: (
390
+ _howCapitalWorksUrl: string | undefined
391
+ ): void => {},
392
+ setOnApplicationStepChange: (
393
+ _listener: (({ step }: StepChange) => void) | undefined
394
+ ): void => {},
395
+ setDefaultFinancingOffer: (
396
+ _defaultFinancingOffer: string | undefined
397
+ ): void => {},
398
+ },
399
+ "capital-financing-promotion": {
400
+ setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
401
+ setOnApplicationSubmitted: (
402
+ _listener: (() => void) | undefined
403
+ ): void => {},
404
+ setOnEligibleFinancingOfferLoaded: (
405
+ _listener:
406
+ | (({
407
+ productType,
408
+ activeFinancingCount,
409
+ }: FinancingProductType) => void)
410
+ | undefined
411
+ ): void => {},
412
+ setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
413
+ setHowCapitalWorksUrl: (
414
+ _howCapitalWorksUrl: string | undefined
415
+ ): void => {},
416
+ setEligibilityCriteriaUrl: (
417
+ _eligibilityCriteriaUrl: string | undefined
418
+ ): void => {},
419
+ setOnApplicationStepChange: (
420
+ _listener: (({ step }: StepChange) => void) | undefined
421
+ ): void => {},
422
+ },
423
+ "reporting-chart": {
424
+ setReportName: (_reportName: ReportName): void => {},
425
+ setIntervalStart: (_intervalStart: Date | undefined): void => {},
426
+ setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
427
+ setIntervalType: (_intervalType: IntervalType | undefined): void => {},
428
+ },
307
429
  "tax-settings": {
308
430
  setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
309
431
  setDisplayHeadOfficeCountries: (
@@ -322,10 +444,46 @@ export const ConnectElementCustomMethodConfig = {
322
444
  _listener: (({ id }: { id: string }) => void) | undefined
323
445
  ): void => {},
324
446
  },
447
+ "tax-threshold-monitoring": {
448
+ setDisplayCountries: (_countries: string[] | undefined): void => {},
449
+ },
450
+ "product-tax-code-selector": {
451
+ setOnTaxCodeSelect: (
452
+ _listener:
453
+ | ((
454
+ taxCode: string | null,
455
+ _: { analyticsName: string } | null
456
+ ) => void)
457
+ | undefined
458
+ ): void => {},
459
+ setHideDescription: (_hideDescription: boolean | undefined): void => {},
460
+ setDisabled: (_disabled: boolean | undefined): void => {},
461
+ setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
462
+ },
463
+ "export-tax-transactions": {},
325
464
  "payout-details": {
326
465
  setPayout: (_payout: string | undefined): void => {},
327
466
  setOnClose: (_listener: (() => void) | undefined): void => {},
328
467
  },
468
+ "check-scanning": {
469
+ setHandleCheckScanSubmitted: (
470
+ _handleCheckScanSubmitted: ({
471
+ checkScanToken,
472
+ }: {
473
+ checkScanToken: string;
474
+ }) => Promise<void>
475
+ ): void => {},
476
+ },
477
+ "agentic-commerce-settings": {
478
+ setOnAgreementUpdated: (
479
+ _listener:
480
+ | (({ agreementId }: { agreementId: string }) => void)
481
+ | undefined
482
+ ): void => {},
483
+ },
484
+ "terminal-hardware-shop": {
485
+ setOnCheckoutFinished: (_listener: (() => void) | undefined): void => {},
486
+ },
329
487
  "payout-reconciliation-report": {
330
488
  setOnReportAvailabilityLoaded: (
331
489
  _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;