stripe 19.2.0-alpha.2 → 19.2.0-alpha.4

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
  5. package/cjs/resources/Identity/BlocklistEntries.js +25 -0
  6. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
  7. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +5 -0
  8. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +5 -0
  9. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +13 -0
  10. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +4 -0
  11. package/cjs/resources.js +7 -1
  12. package/cjs/stripe.core.js +1 -1
  13. package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
  14. package/esm/resources/Identity/BlocklistEntries.js +22 -0
  15. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
  16. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +5 -0
  17. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +5 -0
  18. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +13 -0
  19. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +4 -0
  20. package/esm/resources.js +6 -0
  21. package/esm/stripe.core.js +1 -1
  22. package/package.json +1 -1
  23. package/types/Billing/MeterEventSummaries.d.ts +7 -0
  24. package/types/Billing/Meters.d.ts +5 -0
  25. package/types/Billing/MetersResource.d.ts +17 -0
  26. package/types/DelegatedCheckout/RequestedSessions.d.ts +292 -0
  27. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +591 -0
  28. package/types/Identity/BlocklistEntries.d.ts +78 -0
  29. package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
  30. package/types/Identity/VerificationReports.d.ts +10 -0
  31. package/types/Identity/VerificationReportsResource.d.ts +5 -0
  32. package/types/V2/Billing/Cadences.d.ts +2 -2
  33. package/types/V2/Billing/CollectionSettingVersions.d.ts +2 -2
  34. package/types/V2/Billing/CollectionSettings.d.ts +2 -2
  35. package/types/V2/Billing/CollectionSettingsResource.d.ts +4 -4
  36. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
  37. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
  38. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +2 -0
  39. package/types/V2/Core/Accounts.d.ts +93 -2
  40. package/types/V2/Core/AccountsResource.d.ts +88 -5
  41. package/types/V2/Core/EventTypes.d.ts +99 -0
  42. package/types/V2/Core/EventsResource.d.ts +29 -3
  43. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +22 -0
  44. package/types/V2/Core/Vault/UsBankAccounts.d.ts +46 -0
  45. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +75 -0
  46. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +25 -0
  47. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +1 -1
  48. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +1 -0
  49. package/types/index.d.ts +10 -0
@@ -0,0 +1,146 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace Identity {
6
+ interface BlocklistEntryCreateParams {
7
+ /**
8
+ * The type of blocklist entry to be created.
9
+ */
10
+ entry_type: BlocklistEntryCreateParams.EntryType;
11
+
12
+ /**
13
+ * The identifier of the VerificationReport to create the BlocklistEntry from.
14
+ */
15
+ verification_report: string;
16
+
17
+ /**
18
+ * When true, the created BlocklistEntry will be used to retroactively unverify matching verifications.
19
+ */
20
+ check_existing_verifications?: boolean;
21
+
22
+ /**
23
+ * Specifies which fields in the response should be expanded.
24
+ */
25
+ expand?: Array<string>;
26
+ }
27
+
28
+ namespace BlocklistEntryCreateParams {
29
+ type EntryType = 'document' | 'selfie';
30
+ }
31
+
32
+ interface BlocklistEntryRetrieveParams {
33
+ /**
34
+ * Specifies which fields in the response should be expanded.
35
+ */
36
+ expand?: Array<string>;
37
+ }
38
+
39
+ interface BlocklistEntryListParams extends PaginationParams {
40
+ /**
41
+ * Only return BlocklistEntries that were created during the given date interval.
42
+ */
43
+ created?: Stripe.RangeQueryParam | number;
44
+
45
+ /**
46
+ * Specifies which fields in the response should be expanded.
47
+ */
48
+ expand?: Array<string>;
49
+
50
+ /**
51
+ * Only return blocklist entries with the specified status.
52
+ */
53
+ status?: BlocklistEntryListParams.Status;
54
+
55
+ /**
56
+ * Only return blocklist entries of the specified type.
57
+ */
58
+ type?: BlocklistEntryListParams.Type;
59
+
60
+ /**
61
+ * Only return blocklist entries created from this verification report.
62
+ */
63
+ verification_report?: string;
64
+ }
65
+
66
+ namespace BlocklistEntryListParams {
67
+ type Status = 'active' | 'disabled' | 'redacted';
68
+
69
+ type Type = 'document' | 'selfie';
70
+ }
71
+
72
+ interface BlocklistEntryDisableParams {
73
+ /**
74
+ * Specifies which fields in the response should be expanded.
75
+ */
76
+ expand?: Array<string>;
77
+ }
78
+
79
+ class BlocklistEntriesResource {
80
+ /**
81
+ * Creates a BlocklistEntry object from a verification report.
82
+ *
83
+ * A blocklist entry prevents future identity verifications that match the same identity information.
84
+ * You can create blocklist entries from verification reports that contain document extracted data
85
+ * or a selfie.
86
+ *
87
+ * Related guide: [Identity Verification Blocklist](https://docs.stripe.com/docs/identity/review-tools#add-a-blocklist-entry)
88
+ */
89
+ create(
90
+ params: BlocklistEntryCreateParams,
91
+ options?: RequestOptions
92
+ ): Promise<Stripe.Response<Stripe.Identity.BlocklistEntry>>;
93
+
94
+ /**
95
+ * Retrieves a BlocklistEntry object by its identifier.
96
+ *
97
+ * Related guide: [Identity Verification Blocklist](https://docs.stripe.com/docs/identity/review-tools#block-list)
98
+ */
99
+ retrieve(
100
+ id: string,
101
+ params?: BlocklistEntryRetrieveParams,
102
+ options?: RequestOptions
103
+ ): Promise<Stripe.Response<Stripe.Identity.BlocklistEntry>>;
104
+ retrieve(
105
+ id: string,
106
+ options?: RequestOptions
107
+ ): Promise<Stripe.Response<Stripe.Identity.BlocklistEntry>>;
108
+
109
+ /**
110
+ * Returns a list of BlocklistEntry objects associated with your account.
111
+ *
112
+ * The blocklist entries are returned sorted by creation date, with the most recently created
113
+ * entries appearing first.
114
+ *
115
+ * Related guide: [Identity Verification Blocklist](https://docs.stripe.com/docs/identity/review-tools#block-list)
116
+ */
117
+ list(
118
+ params?: BlocklistEntryListParams,
119
+ options?: RequestOptions
120
+ ): ApiListPromise<Stripe.Identity.BlocklistEntry>;
121
+ list(
122
+ options?: RequestOptions
123
+ ): ApiListPromise<Stripe.Identity.BlocklistEntry>;
124
+
125
+ /**
126
+ * Disables a BlocklistEntry object.
127
+ *
128
+ * After a BlocklistEntry is disabled, it will no longer block future verifications that match
129
+ * the same information. This action is irreversible. To re-enable it, a new BlocklistEntry
130
+ * must be created using the same verification report.
131
+ *
132
+ * Related guide: [Identity Verification Blocklist](https://docs.stripe.com/docs/identity/review-tools#disable-a-blocklist-entry)
133
+ */
134
+ disable(
135
+ id: string,
136
+ params?: BlocklistEntryDisableParams,
137
+ options?: RequestOptions
138
+ ): Promise<Stripe.Response<Stripe.Identity.BlocklistEntry>>;
139
+ disable(
140
+ id: string,
141
+ options?: RequestOptions
142
+ ): Promise<Stripe.Response<Stripe.Identity.BlocklistEntry>>;
143
+ }
144
+ }
145
+ }
146
+ }
@@ -161,6 +161,11 @@ declare module 'stripe' {
161
161
  * Sex as it appears in the document.
162
162
  */
163
163
  unparsed_sex?: string | null;
164
+
165
+ /**
166
+ * If document was not verified due to extracted data being on the blocklist, this is the token of the BlocklistEntry that blocked it
167
+ */
168
+ blocked_by_entry?: string | Stripe.Identity.BlocklistEntry | null;
164
169
  }
165
170
 
166
171
  namespace Document {
@@ -454,6 +459,11 @@ declare module 'stripe' {
454
459
  * Status of this `selfie` check.
455
460
  */
456
461
  status: Selfie.Status;
462
+
463
+ /**
464
+ * If selfie was not verified due to being on the blocklist, this is the token of the BlocklistEntry that blocked it
465
+ */
466
+ blocked_by_entry?: string | Stripe.Identity.BlocklistEntry | null;
457
467
  }
458
468
 
459
469
  namespace Selfie {
@@ -11,6 +11,11 @@ declare module 'stripe' {
11
11
  }
12
12
 
13
13
  interface VerificationReportListParams extends PaginationParams {
14
+ /**
15
+ * Only return VerificationReports that were blocked by this BlocklistEntry id.
16
+ */
17
+ blocked_by_entry?: string;
18
+
14
19
  /**
15
20
  * A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
16
21
  */
@@ -470,7 +470,7 @@ declare module 'stripe' {
470
470
 
471
471
  interface EmailDelivery {
472
472
  /**
473
- * Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
473
+ * Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
474
474
  */
475
475
  payment_due?: EmailDelivery.PaymentDue;
476
476
  }
@@ -483,7 +483,7 @@ declare module 'stripe' {
483
483
  enabled: boolean;
484
484
 
485
485
  /**
486
- * If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
486
+ * If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
487
487
  */
488
488
  include_payment_link: boolean;
489
489
  }
@@ -57,7 +57,7 @@ declare module 'stripe' {
57
57
 
58
58
  interface EmailDelivery {
59
59
  /**
60
- * Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
60
+ * Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
61
61
  */
62
62
  payment_due?: EmailDelivery.PaymentDue;
63
63
  }
@@ -70,7 +70,7 @@ declare module 'stripe' {
70
70
  enabled: boolean;
71
71
 
72
72
  /**
73
- * If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
73
+ * If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
74
74
  */
75
75
  include_payment_link: boolean;
76
76
  }
@@ -80,7 +80,7 @@ declare module 'stripe' {
80
80
 
81
81
  interface EmailDelivery {
82
82
  /**
83
- * Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
83
+ * Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
84
84
  */
85
85
  payment_due?: EmailDelivery.PaymentDue;
86
86
  }
@@ -93,7 +93,7 @@ declare module 'stripe' {
93
93
  enabled: boolean;
94
94
 
95
95
  /**
96
- * If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
96
+ * If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
97
97
  */
98
98
  include_payment_link: boolean;
99
99
  }
@@ -46,7 +46,7 @@ declare module 'stripe' {
46
46
 
47
47
  interface EmailDelivery {
48
48
  /**
49
- * Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
49
+ * Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
50
50
  */
51
51
  payment_due?: EmailDelivery.PaymentDue;
52
52
  }
@@ -59,7 +59,7 @@ declare module 'stripe' {
59
59
  enabled: boolean;
60
60
 
61
61
  /**
62
- * If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
62
+ * If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
63
63
  */
64
64
  include_payment_link: boolean;
65
65
  }
@@ -353,7 +353,7 @@ declare module 'stripe' {
353
353
 
354
354
  interface EmailDelivery {
355
355
  /**
356
- * Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
356
+ * Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
357
357
  */
358
358
  payment_due?: EmailDelivery.PaymentDue;
359
359
  }
@@ -366,7 +366,7 @@ declare module 'stripe' {
366
366
  enabled: boolean;
367
367
 
368
368
  /**
369
- * If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
369
+ * If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
370
370
  */
371
371
  include_payment_link: boolean;
372
372
  }
@@ -0,0 +1,57 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ /**
8
+ * A set of component subscriptions for a Pricing Plan Subscription.
9
+ */
10
+ interface PricingPlanSubscriptionComponents {
11
+ /**
12
+ * String representing the object's type. Objects of the same type share the same value of the object field.
13
+ */
14
+ object: 'v2.billing.pricing_plan_subscription_components';
15
+
16
+ /**
17
+ * The component subscriptions of the Pricing Plan Subscription.
18
+ */
19
+ components: Array<PricingPlanSubscriptionComponents.Component>;
20
+
21
+ /**
22
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
23
+ */
24
+ livemode: boolean;
25
+ }
26
+
27
+ namespace PricingPlanSubscriptionComponents {
28
+ interface Component {
29
+ /**
30
+ * The Pricing Plan Component associated with this component subscription.
31
+ */
32
+ pricing_plan_component: string;
33
+
34
+ /**
35
+ * The type of subscription.
36
+ */
37
+ type: Component.Type;
38
+
39
+ /**
40
+ * The ID of the License Fee Subscription.
41
+ */
42
+ license_fee_subscription?: string;
43
+
44
+ /**
45
+ * The ID of the Rate Card Subscription.
46
+ */
47
+ rate_card_subscription?: string;
48
+ }
49
+
50
+ namespace Component {
51
+ type Type = 'license_fee_subscription' | 'rate_card_subscription';
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,40 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ namespace PricingPlanSubscriptions {
8
+ interface ComponentRetrieveParams {}
9
+ }
10
+ }
11
+
12
+ namespace Billing {
13
+ namespace PricingPlanSubscriptions {
14
+ class ComponentsResource {
15
+ /**
16
+ * Retrieve a Pricing Plan Subscription's components.
17
+ */
18
+ retrieve(
19
+ id: string,
20
+ params?: ComponentRetrieveParams,
21
+ options?: RequestOptions
22
+ ): Promise<
23
+ Stripe.Response<
24
+ Stripe.V2.Billing.PricingPlanSubscriptionComponents
25
+ >
26
+ >;
27
+ retrieve(
28
+ id: string,
29
+ options?: RequestOptions
30
+ ): Promise<
31
+ Stripe.Response<
32
+ Stripe.V2.Billing.PricingPlanSubscriptionComponents
33
+ >
34
+ >;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -73,6 +73,8 @@ declare module 'stripe' {
73
73
 
74
74
  namespace Billing {
75
75
  class PricingPlanSubscriptionsResource {
76
+ components: Stripe.V2.Billing.PricingPlanSubscriptions.ComponentsResource;
77
+
76
78
  /**
77
79
  * Retrieve a Pricing Plan Subscription object.
78
80
  */
@@ -23,6 +23,11 @@ declare module 'stripe' {
23
23
  */
24
24
  applied_configurations: Array<Account.AppliedConfiguration>;
25
25
 
26
+ /**
27
+ * A value indicating if the Account has been closed.
28
+ */
29
+ closed?: boolean;
30
+
26
31
  /**
27
32
  * An Account Configuration which allows the Account to take on a key persona across Stripe products.
28
33
  */
@@ -585,6 +590,7 @@ declare module 'stripe' {
585
590
  type LocationSource =
586
591
  | 'identity_address'
587
592
  | 'ip_address'
593
+ | 'payment_method'
588
594
  | 'shipping_address';
589
595
  }
590
596
 
@@ -4156,6 +4162,11 @@ declare module 'stripe' {
4156
4162
  * Can hold storage-type funds on Stripe in GBP.
4157
4163
  */
4158
4164
  gbp?: HoldsCurrencies.Gbp;
4165
+
4166
+ /**
4167
+ * Can hold storage-type funds on Stripe in USD.
4168
+ */
4169
+ usd?: HoldsCurrencies.Usd;
4159
4170
  }
4160
4171
 
4161
4172
  namespace HoldsCurrencies {
@@ -4211,6 +4222,59 @@ declare module 'stripe' {
4211
4222
  | 'provide_info';
4212
4223
  }
4213
4224
  }
4225
+
4226
+ interface Usd {
4227
+ /**
4228
+ * Whether the Capability has been requested.
4229
+ */
4230
+ requested: boolean;
4231
+
4232
+ /**
4233
+ * The status of the Capability.
4234
+ */
4235
+ status: Usd.Status;
4236
+
4237
+ /**
4238
+ * Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
4239
+ */
4240
+ status_details: Array<Usd.StatusDetail>;
4241
+ }
4242
+
4243
+ namespace Usd {
4244
+ type Status =
4245
+ | 'active'
4246
+ | 'pending'
4247
+ | 'restricted'
4248
+ | 'unsupported';
4249
+
4250
+ interface StatusDetail {
4251
+ /**
4252
+ * Machine-readable code explaining the reason for the Capability to be in its current status.
4253
+ */
4254
+ code: StatusDetail.Code;
4255
+
4256
+ /**
4257
+ * Machine-readable code explaining how to make the Capability active.
4258
+ */
4259
+ resolution: StatusDetail.Resolution;
4260
+ }
4261
+
4262
+ namespace StatusDetail {
4263
+ type Code =
4264
+ | 'determining_status'
4265
+ | 'requirements_past_due'
4266
+ | 'requirements_pending_verification'
4267
+ | 'restricted_other'
4268
+ | 'unsupported_business'
4269
+ | 'unsupported_country'
4270
+ | 'unsupported_entity_type';
4271
+
4272
+ type Resolution =
4273
+ | 'contact_stripe'
4274
+ | 'no_resolution'
4275
+ | 'provide_info';
4276
+ }
4277
+ }
4214
4278
  }
4215
4279
 
4216
4280
  interface InboundTransfers {
@@ -4717,7 +4781,11 @@ declare module 'stripe' {
4717
4781
  }
4718
4782
 
4719
4783
  namespace Responsibilities {
4720
- type FeesCollector = 'application' | 'stripe';
4784
+ type FeesCollector =
4785
+ | 'application'
4786
+ | 'application_custom'
4787
+ | 'application_express'
4788
+ | 'stripe';
4721
4789
 
4722
4790
  type LossesCollector = 'application' | 'stripe';
4723
4791
  }
@@ -4725,7 +4793,7 @@ declare module 'stripe' {
4725
4793
 
4726
4794
  interface Identity {
4727
4795
  /**
4728
- * Attestations from the identity's key people, e.g. owners, executives, directors.
4796
+ * Attestations from the identity's key people, e.g. owners, executives, directors, representatives.
4729
4797
  */
4730
4798
  attestations?: Identity.Attestations;
4731
4799
 
@@ -4767,6 +4835,11 @@ declare module 'stripe' {
4767
4835
  */
4768
4836
  persons_provided?: Attestations.PersonsProvided;
4769
4837
 
4838
+ /**
4839
+ * This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
4840
+ */
4841
+ representative_declaration?: Attestations.RepresentativeDeclaration;
4842
+
4770
4843
  /**
4771
4844
  * Attestations of accepted terms of service agreements.
4772
4845
  */
@@ -4836,6 +4909,23 @@ declare module 'stripe' {
4836
4909
  | 'qualifies_as_financial_institution';
4837
4910
  }
4838
4911
 
4912
+ interface RepresentativeDeclaration {
4913
+ /**
4914
+ * The time marking when the representative attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
4915
+ */
4916
+ date?: string;
4917
+
4918
+ /**
4919
+ * The IP address from which the representative attestation was made.
4920
+ */
4921
+ ip?: string;
4922
+
4923
+ /**
4924
+ * The user agent of the browser from which the representative attestation was made.
4925
+ */
4926
+ user_agent?: string;
4927
+ }
4928
+
4839
4929
  interface TermsOfService {
4840
4930
  /**
4841
4931
  * Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
@@ -6679,6 +6769,7 @@ declare module 'stripe' {
6679
6769
  | 'gb_bank_transfer_payments'
6680
6770
  | 'grabpay_payments'
6681
6771
  | 'holds_currencies.gbp'
6772
+ | 'holds_currencies.usd'
6682
6773
  | 'ideal_payments'
6683
6774
  | 'inbound_transfers.financial_accounts'
6684
6775
  | 'jcb_payments'