-
Notifications
You must be signed in to change notification settings - Fork 472
/
Copy pathaccountsession.go
700 lines (643 loc) · 44.3 KB
/
accountsession.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
//
//
// File generated from our OpenAPI spec
//
//
package stripe
// The list of features enabled in the embedded component.
type AccountSessionComponentsAccountManagementFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection *bool `form:"external_account_collection"`
}
// Configuration for the account management embedded component.
type AccountSessionComponentsAccountManagementParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsAccountManagementFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsAccountOnboardingFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection *bool `form:"external_account_collection"`
}
// Configuration for the account onboarding embedded component.
type AccountSessionComponentsAccountOnboardingParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsAccountOnboardingFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsAppInstallFeaturesParams struct {
// List of apps allowed to be enabled for this account session.
AllowedApps []*string `form:"allowed_apps"`
}
// Configuration for the app install component.
type AccountSessionComponentsAppInstallParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsAppInstallFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsAppViewportFeaturesParams struct {
// List of apps allowed to be enabled for this account session.
AllowedApps []*string `form:"allowed_apps"`
}
// Configuration for the app viewport component.
type AccountSessionComponentsAppViewportParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsAppViewportFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsBalancesFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
EditPayoutSchedule *bool `form:"edit_payout_schedule"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection *bool `form:"external_account_collection"`
// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
InstantPayouts *bool `form:"instant_payouts"`
// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
StandardPayouts *bool `form:"standard_payouts"`
}
// Configuration for the balances embedded component.
type AccountSessionComponentsBalancesParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsBalancesFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingFeaturesParams struct{}
// Configuration for the capital financing embedded component.
type AccountSessionComponentsCapitalFinancingParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalFinancingFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingApplicationFeaturesParams struct{}
// Configuration for the capital financing application embedded component.
type AccountSessionComponentsCapitalFinancingApplicationParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalFinancingApplicationFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingPromotionFeaturesParams struct{}
// Configuration for the capital financing promotion embedded component.
type AccountSessionComponentsCapitalFinancingPromotionParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalFinancingPromotionFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalOverviewFeaturesParams struct{}
// Configuration for the capital overview embedded component.
type AccountSessionComponentsCapitalOverviewParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalOverviewFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsDocumentsFeaturesParams struct{}
// Configuration for the documents embedded component.
type AccountSessionComponentsDocumentsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsFinancialAccountFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow external accounts to be linked for money transfer.
ExternalAccountCollection *bool `form:"external_account_collection"`
// Whether to allow sending money.
SendMoney *bool `form:"send_money"`
// Whether to allow transferring balance.
TransferBalance *bool `form:"transfer_balance"`
}
// Configuration for the financial account embedded component.
type AccountSessionComponentsFinancialAccountParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsFinancialAccountFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsFinancialAccountTransactionsFeaturesParams struct {
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
}
// Configuration for the financial account transactions embedded component.
type AccountSessionComponentsFinancialAccountTransactionsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsFinancialAccountTransactionsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsIssuingCardFeaturesParams struct {
// Whether to allow cardholder management features.
CardholderManagement *bool `form:"cardholder_management"`
// Whether to allow card management features.
CardManagement *bool `form:"card_management"`
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
// Whether to allow spend control management features.
SpendControlManagement *bool `form:"spend_control_management"`
}
// Configuration for the issuing card embedded component.
type AccountSessionComponentsIssuingCardParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsIssuingCardFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsIssuingCardsListFeaturesParams struct {
// Whether to allow cardholder management features.
CardholderManagement *bool `form:"cardholder_management"`
// Whether to allow card management features.
CardManagement *bool `form:"card_management"`
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow spend control management features.
SpendControlManagement *bool `form:"spend_control_management"`
}
// Configuration for the issuing cards list embedded component.
type AccountSessionComponentsIssuingCardsListParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsIssuingCardsListFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsNotificationBannerFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection *bool `form:"external_account_collection"`
}
// Configuration for the notification banner embedded component.
type AccountSessionComponentsNotificationBannerParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsNotificationBannerFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsPaymentDetailsFeaturesParams struct {
// Whether to allow capturing and cancelling payment intents. This is `true` by default.
CapturePayments *bool `form:"capture_payments"`
// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
DestinationOnBehalfOfChargeManagement *bool `form:"destination_on_behalf_of_charge_management"`
// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
DisputeManagement *bool `form:"dispute_management"`
// Whether to allow sending refunds. This is `true` by default.
RefundManagement *bool `form:"refund_management"`
}
// Configuration for the payment details embedded component.
type AccountSessionComponentsPaymentDetailsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPaymentDetailsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsPaymentMethodSettingsFeaturesParams struct{}
// Configuration for the payment method settings embedded component.
type AccountSessionComponentsPaymentMethodSettingsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPaymentMethodSettingsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsPaymentsFeaturesParams struct {
// Whether to allow capturing and cancelling payment intents. This is `true` by default.
CapturePayments *bool `form:"capture_payments"`
// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
DestinationOnBehalfOfChargeManagement *bool `form:"destination_on_behalf_of_charge_management"`
// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
DisputeManagement *bool `form:"dispute_management"`
// Whether to allow sending refunds. This is `true` by default.
RefundManagement *bool `form:"refund_management"`
}
// Configuration for the payments embedded component.
type AccountSessionComponentsPaymentsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPaymentsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsPayoutsFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
EditPayoutSchedule *bool `form:"edit_payout_schedule"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection *bool `form:"external_account_collection"`
// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
InstantPayouts *bool `form:"instant_payouts"`
// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
StandardPayouts *bool `form:"standard_payouts"`
}
// Configuration for the payouts embedded component.
type AccountSessionComponentsPayoutsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPayoutsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsPayoutsListFeaturesParams struct{}
// Configuration for the payouts list embedded component.
type AccountSessionComponentsPayoutsListParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPayoutsListFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsProductTaxCodeSelectorFeaturesParams struct{}
// Configuration for the product tax code selector embedded component.
type AccountSessionComponentsProductTaxCodeSelectorParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsProductTaxCodeSelectorFeaturesParams `form:"features"`
}
type AccountSessionComponentsRecipientsFeaturesParams struct {
// Whether to allow sending money.
SendMoney *bool `form:"send_money"`
}
// Configuration for the recipients component.
type AccountSessionComponentsRecipientsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
Features *AccountSessionComponentsRecipientsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsReportingChartFeaturesParams struct{}
// Configuration for the reporting chart embedded component.
type AccountSessionComponentsReportingChartParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsReportingChartFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsTaxRegistrationsFeaturesParams struct{}
// Configuration for the tax registrations embedded component.
type AccountSessionComponentsTaxRegistrationsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsTaxRegistrationsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsTaxSettingsFeaturesParams struct{}
// Configuration for the tax settings embedded component.
type AccountSessionComponentsTaxSettingsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsTaxSettingsFeaturesParams `form:"features"`
}
// The list of features enabled in the embedded component.
type AccountSessionComponentsTaxThresholdMonitoringFeaturesParams struct{}
// Configuration for the tax threshold monitoring embedded component.
type AccountSessionComponentsTaxThresholdMonitoringParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsTaxThresholdMonitoringFeaturesParams `form:"features"`
}
// Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
type AccountSessionComponentsParams struct {
// Configuration for the account management embedded component.
AccountManagement *AccountSessionComponentsAccountManagementParams `form:"account_management"`
// Configuration for the account onboarding embedded component.
AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"`
// Configuration for the app install component.
AppInstall *AccountSessionComponentsAppInstallParams `form:"app_install"`
// Configuration for the app viewport component.
AppViewport *AccountSessionComponentsAppViewportParams `form:"app_viewport"`
// Configuration for the balances embedded component.
Balances *AccountSessionComponentsBalancesParams `form:"balances"`
// Configuration for the capital financing embedded component.
CapitalFinancing *AccountSessionComponentsCapitalFinancingParams `form:"capital_financing"`
// Configuration for the capital financing application embedded component.
CapitalFinancingApplication *AccountSessionComponentsCapitalFinancingApplicationParams `form:"capital_financing_application"`
// Configuration for the capital financing promotion embedded component.
CapitalFinancingPromotion *AccountSessionComponentsCapitalFinancingPromotionParams `form:"capital_financing_promotion"`
// Configuration for the capital overview embedded component.
CapitalOverview *AccountSessionComponentsCapitalOverviewParams `form:"capital_overview"`
// Configuration for the documents embedded component.
Documents *AccountSessionComponentsDocumentsParams `form:"documents"`
// Configuration for the financial account embedded component.
FinancialAccount *AccountSessionComponentsFinancialAccountParams `form:"financial_account"`
// Configuration for the financial account transactions embedded component.
FinancialAccountTransactions *AccountSessionComponentsFinancialAccountTransactionsParams `form:"financial_account_transactions"`
// Configuration for the issuing card embedded component.
IssuingCard *AccountSessionComponentsIssuingCardParams `form:"issuing_card"`
// Configuration for the issuing cards list embedded component.
IssuingCardsList *AccountSessionComponentsIssuingCardsListParams `form:"issuing_cards_list"`
// Configuration for the notification banner embedded component.
NotificationBanner *AccountSessionComponentsNotificationBannerParams `form:"notification_banner"`
// Configuration for the payment details embedded component.
PaymentDetails *AccountSessionComponentsPaymentDetailsParams `form:"payment_details"`
// Configuration for the payment method settings embedded component.
PaymentMethodSettings *AccountSessionComponentsPaymentMethodSettingsParams `form:"payment_method_settings"`
// Configuration for the payments embedded component.
Payments *AccountSessionComponentsPaymentsParams `form:"payments"`
// Configuration for the payouts embedded component.
Payouts *AccountSessionComponentsPayoutsParams `form:"payouts"`
// Configuration for the payouts list embedded component.
PayoutsList *AccountSessionComponentsPayoutsListParams `form:"payouts_list"`
// Configuration for the product tax code selector embedded component.
ProductTaxCodeSelector *AccountSessionComponentsProductTaxCodeSelectorParams `form:"product_tax_code_selector"`
// Configuration for the recipients component.
Recipients *AccountSessionComponentsRecipientsParams `form:"recipients"`
// Configuration for the reporting chart embedded component.
ReportingChart *AccountSessionComponentsReportingChartParams `form:"reporting_chart"`
// Configuration for the tax registrations embedded component.
TaxRegistrations *AccountSessionComponentsTaxRegistrationsParams `form:"tax_registrations"`
// Configuration for the tax settings embedded component.
TaxSettings *AccountSessionComponentsTaxSettingsParams `form:"tax_settings"`
// Configuration for the tax threshold monitoring embedded component.
TaxThresholdMonitoring *AccountSessionComponentsTaxThresholdMonitoringParams `form:"tax_threshold_monitoring"`
}
// Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
type AccountSessionParams struct {
Params `form:"*"`
// The identifier of the account to create an Account Session for.
Account *string `form:"account"`
// Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
Components *AccountSessionComponentsParams `form:"components"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}
// AddExpand appends a new field to expand.
func (p *AccountSessionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
type AccountSessionComponentsAccountManagementFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection bool `json:"external_account_collection"`
}
type AccountSessionComponentsAccountManagement struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsAccountManagementFeatures `json:"features"`
}
type AccountSessionComponentsAccountOnboardingFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection bool `json:"external_account_collection"`
}
type AccountSessionComponentsAccountOnboarding struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"`
}
type AccountSessionComponentsBalancesFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
EditPayoutSchedule bool `json:"edit_payout_schedule"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection bool `json:"external_account_collection"`
// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
InstantPayouts bool `json:"instant_payouts"`
// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
StandardPayouts bool `json:"standard_payouts"`
}
type AccountSessionComponentsBalances struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsBalancesFeatures `json:"features"`
}
type AccountSessionComponentsCapitalFinancingFeatures struct{}
type AccountSessionComponentsCapitalFinancing struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsCapitalFinancingFeatures `json:"features"`
}
type AccountSessionComponentsCapitalFinancingApplicationFeatures struct{}
type AccountSessionComponentsCapitalFinancingApplication struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsCapitalFinancingApplicationFeatures `json:"features"`
}
type AccountSessionComponentsCapitalFinancingPromotionFeatures struct{}
type AccountSessionComponentsCapitalFinancingPromotion struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsCapitalFinancingPromotionFeatures `json:"features"`
}
type AccountSessionComponentsDocumentsFeatures struct{}
type AccountSessionComponentsDocuments struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsDocumentsFeatures `json:"features"`
}
type AccountSessionComponentsFinancialAccountFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow external accounts to be linked for money transfer.
ExternalAccountCollection bool `json:"external_account_collection"`
// Whether to allow sending money.
SendMoney bool `json:"send_money"`
// Whether to allow transferring balance.
TransferBalance bool `json:"transfer_balance"`
}
type AccountSessionComponentsFinancialAccount struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsFinancialAccountFeatures `json:"features"`
}
type AccountSessionComponentsFinancialAccountTransactionsFeatures struct {
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
}
type AccountSessionComponentsFinancialAccountTransactions struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsFinancialAccountTransactionsFeatures `json:"features"`
}
type AccountSessionComponentsIssuingCardFeatures struct {
// Whether to allow cardholder management features.
CardholderManagement bool `json:"cardholder_management"`
// Whether to allow card management features.
CardManagement bool `json:"card_management"`
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
// Whether to allow spend control management features.
SpendControlManagement bool `json:"spend_control_management"`
}
type AccountSessionComponentsIssuingCard struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsIssuingCardFeatures `json:"features"`
}
type AccountSessionComponentsIssuingCardsListFeatures struct {
// Whether to allow cardholder management features.
CardholderManagement bool `json:"cardholder_management"`
// Whether to allow card management features.
CardManagement bool `json:"card_management"`
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow spend control management features.
SpendControlManagement bool `json:"spend_control_management"`
}
type AccountSessionComponentsIssuingCardsList struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsIssuingCardsListFeatures `json:"features"`
}
type AccountSessionComponentsNotificationBannerFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection bool `json:"external_account_collection"`
}
type AccountSessionComponentsNotificationBanner struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsNotificationBannerFeatures `json:"features"`
}
type AccountSessionComponentsPaymentDetailsFeatures struct {
// Whether to allow capturing and cancelling payment intents. This is `true` by default.
CapturePayments bool `json:"capture_payments"`
// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
DestinationOnBehalfOfChargeManagement bool `json:"destination_on_behalf_of_charge_management"`
// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
DisputeManagement bool `json:"dispute_management"`
// Whether to allow sending refunds. This is `true` by default.
RefundManagement bool `json:"refund_management"`
}
type AccountSessionComponentsPaymentDetails struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsPaymentDetailsFeatures `json:"features"`
}
type AccountSessionComponentsPaymentsFeatures struct {
// Whether to allow capturing and cancelling payment intents. This is `true` by default.
CapturePayments bool `json:"capture_payments"`
// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
DestinationOnBehalfOfChargeManagement bool `json:"destination_on_behalf_of_charge_management"`
// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
DisputeManagement bool `json:"dispute_management"`
// Whether to allow sending refunds. This is `true` by default.
RefundManagement bool `json:"refund_management"`
}
type AccountSessionComponentsPayments struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsPaymentsFeatures `json:"features"`
}
type AccountSessionComponentsPayoutsFeatures struct {
// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
EditPayoutSchedule bool `json:"edit_payout_schedule"`
// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
ExternalAccountCollection bool `json:"external_account_collection"`
// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
InstantPayouts bool `json:"instant_payouts"`
// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
StandardPayouts bool `json:"standard_payouts"`
}
type AccountSessionComponentsPayouts struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsPayoutsFeatures `json:"features"`
}
type AccountSessionComponentsPayoutsListFeatures struct{}
type AccountSessionComponentsPayoutsList struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsPayoutsListFeatures `json:"features"`
}
type AccountSessionComponentsTaxRegistrationsFeatures struct{}
type AccountSessionComponentsTaxRegistrations struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsTaxRegistrationsFeatures `json:"features"`
}
type AccountSessionComponentsTaxSettingsFeatures struct{}
type AccountSessionComponentsTaxSettings struct {
// Whether the embedded component is enabled.
Enabled bool `json:"enabled"`
Features *AccountSessionComponentsTaxSettingsFeatures `json:"features"`
}
type AccountSessionComponents struct {
AccountManagement *AccountSessionComponentsAccountManagement `json:"account_management"`
AccountOnboarding *AccountSessionComponentsAccountOnboarding `json:"account_onboarding"`
Balances *AccountSessionComponentsBalances `json:"balances"`
CapitalFinancing *AccountSessionComponentsCapitalFinancing `json:"capital_financing"`
CapitalFinancingApplication *AccountSessionComponentsCapitalFinancingApplication `json:"capital_financing_application"`
CapitalFinancingPromotion *AccountSessionComponentsCapitalFinancingPromotion `json:"capital_financing_promotion"`
Documents *AccountSessionComponentsDocuments `json:"documents"`
FinancialAccount *AccountSessionComponentsFinancialAccount `json:"financial_account"`
FinancialAccountTransactions *AccountSessionComponentsFinancialAccountTransactions `json:"financial_account_transactions"`
IssuingCard *AccountSessionComponentsIssuingCard `json:"issuing_card"`
IssuingCardsList *AccountSessionComponentsIssuingCardsList `json:"issuing_cards_list"`
NotificationBanner *AccountSessionComponentsNotificationBanner `json:"notification_banner"`
PaymentDetails *AccountSessionComponentsPaymentDetails `json:"payment_details"`
Payments *AccountSessionComponentsPayments `json:"payments"`
Payouts *AccountSessionComponentsPayouts `json:"payouts"`
PayoutsList *AccountSessionComponentsPayoutsList `json:"payouts_list"`
TaxRegistrations *AccountSessionComponentsTaxRegistrations `json:"tax_registrations"`
TaxSettings *AccountSessionComponentsTaxSettings `json:"tax_settings"`
}
// An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
//
// We recommend that you create an AccountSession each time you need to display an embedded component
// to your user. Do not save AccountSessions to your database as they expire relatively
// quickly, and cannot be used more than once.
//
// Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
type AccountSession struct {
APIResource
// The ID of the account the AccountSession was created for
Account string `json:"account"`
// The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
//
// The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
//
// Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
ClientSecret string `json:"client_secret"`
Components *AccountSessionComponents `json:"components"`
// The timestamp at which this AccountSession will expire.
ExpiresAt int64 `json:"expires_at"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
}