@augustusbank/typescript-sdk 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-holders.d.mts +1555 -1184
  12. package/resources/account-holders.d.mts.map +1 -1
  13. package/resources/account-holders.d.ts +1555 -1184
  14. package/resources/account-holders.d.ts.map +1 -1
  15. package/resources/account-holders.js +59 -0
  16. package/resources/account-holders.js.map +1 -1
  17. package/resources/account-holders.mjs +59 -0
  18. package/resources/account-holders.mjs.map +1 -1
  19. package/resources/account-programs.d.mts +2 -2
  20. package/resources/account-programs.d.ts +2 -2
  21. package/resources/accounts.d.mts +206 -43
  22. package/resources/accounts.d.mts.map +1 -1
  23. package/resources/accounts.d.ts +206 -43
  24. package/resources/accounts.d.ts.map +1 -1
  25. package/resources/accounts.js +53 -0
  26. package/resources/accounts.js.map +1 -1
  27. package/resources/accounts.mjs +53 -0
  28. package/resources/accounts.mjs.map +1 -1
  29. package/resources/api-keys.d.mts +1 -1
  30. package/resources/api-keys.d.mts.map +1 -1
  31. package/resources/api-keys.d.ts +1 -1
  32. package/resources/api-keys.d.ts.map +1 -1
  33. package/resources/api-versions.d.mts +3 -0
  34. package/resources/api-versions.d.mts.map +1 -1
  35. package/resources/api-versions.d.ts +3 -0
  36. package/resources/api-versions.d.ts.map +1 -1
  37. package/resources/conversions.d.mts +36 -81
  38. package/resources/conversions.d.mts.map +1 -1
  39. package/resources/conversions.d.ts +36 -81
  40. package/resources/conversions.d.ts.map +1 -1
  41. package/resources/conversions.js +25 -1
  42. package/resources/conversions.js.map +1 -1
  43. package/resources/conversions.mjs +25 -1
  44. package/resources/conversions.mjs.map +1 -1
  45. package/resources/counterparties.d.mts +1042 -0
  46. package/resources/counterparties.d.mts.map +1 -0
  47. package/resources/counterparties.d.ts +1042 -0
  48. package/resources/counterparties.d.ts.map +1 -0
  49. package/resources/counterparties.js +45 -0
  50. package/resources/counterparties.js.map +1 -0
  51. package/resources/counterparties.mjs +41 -0
  52. package/resources/counterparties.mjs.map +1 -0
  53. package/resources/deposits.d.mts +38 -186
  54. package/resources/deposits.d.mts.map +1 -1
  55. package/resources/deposits.d.ts +38 -186
  56. package/resources/deposits.d.ts.map +1 -1
  57. package/resources/index.d.mts +2 -0
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +2 -0
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +5 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +2 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/payouts.d.mts +458 -276
  66. package/resources/payouts.d.mts.map +1 -1
  67. package/resources/payouts.d.ts +458 -276
  68. package/resources/payouts.d.ts.map +1 -1
  69. package/resources/payouts.js +27 -0
  70. package/resources/payouts.js.map +1 -1
  71. package/resources/payouts.mjs +27 -0
  72. package/resources/payouts.mjs.map +1 -1
  73. package/resources/quotes/indicative.d.mts +7 -11
  74. package/resources/quotes/indicative.d.mts.map +1 -1
  75. package/resources/quotes/indicative.d.ts +7 -11
  76. package/resources/quotes/indicative.d.ts.map +1 -1
  77. package/resources/quotes/quotes.d.mts +4 -8
  78. package/resources/quotes/quotes.d.mts.map +1 -1
  79. package/resources/quotes/quotes.d.ts +4 -8
  80. package/resources/quotes/quotes.d.ts.map +1 -1
  81. package/resources/quotes/quotes.js.map +1 -1
  82. package/resources/quotes/quotes.mjs.map +1 -1
  83. package/resources/returns.d.mts +84 -39
  84. package/resources/returns.d.mts.map +1 -1
  85. package/resources/returns.d.ts +84 -39
  86. package/resources/returns.d.ts.map +1 -1
  87. package/resources/returns.js +22 -0
  88. package/resources/returns.js.map +1 -1
  89. package/resources/returns.mjs +22 -0
  90. package/resources/returns.mjs.map +1 -1
  91. package/resources/scopes.d.mts +4 -1
  92. package/resources/scopes.d.mts.map +1 -1
  93. package/resources/scopes.d.ts +4 -1
  94. package/resources/scopes.d.ts.map +1 -1
  95. package/resources/simulations/account-programs.d.mts +281 -0
  96. package/resources/simulations/account-programs.d.mts.map +1 -0
  97. package/resources/simulations/account-programs.d.ts +281 -0
  98. package/resources/simulations/account-programs.d.ts.map +1 -0
  99. package/resources/simulations/account-programs.js +98 -0
  100. package/resources/simulations/account-programs.js.map +1 -0
  101. package/resources/simulations/account-programs.mjs +94 -0
  102. package/resources/simulations/account-programs.mjs.map +1 -0
  103. package/resources/simulations/accounts.d.mts +270 -0
  104. package/resources/simulations/accounts.d.mts.map +1 -0
  105. package/resources/simulations/accounts.d.ts +270 -0
  106. package/resources/simulations/accounts.d.ts.map +1 -0
  107. package/resources/simulations/accounts.js +91 -0
  108. package/resources/simulations/accounts.js.map +1 -0
  109. package/resources/simulations/accounts.mjs +87 -0
  110. package/resources/simulations/accounts.mjs.map +1 -0
  111. package/resources/simulations/deposits.d.mts +218 -0
  112. package/resources/simulations/deposits.d.mts.map +1 -0
  113. package/resources/simulations/deposits.d.ts +218 -0
  114. package/resources/simulations/deposits.d.ts.map +1 -0
  115. package/resources/simulations/deposits.js +25 -0
  116. package/resources/simulations/deposits.js.map +1 -0
  117. package/resources/simulations/deposits.mjs +21 -0
  118. package/resources/simulations/deposits.mjs.map +1 -0
  119. package/resources/simulations/index.d.mts +6 -0
  120. package/resources/simulations/index.d.mts.map +1 -0
  121. package/resources/simulations/index.d.ts +6 -0
  122. package/resources/simulations/index.d.ts.map +1 -0
  123. package/resources/simulations/index.js +15 -0
  124. package/resources/simulations/index.js.map +1 -0
  125. package/resources/simulations/index.mjs +7 -0
  126. package/resources/simulations/index.mjs.map +1 -0
  127. package/resources/simulations/payouts.d.mts +76 -0
  128. package/resources/simulations/payouts.d.mts.map +1 -0
  129. package/resources/simulations/payouts.d.ts +76 -0
  130. package/resources/simulations/payouts.d.ts.map +1 -0
  131. package/resources/simulations/payouts.js +39 -0
  132. package/resources/simulations/payouts.js.map +1 -0
  133. package/resources/simulations/payouts.mjs +35 -0
  134. package/resources/simulations/payouts.mjs.map +1 -0
  135. package/resources/simulations/simulations.d.mts +22 -0
  136. package/resources/simulations/simulations.d.mts.map +1 -0
  137. package/resources/simulations/simulations.d.ts +22 -0
  138. package/resources/simulations/simulations.d.ts.map +1 -0
  139. package/resources/simulations/simulations.js +29 -0
  140. package/resources/simulations/simulations.js.map +1 -0
  141. package/resources/simulations/simulations.mjs +24 -0
  142. package/resources/simulations/simulations.mjs.map +1 -0
  143. package/resources/simulations.d.mts +2 -0
  144. package/resources/simulations.d.mts.map +1 -0
  145. package/resources/simulations.d.ts +2 -0
  146. package/resources/simulations.d.ts.map +1 -0
  147. package/resources/simulations.js +6 -0
  148. package/resources/simulations.js.map +1 -0
  149. package/resources/simulations.mjs +3 -0
  150. package/resources/simulations.mjs.map +1 -0
  151. package/resources/transactions.d.mts +300 -180
  152. package/resources/transactions.d.mts.map +1 -1
  153. package/resources/transactions.d.ts +300 -180
  154. package/resources/transactions.d.ts.map +1 -1
  155. package/resources/webhook-subscriptions.d.mts +54 -4
  156. package/resources/webhook-subscriptions.d.mts.map +1 -1
  157. package/resources/webhook-subscriptions.d.ts +54 -4
  158. package/resources/webhook-subscriptions.d.ts.map +1 -1
  159. package/resources/webhook-subscriptions.js +49 -0
  160. package/resources/webhook-subscriptions.js.map +1 -1
  161. package/resources/webhook-subscriptions.mjs +49 -0
  162. package/resources/webhook-subscriptions.mjs.map +1 -1
  163. package/resources/webhooks.d.mts +736 -953
  164. package/resources/webhooks.d.mts.map +1 -1
  165. package/resources/webhooks.d.ts +736 -953
  166. package/resources/webhooks.d.ts.map +1 -1
  167. package/src/client.ts +32 -0
  168. package/src/resources/account-holders.ts +1701 -1282
  169. package/src/resources/account-programs.ts +2 -2
  170. package/src/resources/accounts.ts +236 -44
  171. package/src/resources/api-keys.ts +3 -0
  172. package/src/resources/api-versions.ts +3 -0
  173. package/src/resources/conversions.ts +36 -93
  174. package/src/resources/counterparties.ts +3127 -0
  175. package/src/resources/deposits.ts +54 -269
  176. package/src/resources/index.ts +13 -0
  177. package/src/resources/payouts.ts +2089 -367
  178. package/src/resources/quotes/indicative.ts +7 -12
  179. package/src/resources/quotes/quotes.ts +4 -9
  180. package/src/resources/returns.ts +144 -40
  181. package/src/resources/scopes.ts +7 -1
  182. package/src/resources/simulations/account-programs.ts +363 -0
  183. package/src/resources/simulations/accounts.ts +340 -0
  184. package/src/resources/simulations/deposits.ts +530 -0
  185. package/src/resources/simulations/index.ts +32 -0
  186. package/src/resources/simulations/payouts.ts +98 -0
  187. package/src/resources/simulations/simulations.ts +82 -0
  188. package/src/resources/simulations.ts +3 -0
  189. package/src/resources/transactions.ts +910 -232
  190. package/src/resources/webhook-subscriptions.ts +54 -4
  191. package/src/resources/webhooks.ts +948 -1142
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -55,34 +55,35 @@ export namespace PayoutCreatedWebhookEvent {
55
55
  */
56
56
  id: string;
57
57
 
58
+ /**
59
+ * ID of the account that was debited.
60
+ */
61
+ account_id: string;
62
+
58
63
  /**
59
64
  * Amount as a string decimal (e.g. "100.50").
60
65
  */
61
66
  amount: string;
62
67
 
63
68
  /**
64
- * ISO 8601 UTC timestamp when the payout was created.
69
+ * ID of the counterparty that receives the money.
65
70
  */
66
- created_at: string;
71
+ counterparty_id: string;
67
72
 
68
73
  /**
69
- * Currency code (ISO 4217 currency code or crypto currency code).
74
+ * Currency code (ISO 4217 or crypto).
70
75
  */
71
76
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
72
77
 
73
78
  /**
74
- * Bank account or crypto wallet the payout was sent to.
79
+ * Failure details when status is failed, otherwise null.
75
80
  */
76
- destination:
77
- | Payload.IbanFinancialAddress
78
- | Payload.SortCodeFinancialAddress
79
- | Payload.AbaFinancialAddress
80
- | Payload.CryptoWalletFinancialAddress;
81
+ failure: Payload.Failure | null;
81
82
 
82
83
  /**
83
- * Failure details when status is failed, otherwise null.
84
+ * ISO 8601 UTC timestamp when the payout was initiated.
84
85
  */
85
- failure: Payload.Failure | null;
86
+ initiated_at: string;
86
87
 
87
88
  /**
88
89
  * Key-value pairs stored with the payout.
@@ -90,19 +91,47 @@ export namespace PayoutCreatedWebhookEvent {
90
91
  metadata: { [key: string]: string };
91
92
 
92
93
  /**
93
- * Payment reference.
94
+ * Payment scheme or blockchain used for the payout, or null when unknown.
94
95
  */
95
- reference: string;
96
+ rail:
97
+ | 'sepa'
98
+ | 'sepa_instant'
99
+ | 'faster_payments'
100
+ | 'swift'
101
+ | 'internal'
102
+ | 'target'
103
+ | 'ach'
104
+ | 'fedwire'
105
+ | 'bitcoin'
106
+ | 'bitcoin_testnet4'
107
+ | 'ethereum'
108
+ | 'ethereum_sepolia'
109
+ | 'solana'
110
+ | 'solana_devnet'
111
+ | 'polygon'
112
+ | 'polygon_amoy'
113
+ | null;
96
114
 
97
115
  /**
98
- * ID of the account that was debited.
116
+ * ISO 8601 UTC timestamp when the payout was sent.
99
117
  */
100
- source_account_id: string;
118
+ sent_at: string | null;
101
119
 
102
120
  /**
103
121
  * Current status of the payout.
104
122
  */
105
- status: 'pending' | 'paid' | 'failed' | 'returned';
123
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
124
+
125
+ /**
126
+ * Identifier used to track the payout through the payment network where supported.
127
+ */
128
+ tracking_id: string | null;
129
+
130
+ /**
131
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
132
+ * rails support this field.
133
+ */
134
+ tx_hash: string | null;
106
135
 
107
136
  /**
108
137
  * Resource type discriminator.
@@ -110,103 +139,13 @@ export namespace PayoutCreatedWebhookEvent {
110
139
  type: 'payout';
111
140
 
112
141
  /**
113
- * ISO 8601 UTC timestamp when the payout was last updated.
142
+ * Unstructured remittance information attached to the transfer. Not all rails
143
+ * support this field.
114
144
  */
115
- updated_at: string;
145
+ unstructured_remittance_information: string | null;
116
146
  }
117
147
 
118
148
  export namespace Payload {
119
- export interface IbanFinancialAddress {
120
- /**
121
- * Name of the account holder.
122
- */
123
- account_holder_name: string;
124
-
125
- /**
126
- * Bank Identifier Code, or null if not provided.
127
- */
128
- bic: string | null;
129
-
130
- /**
131
- * International Bank Account Number.
132
- */
133
- iban: string;
134
-
135
- /**
136
- * Discriminator for IBAN financial address.
137
- */
138
- type: 'iban';
139
- }
140
-
141
- export interface SortCodeFinancialAddress {
142
- /**
143
- * Name of the account holder.
144
- */
145
- account_holder_name: string;
146
-
147
- /**
148
- * UK account number (8 digits).
149
- */
150
- account_number: string;
151
-
152
- /**
153
- * UK sort code (6 digits).
154
- */
155
- sort_code: string;
156
-
157
- /**
158
- * Discriminator for UK sort code financial address.
159
- */
160
- type: 'sort_code';
161
- }
162
-
163
- export interface AbaFinancialAddress {
164
- /**
165
- * Name of the account holder.
166
- */
167
- account_holder_name: string;
168
-
169
- /**
170
- * Bank account number.
171
- */
172
- account_number: string;
173
-
174
- /**
175
- * ABA routing number (9 digits).
176
- */
177
- routing_number: string;
178
-
179
- /**
180
- * Discriminator for ABA wire financial address.
181
- */
182
- type: 'aba';
183
- }
184
-
185
- export interface CryptoWalletFinancialAddress {
186
- /**
187
- * Wallet address on the specified blockchain.
188
- */
189
- address: string;
190
-
191
- /**
192
- * Blockchain network for the crypto wallet.
193
- */
194
- blockchain:
195
- | 'bitcoin'
196
- | 'ethereum'
197
- | 'solana'
198
- | 'polygon'
199
- | 'bitcoin_testnet4'
200
- | 'ethereum_sepolia'
201
- | 'solana_devnet'
202
- | 'polygon_amoy';
203
-
204
- /**
205
- * Discriminator for crypto wallet financial address.
206
- */
207
- type: 'crypto_wallet';
208
- }
209
-
210
149
  /**
211
150
  * Failure details when status is failed, otherwise null.
212
151
  */
@@ -219,6 +158,7 @@ export namespace PayoutCreatedWebhookEvent {
219
158
  | 'account_blocked'
220
159
  | 'insufficient_funds'
221
160
  | 'invalid_account_format'
161
+ | 'invalid_routing_number'
222
162
  | 'invalid_instruction'
223
163
  | 'invalid_amount'
224
164
  | 'invalid_time'
@@ -280,34 +220,35 @@ export namespace PayoutInitiatedWebhookEvent {
280
220
  */
281
221
  id: string;
282
222
 
223
+ /**
224
+ * ID of the account that was debited.
225
+ */
226
+ account_id: string;
227
+
283
228
  /**
284
229
  * Amount as a string decimal (e.g. "100.50").
285
230
  */
286
231
  amount: string;
287
232
 
288
233
  /**
289
- * ISO 8601 UTC timestamp when the payout was created.
234
+ * ID of the counterparty that receives the money.
290
235
  */
291
- created_at: string;
236
+ counterparty_id: string;
292
237
 
293
238
  /**
294
- * Currency code (ISO 4217 currency code or crypto currency code).
239
+ * Currency code (ISO 4217 or crypto).
295
240
  */
296
241
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
297
242
 
298
243
  /**
299
- * Bank account or crypto wallet the payout was sent to.
244
+ * Failure details when status is failed, otherwise null.
300
245
  */
301
- destination:
302
- | Payload.IbanFinancialAddress
303
- | Payload.SortCodeFinancialAddress
304
- | Payload.AbaFinancialAddress
305
- | Payload.CryptoWalletFinancialAddress;
246
+ failure: Payload.Failure | null;
306
247
 
307
248
  /**
308
- * Failure details when status is failed, otherwise null.
249
+ * ISO 8601 UTC timestamp when the payout was initiated.
309
250
  */
310
- failure: Payload.Failure | null;
251
+ initiated_at: string;
311
252
 
312
253
  /**
313
254
  * Key-value pairs stored with the payout.
@@ -315,19 +256,47 @@ export namespace PayoutInitiatedWebhookEvent {
315
256
  metadata: { [key: string]: string };
316
257
 
317
258
  /**
318
- * Payment reference.
259
+ * Payment scheme or blockchain used for the payout, or null when unknown.
319
260
  */
320
- reference: string;
261
+ rail:
262
+ | 'sepa'
263
+ | 'sepa_instant'
264
+ | 'faster_payments'
265
+ | 'swift'
266
+ | 'internal'
267
+ | 'target'
268
+ | 'ach'
269
+ | 'fedwire'
270
+ | 'bitcoin'
271
+ | 'bitcoin_testnet4'
272
+ | 'ethereum'
273
+ | 'ethereum_sepolia'
274
+ | 'solana'
275
+ | 'solana_devnet'
276
+ | 'polygon'
277
+ | 'polygon_amoy'
278
+ | null;
321
279
 
322
280
  /**
323
- * ID of the account that was debited.
281
+ * ISO 8601 UTC timestamp when the payout was sent.
324
282
  */
325
- source_account_id: string;
283
+ sent_at: string | null;
326
284
 
327
285
  /**
328
286
  * Current status of the payout.
329
287
  */
330
- status: 'pending' | 'paid' | 'failed' | 'returned';
288
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
289
+
290
+ /**
291
+ * Identifier used to track the payout through the payment network where supported.
292
+ */
293
+ tracking_id: string | null;
294
+
295
+ /**
296
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
297
+ * rails support this field.
298
+ */
299
+ tx_hash: string | null;
331
300
 
332
301
  /**
333
302
  * Resource type discriminator.
@@ -335,103 +304,13 @@ export namespace PayoutInitiatedWebhookEvent {
335
304
  type: 'payout';
336
305
 
337
306
  /**
338
- * ISO 8601 UTC timestamp when the payout was last updated.
307
+ * Unstructured remittance information attached to the transfer. Not all rails
308
+ * support this field.
339
309
  */
340
- updated_at: string;
310
+ unstructured_remittance_information: string | null;
341
311
  }
342
312
 
343
313
  export namespace Payload {
344
- export interface IbanFinancialAddress {
345
- /**
346
- * Name of the account holder.
347
- */
348
- account_holder_name: string;
349
-
350
- /**
351
- * Bank Identifier Code, or null if not provided.
352
- */
353
- bic: string | null;
354
-
355
- /**
356
- * International Bank Account Number.
357
- */
358
- iban: string;
359
-
360
- /**
361
- * Discriminator for IBAN financial address.
362
- */
363
- type: 'iban';
364
- }
365
-
366
- export interface SortCodeFinancialAddress {
367
- /**
368
- * Name of the account holder.
369
- */
370
- account_holder_name: string;
371
-
372
- /**
373
- * UK account number (8 digits).
374
- */
375
- account_number: string;
376
-
377
- /**
378
- * UK sort code (6 digits).
379
- */
380
- sort_code: string;
381
-
382
- /**
383
- * Discriminator for UK sort code financial address.
384
- */
385
- type: 'sort_code';
386
- }
387
-
388
- export interface AbaFinancialAddress {
389
- /**
390
- * Name of the account holder.
391
- */
392
- account_holder_name: string;
393
-
394
- /**
395
- * Bank account number.
396
- */
397
- account_number: string;
398
-
399
- /**
400
- * ABA routing number (9 digits).
401
- */
402
- routing_number: string;
403
-
404
- /**
405
- * Discriminator for ABA wire financial address.
406
- */
407
- type: 'aba';
408
- }
409
-
410
- export interface CryptoWalletFinancialAddress {
411
- /**
412
- * Wallet address on the specified blockchain.
413
- */
414
- address: string;
415
-
416
- /**
417
- * Blockchain network for the crypto wallet.
418
- */
419
- blockchain:
420
- | 'bitcoin'
421
- | 'ethereum'
422
- | 'solana'
423
- | 'polygon'
424
- | 'bitcoin_testnet4'
425
- | 'ethereum_sepolia'
426
- | 'solana_devnet'
427
- | 'polygon_amoy';
428
-
429
- /**
430
- * Discriminator for crypto wallet financial address.
431
- */
432
- type: 'crypto_wallet';
433
- }
434
-
435
314
  /**
436
315
  * Failure details when status is failed, otherwise null.
437
316
  */
@@ -444,6 +323,7 @@ export namespace PayoutInitiatedWebhookEvent {
444
323
  | 'account_blocked'
445
324
  | 'insufficient_funds'
446
325
  | 'invalid_account_format'
326
+ | 'invalid_routing_number'
447
327
  | 'invalid_instruction'
448
328
  | 'invalid_amount'
449
329
  | 'invalid_time'
@@ -505,34 +385,35 @@ export namespace PayoutPaidWebhookEvent {
505
385
  */
506
386
  id: string;
507
387
 
388
+ /**
389
+ * ID of the account that was debited.
390
+ */
391
+ account_id: string;
392
+
508
393
  /**
509
394
  * Amount as a string decimal (e.g. "100.50").
510
395
  */
511
396
  amount: string;
512
397
 
513
398
  /**
514
- * ISO 8601 UTC timestamp when the payout was created.
399
+ * ID of the counterparty that receives the money.
515
400
  */
516
- created_at: string;
401
+ counterparty_id: string;
517
402
 
518
403
  /**
519
- * Currency code (ISO 4217 currency code or crypto currency code).
404
+ * Currency code (ISO 4217 or crypto).
520
405
  */
521
406
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
522
407
 
523
408
  /**
524
- * Bank account or crypto wallet the payout was sent to.
409
+ * Failure details when status is failed, otherwise null.
525
410
  */
526
- destination:
527
- | Payload.IbanFinancialAddress
528
- | Payload.SortCodeFinancialAddress
529
- | Payload.AbaFinancialAddress
530
- | Payload.CryptoWalletFinancialAddress;
411
+ failure: Payload.Failure | null;
531
412
 
532
413
  /**
533
- * Failure details when status is failed, otherwise null.
414
+ * ISO 8601 UTC timestamp when the payout was initiated.
534
415
  */
535
- failure: Payload.Failure | null;
416
+ initiated_at: string;
536
417
 
537
418
  /**
538
419
  * Key-value pairs stored with the payout.
@@ -540,19 +421,47 @@ export namespace PayoutPaidWebhookEvent {
540
421
  metadata: { [key: string]: string };
541
422
 
542
423
  /**
543
- * Payment reference.
424
+ * Payment scheme or blockchain used for the payout, or null when unknown.
544
425
  */
545
- reference: string;
426
+ rail:
427
+ | 'sepa'
428
+ | 'sepa_instant'
429
+ | 'faster_payments'
430
+ | 'swift'
431
+ | 'internal'
432
+ | 'target'
433
+ | 'ach'
434
+ | 'fedwire'
435
+ | 'bitcoin'
436
+ | 'bitcoin_testnet4'
437
+ | 'ethereum'
438
+ | 'ethereum_sepolia'
439
+ | 'solana'
440
+ | 'solana_devnet'
441
+ | 'polygon'
442
+ | 'polygon_amoy'
443
+ | null;
546
444
 
547
445
  /**
548
- * ID of the account that was debited.
446
+ * ISO 8601 UTC timestamp when the payout was sent.
549
447
  */
550
- source_account_id: string;
448
+ sent_at: string | null;
551
449
 
552
450
  /**
553
451
  * Current status of the payout.
554
452
  */
555
- status: 'pending' | 'paid' | 'failed' | 'returned';
453
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
454
+
455
+ /**
456
+ * Identifier used to track the payout through the payment network where supported.
457
+ */
458
+ tracking_id: string | null;
459
+
460
+ /**
461
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
462
+ * rails support this field.
463
+ */
464
+ tx_hash: string | null;
556
465
 
557
466
  /**
558
467
  * Resource type discriminator.
@@ -560,103 +469,13 @@ export namespace PayoutPaidWebhookEvent {
560
469
  type: 'payout';
561
470
 
562
471
  /**
563
- * ISO 8601 UTC timestamp when the payout was last updated.
472
+ * Unstructured remittance information attached to the transfer. Not all rails
473
+ * support this field.
564
474
  */
565
- updated_at: string;
475
+ unstructured_remittance_information: string | null;
566
476
  }
567
477
 
568
478
  export namespace Payload {
569
- export interface IbanFinancialAddress {
570
- /**
571
- * Name of the account holder.
572
- */
573
- account_holder_name: string;
574
-
575
- /**
576
- * Bank Identifier Code, or null if not provided.
577
- */
578
- bic: string | null;
579
-
580
- /**
581
- * International Bank Account Number.
582
- */
583
- iban: string;
584
-
585
- /**
586
- * Discriminator for IBAN financial address.
587
- */
588
- type: 'iban';
589
- }
590
-
591
- export interface SortCodeFinancialAddress {
592
- /**
593
- * Name of the account holder.
594
- */
595
- account_holder_name: string;
596
-
597
- /**
598
- * UK account number (8 digits).
599
- */
600
- account_number: string;
601
-
602
- /**
603
- * UK sort code (6 digits).
604
- */
605
- sort_code: string;
606
-
607
- /**
608
- * Discriminator for UK sort code financial address.
609
- */
610
- type: 'sort_code';
611
- }
612
-
613
- export interface AbaFinancialAddress {
614
- /**
615
- * Name of the account holder.
616
- */
617
- account_holder_name: string;
618
-
619
- /**
620
- * Bank account number.
621
- */
622
- account_number: string;
623
-
624
- /**
625
- * ABA routing number (9 digits).
626
- */
627
- routing_number: string;
628
-
629
- /**
630
- * Discriminator for ABA wire financial address.
631
- */
632
- type: 'aba';
633
- }
634
-
635
- export interface CryptoWalletFinancialAddress {
636
- /**
637
- * Wallet address on the specified blockchain.
638
- */
639
- address: string;
640
-
641
- /**
642
- * Blockchain network for the crypto wallet.
643
- */
644
- blockchain:
645
- | 'bitcoin'
646
- | 'ethereum'
647
- | 'solana'
648
- | 'polygon'
649
- | 'bitcoin_testnet4'
650
- | 'ethereum_sepolia'
651
- | 'solana_devnet'
652
- | 'polygon_amoy';
653
-
654
- /**
655
- * Discriminator for crypto wallet financial address.
656
- */
657
- type: 'crypto_wallet';
658
- }
659
-
660
479
  /**
661
480
  * Failure details when status is failed, otherwise null.
662
481
  */
@@ -669,6 +488,7 @@ export namespace PayoutPaidWebhookEvent {
669
488
  | 'account_blocked'
670
489
  | 'insufficient_funds'
671
490
  | 'invalid_account_format'
491
+ | 'invalid_routing_number'
672
492
  | 'invalid_instruction'
673
493
  | 'invalid_amount'
674
494
  | 'invalid_time'
@@ -730,34 +550,35 @@ export namespace PayoutFailedWebhookEvent {
730
550
  */
731
551
  id: string;
732
552
 
553
+ /**
554
+ * ID of the account that was debited.
555
+ */
556
+ account_id: string;
557
+
733
558
  /**
734
559
  * Amount as a string decimal (e.g. "100.50").
735
560
  */
736
561
  amount: string;
737
562
 
738
563
  /**
739
- * ISO 8601 UTC timestamp when the payout was created.
564
+ * ID of the counterparty that receives the money.
740
565
  */
741
- created_at: string;
566
+ counterparty_id: string;
742
567
 
743
568
  /**
744
- * Currency code (ISO 4217 currency code or crypto currency code).
569
+ * Currency code (ISO 4217 or crypto).
745
570
  */
746
571
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
747
572
 
748
573
  /**
749
- * Bank account or crypto wallet the payout was sent to.
574
+ * Failure details when status is failed, otherwise null.
750
575
  */
751
- destination:
752
- | Payload.IbanFinancialAddress
753
- | Payload.SortCodeFinancialAddress
754
- | Payload.AbaFinancialAddress
755
- | Payload.CryptoWalletFinancialAddress;
576
+ failure: Payload.Failure | null;
756
577
 
757
578
  /**
758
- * Failure details when status is failed, otherwise null.
579
+ * ISO 8601 UTC timestamp when the payout was initiated.
759
580
  */
760
- failure: Payload.Failure | null;
581
+ initiated_at: string;
761
582
 
762
583
  /**
763
584
  * Key-value pairs stored with the payout.
@@ -765,19 +586,47 @@ export namespace PayoutFailedWebhookEvent {
765
586
  metadata: { [key: string]: string };
766
587
 
767
588
  /**
768
- * Payment reference.
589
+ * Payment scheme or blockchain used for the payout, or null when unknown.
769
590
  */
770
- reference: string;
591
+ rail:
592
+ | 'sepa'
593
+ | 'sepa_instant'
594
+ | 'faster_payments'
595
+ | 'swift'
596
+ | 'internal'
597
+ | 'target'
598
+ | 'ach'
599
+ | 'fedwire'
600
+ | 'bitcoin'
601
+ | 'bitcoin_testnet4'
602
+ | 'ethereum'
603
+ | 'ethereum_sepolia'
604
+ | 'solana'
605
+ | 'solana_devnet'
606
+ | 'polygon'
607
+ | 'polygon_amoy'
608
+ | null;
771
609
 
772
610
  /**
773
- * ID of the account that was debited.
611
+ * ISO 8601 UTC timestamp when the payout was sent.
774
612
  */
775
- source_account_id: string;
613
+ sent_at: string | null;
776
614
 
777
615
  /**
778
616
  * Current status of the payout.
779
617
  */
780
- status: 'pending' | 'paid' | 'failed' | 'returned';
618
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
619
+
620
+ /**
621
+ * Identifier used to track the payout through the payment network where supported.
622
+ */
623
+ tracking_id: string | null;
624
+
625
+ /**
626
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
627
+ * rails support this field.
628
+ */
629
+ tx_hash: string | null;
781
630
 
782
631
  /**
783
632
  * Resource type discriminator.
@@ -785,103 +634,13 @@ export namespace PayoutFailedWebhookEvent {
785
634
  type: 'payout';
786
635
 
787
636
  /**
788
- * ISO 8601 UTC timestamp when the payout was last updated.
637
+ * Unstructured remittance information attached to the transfer. Not all rails
638
+ * support this field.
789
639
  */
790
- updated_at: string;
640
+ unstructured_remittance_information: string | null;
791
641
  }
792
642
 
793
643
  export namespace Payload {
794
- export interface IbanFinancialAddress {
795
- /**
796
- * Name of the account holder.
797
- */
798
- account_holder_name: string;
799
-
800
- /**
801
- * Bank Identifier Code, or null if not provided.
802
- */
803
- bic: string | null;
804
-
805
- /**
806
- * International Bank Account Number.
807
- */
808
- iban: string;
809
-
810
- /**
811
- * Discriminator for IBAN financial address.
812
- */
813
- type: 'iban';
814
- }
815
-
816
- export interface SortCodeFinancialAddress {
817
- /**
818
- * Name of the account holder.
819
- */
820
- account_holder_name: string;
821
-
822
- /**
823
- * UK account number (8 digits).
824
- */
825
- account_number: string;
826
-
827
- /**
828
- * UK sort code (6 digits).
829
- */
830
- sort_code: string;
831
-
832
- /**
833
- * Discriminator for UK sort code financial address.
834
- */
835
- type: 'sort_code';
836
- }
837
-
838
- export interface AbaFinancialAddress {
839
- /**
840
- * Name of the account holder.
841
- */
842
- account_holder_name: string;
843
-
844
- /**
845
- * Bank account number.
846
- */
847
- account_number: string;
848
-
849
- /**
850
- * ABA routing number (9 digits).
851
- */
852
- routing_number: string;
853
-
854
- /**
855
- * Discriminator for ABA wire financial address.
856
- */
857
- type: 'aba';
858
- }
859
-
860
- export interface CryptoWalletFinancialAddress {
861
- /**
862
- * Wallet address on the specified blockchain.
863
- */
864
- address: string;
865
-
866
- /**
867
- * Blockchain network for the crypto wallet.
868
- */
869
- blockchain:
870
- | 'bitcoin'
871
- | 'ethereum'
872
- | 'solana'
873
- | 'polygon'
874
- | 'bitcoin_testnet4'
875
- | 'ethereum_sepolia'
876
- | 'solana_devnet'
877
- | 'polygon_amoy';
878
-
879
- /**
880
- * Discriminator for crypto wallet financial address.
881
- */
882
- type: 'crypto_wallet';
883
- }
884
-
885
644
  /**
886
645
  * Failure details when status is failed, otherwise null.
887
646
  */
@@ -894,6 +653,7 @@ export namespace PayoutFailedWebhookEvent {
894
653
  | 'account_blocked'
895
654
  | 'insufficient_funds'
896
655
  | 'invalid_account_format'
656
+ | 'invalid_routing_number'
897
657
  | 'invalid_instruction'
898
658
  | 'invalid_amount'
899
659
  | 'invalid_time'
@@ -961,12 +721,7 @@ export namespace ReturnInitiatedWebhookEvent {
961
721
  amount: string;
962
722
 
963
723
  /**
964
- * ISO 8601 UTC timestamp when the return was created.
965
- */
966
- created_at: string;
967
-
968
- /**
969
- * Currency code (ISO 4217 currency code or crypto currency code).
724
+ * Currency code (ISO 4217 or crypto).
970
725
  */
971
726
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
972
727
 
@@ -976,24 +731,57 @@ export namespace ReturnInitiatedWebhookEvent {
976
731
  deposit_id: string;
977
732
 
978
733
  /**
979
- * Failure details when status is failed, otherwise null.
734
+ * Failure details when status is failed, otherwise null.
735
+ */
736
+ failure: Payload.Failure | null;
737
+
738
+ /**
739
+ * ISO 8601 UTC timestamp when the return was initiated.
740
+ */
741
+ initiated_at: string;
742
+
743
+ /**
744
+ * Payment scheme or blockchain used for the return, or null when unknown.
745
+ */
746
+ rail:
747
+ | 'sepa'
748
+ | 'sepa_instant'
749
+ | 'faster_payments'
750
+ | 'swift'
751
+ | 'internal'
752
+ | 'target'
753
+ | 'ach'
754
+ | 'fedwire'
755
+ | 'bitcoin'
756
+ | 'bitcoin_testnet4'
757
+ | 'ethereum'
758
+ | 'ethereum_sepolia'
759
+ | 'solana'
760
+ | 'solana_devnet'
761
+ | 'polygon'
762
+ | 'polygon_amoy'
763
+ | null;
764
+
765
+ /**
766
+ * ISO 8601 UTC timestamp when the return was sent.
980
767
  */
981
- failure: Payload.Failure | null;
768
+ sent_at: string | null;
982
769
 
983
770
  /**
984
771
  * Current status of the return.
985
772
  */
986
- status: 'pending' | 'paid' | 'failed' | 'returned';
773
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
987
774
 
988
775
  /**
989
- * Type of the resource.
776
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
777
+ * rails support this field.
990
778
  */
991
- type: 'return';
779
+ tx_hash: string | null;
992
780
 
993
781
  /**
994
- * ISO 8601 UTC timestamp when the return was last updated.
782
+ * Resource type discriminator.
995
783
  */
996
- updated_at: string;
784
+ type: 'return';
997
785
  }
998
786
 
999
787
  export namespace Payload {
@@ -1009,6 +797,7 @@ export namespace ReturnInitiatedWebhookEvent {
1009
797
  | 'account_blocked'
1010
798
  | 'insufficient_funds'
1011
799
  | 'invalid_account_format'
800
+ | 'invalid_routing_number'
1012
801
  | 'invalid_instruction'
1013
802
  | 'invalid_amount'
1014
803
  | 'invalid_time'
@@ -1076,12 +865,7 @@ export namespace ReturnPaidWebhookEvent {
1076
865
  amount: string;
1077
866
 
1078
867
  /**
1079
- * ISO 8601 UTC timestamp when the return was created.
1080
- */
1081
- created_at: string;
1082
-
1083
- /**
1084
- * Currency code (ISO 4217 currency code or crypto currency code).
868
+ * Currency code (ISO 4217 or crypto).
1085
869
  */
1086
870
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1087
871
 
@@ -1095,20 +879,53 @@ export namespace ReturnPaidWebhookEvent {
1095
879
  */
1096
880
  failure: Payload.Failure | null;
1097
881
 
882
+ /**
883
+ * ISO 8601 UTC timestamp when the return was initiated.
884
+ */
885
+ initiated_at: string;
886
+
887
+ /**
888
+ * Payment scheme or blockchain used for the return, or null when unknown.
889
+ */
890
+ rail:
891
+ | 'sepa'
892
+ | 'sepa_instant'
893
+ | 'faster_payments'
894
+ | 'swift'
895
+ | 'internal'
896
+ | 'target'
897
+ | 'ach'
898
+ | 'fedwire'
899
+ | 'bitcoin'
900
+ | 'bitcoin_testnet4'
901
+ | 'ethereum'
902
+ | 'ethereum_sepolia'
903
+ | 'solana'
904
+ | 'solana_devnet'
905
+ | 'polygon'
906
+ | 'polygon_amoy'
907
+ | null;
908
+
909
+ /**
910
+ * ISO 8601 UTC timestamp when the return was sent.
911
+ */
912
+ sent_at: string | null;
913
+
1098
914
  /**
1099
915
  * Current status of the return.
1100
916
  */
1101
- status: 'pending' | 'paid' | 'failed' | 'returned';
917
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1102
918
 
1103
919
  /**
1104
- * Type of the resource.
920
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
921
+ * rails support this field.
1105
922
  */
1106
- type: 'return';
923
+ tx_hash: string | null;
1107
924
 
1108
925
  /**
1109
- * ISO 8601 UTC timestamp when the return was last updated.
926
+ * Resource type discriminator.
1110
927
  */
1111
- updated_at: string;
928
+ type: 'return';
1112
929
  }
1113
930
 
1114
931
  export namespace Payload {
@@ -1124,6 +941,7 @@ export namespace ReturnPaidWebhookEvent {
1124
941
  | 'account_blocked'
1125
942
  | 'insufficient_funds'
1126
943
  | 'invalid_account_format'
944
+ | 'invalid_routing_number'
1127
945
  | 'invalid_instruction'
1128
946
  | 'invalid_amount'
1129
947
  | 'invalid_time'
@@ -1191,12 +1009,7 @@ export namespace ReturnFailedWebhookEvent {
1191
1009
  amount: string;
1192
1010
 
1193
1011
  /**
1194
- * ISO 8601 UTC timestamp when the return was created.
1195
- */
1196
- created_at: string;
1197
-
1198
- /**
1199
- * Currency code (ISO 4217 currency code or crypto currency code).
1012
+ * Currency code (ISO 4217 or crypto).
1200
1013
  */
1201
1014
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1202
1015
 
@@ -1210,20 +1023,53 @@ export namespace ReturnFailedWebhookEvent {
1210
1023
  */
1211
1024
  failure: Payload.Failure | null;
1212
1025
 
1026
+ /**
1027
+ * ISO 8601 UTC timestamp when the return was initiated.
1028
+ */
1029
+ initiated_at: string;
1030
+
1031
+ /**
1032
+ * Payment scheme or blockchain used for the return, or null when unknown.
1033
+ */
1034
+ rail:
1035
+ | 'sepa'
1036
+ | 'sepa_instant'
1037
+ | 'faster_payments'
1038
+ | 'swift'
1039
+ | 'internal'
1040
+ | 'target'
1041
+ | 'ach'
1042
+ | 'fedwire'
1043
+ | 'bitcoin'
1044
+ | 'bitcoin_testnet4'
1045
+ | 'ethereum'
1046
+ | 'ethereum_sepolia'
1047
+ | 'solana'
1048
+ | 'solana_devnet'
1049
+ | 'polygon'
1050
+ | 'polygon_amoy'
1051
+ | null;
1052
+
1053
+ /**
1054
+ * ISO 8601 UTC timestamp when the return was sent.
1055
+ */
1056
+ sent_at: string | null;
1057
+
1213
1058
  /**
1214
1059
  * Current status of the return.
1215
1060
  */
1216
- status: 'pending' | 'paid' | 'failed' | 'returned';
1061
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1217
1062
 
1218
1063
  /**
1219
- * Type of the resource.
1064
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1065
+ * rails support this field.
1220
1066
  */
1221
- type: 'return';
1067
+ tx_hash: string | null;
1222
1068
 
1223
1069
  /**
1224
- * ISO 8601 UTC timestamp when the return was last updated.
1070
+ * Resource type discriminator.
1225
1071
  */
1226
- updated_at: string;
1072
+ type: 'return';
1227
1073
  }
1228
1074
 
1229
1075
  export namespace Payload {
@@ -1239,6 +1085,7 @@ export namespace ReturnFailedWebhookEvent {
1239
1085
  | 'account_blocked'
1240
1086
  | 'insufficient_funds'
1241
1087
  | 'invalid_account_format'
1088
+ | 'invalid_routing_number'
1242
1089
  | 'invalid_instruction'
1243
1090
  | 'invalid_amount'
1244
1091
  | 'invalid_time'
@@ -1306,12 +1153,7 @@ export namespace ReturnReturnedWebhookEvent {
1306
1153
  amount: string;
1307
1154
 
1308
1155
  /**
1309
- * ISO 8601 UTC timestamp when the return was created.
1310
- */
1311
- created_at: string;
1312
-
1313
- /**
1314
- * Currency code (ISO 4217 currency code or crypto currency code).
1156
+ * Currency code (ISO 4217 or crypto).
1315
1157
  */
1316
1158
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1317
1159
 
@@ -1325,20 +1167,53 @@ export namespace ReturnReturnedWebhookEvent {
1325
1167
  */
1326
1168
  failure: Payload.Failure | null;
1327
1169
 
1170
+ /**
1171
+ * ISO 8601 UTC timestamp when the return was initiated.
1172
+ */
1173
+ initiated_at: string;
1174
+
1175
+ /**
1176
+ * Payment scheme or blockchain used for the return, or null when unknown.
1177
+ */
1178
+ rail:
1179
+ | 'sepa'
1180
+ | 'sepa_instant'
1181
+ | 'faster_payments'
1182
+ | 'swift'
1183
+ | 'internal'
1184
+ | 'target'
1185
+ | 'ach'
1186
+ | 'fedwire'
1187
+ | 'bitcoin'
1188
+ | 'bitcoin_testnet4'
1189
+ | 'ethereum'
1190
+ | 'ethereum_sepolia'
1191
+ | 'solana'
1192
+ | 'solana_devnet'
1193
+ | 'polygon'
1194
+ | 'polygon_amoy'
1195
+ | null;
1196
+
1197
+ /**
1198
+ * ISO 8601 UTC timestamp when the return was sent.
1199
+ */
1200
+ sent_at: string | null;
1201
+
1328
1202
  /**
1329
1203
  * Current status of the return.
1330
1204
  */
1331
- status: 'pending' | 'paid' | 'failed' | 'returned';
1205
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1332
1206
 
1333
1207
  /**
1334
- * Type of the resource.
1208
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1209
+ * rails support this field.
1335
1210
  */
1336
- type: 'return';
1211
+ tx_hash: string | null;
1337
1212
 
1338
1213
  /**
1339
- * ISO 8601 UTC timestamp when the return was last updated.
1214
+ * Resource type discriminator.
1340
1215
  */
1341
- updated_at: string;
1216
+ type: 'return';
1342
1217
  }
1343
1218
 
1344
1219
  export namespace Payload {
@@ -1354,6 +1229,7 @@ export namespace ReturnReturnedWebhookEvent {
1354
1229
  | 'account_blocked'
1355
1230
  | 'insufficient_funds'
1356
1231
  | 'invalid_account_format'
1232
+ | 'invalid_routing_number'
1357
1233
  | 'invalid_instruction'
1358
1234
  | 'invalid_amount'
1359
1235
  | 'invalid_time'
@@ -1416,55 +1292,45 @@ export namespace DepositReceivedWebhookEvent {
1416
1292
  id: string;
1417
1293
 
1418
1294
  /**
1419
- * Amount as a string decimal (e.g. "100.50").
1295
+ * ID of the account that was credited with the deposit.
1420
1296
  */
1421
- amount: string;
1297
+ account_id: string;
1422
1298
 
1423
1299
  /**
1424
- * Reference visible on the bank statement, or null when not applicable.
1300
+ * Amount as a string decimal (e.g. "100.50").
1425
1301
  */
1426
- bank_statement_reference: string | null;
1302
+ amount: string;
1427
1303
 
1428
1304
  /**
1429
- * ISO 8601 UTC timestamp when the deposit was created.
1305
+ * ID of the counterparty that sent the money, or null when not known.
1430
1306
  */
1431
- created_at: string;
1307
+ counterparty_id: string | null;
1432
1308
 
1433
1309
  /**
1434
- * Supported fiat or crypto currency code for the deposit amount.
1310
+ * Currency code (ISO 4217 or crypto).
1435
1311
  */
1436
1312
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1437
1313
 
1438
1314
  /**
1439
- * ID of the merchant account that received the deposit.
1440
- */
1441
- destination_account_id: string;
1442
-
1443
- /**
1444
- * Payment rail or blockchain used for the deposit, or null when unknown.
1315
+ * Payment scheme or blockchain used for the deposit, or null when unknown.
1445
1316
  */
1446
1317
  rail:
1318
+ | 'sepa'
1447
1319
  | 'sepa_instant'
1448
1320
  | 'faster_payments'
1449
- | 'sepa'
1450
- | 'elixir'
1451
- | 'express_elixir'
1452
- | 'sek_account_to_account'
1453
- | 'sumclearing'
1454
- | 'straksclearing'
1455
1321
  | 'swift'
1456
1322
  | 'internal'
1457
1323
  | 'target'
1458
1324
  | 'ach'
1459
1325
  | 'fedwire'
1460
- | 'btc'
1461
- | 'btc_testnet4'
1462
- | 'eth'
1463
- | 'eth_sepolia'
1464
- | 'sol'
1465
- | 'sol_devnet'
1466
- | 'matic'
1467
- | 'matic_amoy'
1326
+ | 'bitcoin'
1327
+ | 'bitcoin_testnet4'
1328
+ | 'ethereum'
1329
+ | 'ethereum_sepolia'
1330
+ | 'solana'
1331
+ | 'solana_devnet'
1332
+ | 'polygon'
1333
+ | 'polygon_amoy'
1468
1334
  | null;
1469
1335
 
1470
1336
  /**
@@ -1473,17 +1339,18 @@ export namespace DepositReceivedWebhookEvent {
1473
1339
  returns: Array<string>;
1474
1340
 
1475
1341
  /**
1476
- * Counterparty bank account or crypto wallet that sent the funds.
1342
+ * ISO 8601 UTC timestamp when the deposit was settled.
1477
1343
  */
1478
- source: Payload.Iban | Payload.UkSortCode | Payload.Aba | Payload.Wallet;
1344
+ settled_at: string;
1479
1345
 
1480
1346
  /**
1481
1347
  * Current status of the deposit.
1482
1348
  */
1483
- status: 'received' | 'in_return' | 'returned' | 'return_failed' | 'return_returned';
1349
+ status: 'settled';
1484
1350
 
1485
1351
  /**
1486
- * Transaction hash for crypto deposits, or null when not known.
1352
+ * Transaction hash for crypto deposits, or null when not known. Only blockchain
1353
+ * rails support this field.
1487
1354
  */
1488
1355
  tx_hash: string | null;
1489
1356
 
@@ -1493,102 +1360,10 @@ export namespace DepositReceivedWebhookEvent {
1493
1360
  type: 'deposit';
1494
1361
 
1495
1362
  /**
1496
- * ISO 8601 UTC timestamp when the deposit was last updated.
1363
+ * Unstructured remittance information attached to the transfer. Not all rails
1364
+ * support this field.
1497
1365
  */
1498
- updated_at: string;
1499
- }
1500
-
1501
- export namespace Payload {
1502
- export interface Iban {
1503
- /**
1504
- * Name of the account holder.
1505
- */
1506
- account_holder_name: string;
1507
-
1508
- /**
1509
- * Bank Identifier Code, or null if not provided.
1510
- */
1511
- bic: string | null;
1512
-
1513
- /**
1514
- * International Bank Account Number.
1515
- */
1516
- iban: string;
1517
-
1518
- /**
1519
- * Discriminator for IBAN source.
1520
- */
1521
- type: 'iban';
1522
- }
1523
-
1524
- export interface UkSortCode {
1525
- /**
1526
- * Name of the account holder.
1527
- */
1528
- account_holder_name: string;
1529
-
1530
- /**
1531
- * UK account number (8 digits).
1532
- */
1533
- account_number: string;
1534
-
1535
- /**
1536
- * UK sort code (6 digits).
1537
- */
1538
- sort_code: string;
1539
-
1540
- /**
1541
- * Discriminator for UK sort code source.
1542
- */
1543
- type: 'sort_code';
1544
- }
1545
-
1546
- export interface Aba {
1547
- /**
1548
- * Name of the account holder.
1549
- */
1550
- account_holder_name: string;
1551
-
1552
- /**
1553
- * Bank account number.
1554
- */
1555
- account_number: string;
1556
-
1557
- /**
1558
- * ABA routing number (9 digits).
1559
- */
1560
- routing_number: string;
1561
-
1562
- /**
1563
- * Discriminator for ABA wire source.
1564
- */
1565
- type: 'aba';
1566
- }
1567
-
1568
- export interface Wallet {
1569
- /**
1570
- * Wallet address on the specified blockchain.
1571
- */
1572
- address: string;
1573
-
1574
- /**
1575
- * Blockchain network for the crypto wallet.
1576
- */
1577
- blockchain:
1578
- | 'bitcoin'
1579
- | 'ethereum'
1580
- | 'solana'
1581
- | 'polygon'
1582
- | 'bitcoin_testnet4'
1583
- | 'ethereum_sepolia'
1584
- | 'solana_devnet'
1585
- | 'polygon_amoy';
1586
-
1587
- /**
1588
- * Discriminator for crypto wallet source.
1589
- */
1590
- type: 'crypto_wallet';
1591
- }
1366
+ unstructured_remittance_information: string | null;
1592
1367
  }
1593
1368
  }
1594
1369
 
@@ -1639,36 +1414,21 @@ export namespace ConversionCreatedWebhookEvent {
1639
1414
  */
1640
1415
  created_at: string;
1641
1416
 
1642
- /**
1643
- * Failure details when status is failed, otherwise null.
1644
- */
1645
- failure: Payload.Failure | null;
1646
-
1647
1417
  /**
1648
1418
  * Key-value pairs stored with the conversion.
1649
1419
  */
1650
1420
  metadata: { [key: string]: string };
1651
1421
 
1652
- /**
1653
- * ID of the associated quote, or null.
1654
- */
1655
- quote_id: string | null;
1656
-
1657
1422
  /**
1658
1423
  * ID of the source account, or null.
1659
1424
  */
1660
1425
  source_account_id: string | null;
1661
1426
 
1662
1427
  /**
1663
- * Source amount as a string decimal.
1428
+ * Amount as a string decimal (e.g. "100.50").
1664
1429
  */
1665
1430
  source_amount: string;
1666
1431
 
1667
- /**
1668
- * Source currency code.
1669
- */
1670
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1671
-
1672
1432
  /**
1673
1433
  * Current status of the conversion.
1674
1434
  */
@@ -1680,9 +1440,9 @@ export namespace ConversionCreatedWebhookEvent {
1680
1440
  target_account_id: string | null;
1681
1441
 
1682
1442
  /**
1683
- * Target currency code.
1443
+ * Amount as a string decimal (e.g. "100.50").
1684
1444
  */
1685
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1445
+ target_amount: string;
1686
1446
 
1687
1447
  /**
1688
1448
  * Resource type discriminator.
@@ -1694,18 +1454,6 @@ export namespace ConversionCreatedWebhookEvent {
1694
1454
  */
1695
1455
  updated_at: string;
1696
1456
  }
1697
-
1698
- export namespace Payload {
1699
- /**
1700
- * Failure details when status is failed, otherwise null.
1701
- */
1702
- export interface Failure {
1703
- /**
1704
- * Human-readable description of the failure.
1705
- */
1706
- message: string;
1707
- }
1708
- }
1709
1457
  }
1710
1458
 
1711
1459
  export interface ConversionCompletedWebhookEvent {
@@ -1755,36 +1503,21 @@ export namespace ConversionCompletedWebhookEvent {
1755
1503
  */
1756
1504
  created_at: string;
1757
1505
 
1758
- /**
1759
- * Failure details when status is failed, otherwise null.
1760
- */
1761
- failure: Payload.Failure | null;
1762
-
1763
1506
  /**
1764
1507
  * Key-value pairs stored with the conversion.
1765
1508
  */
1766
1509
  metadata: { [key: string]: string };
1767
1510
 
1768
- /**
1769
- * ID of the associated quote, or null.
1770
- */
1771
- quote_id: string | null;
1772
-
1773
1511
  /**
1774
1512
  * ID of the source account, or null.
1775
1513
  */
1776
1514
  source_account_id: string | null;
1777
1515
 
1778
1516
  /**
1779
- * Source amount as a string decimal.
1517
+ * Amount as a string decimal (e.g. "100.50").
1780
1518
  */
1781
1519
  source_amount: string;
1782
1520
 
1783
- /**
1784
- * Source currency code.
1785
- */
1786
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1787
-
1788
1521
  /**
1789
1522
  * Current status of the conversion.
1790
1523
  */
@@ -1796,9 +1529,9 @@ export namespace ConversionCompletedWebhookEvent {
1796
1529
  target_account_id: string | null;
1797
1530
 
1798
1531
  /**
1799
- * Target currency code.
1532
+ * Amount as a string decimal (e.g. "100.50").
1800
1533
  */
1801
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1534
+ target_amount: string;
1802
1535
 
1803
1536
  /**
1804
1537
  * Resource type discriminator.
@@ -1810,18 +1543,6 @@ export namespace ConversionCompletedWebhookEvent {
1810
1543
  */
1811
1544
  updated_at: string;
1812
1545
  }
1813
-
1814
- export namespace Payload {
1815
- /**
1816
- * Failure details when status is failed, otherwise null.
1817
- */
1818
- export interface Failure {
1819
- /**
1820
- * Human-readable description of the failure.
1821
- */
1822
- message: string;
1823
- }
1824
- }
1825
1546
  }
1826
1547
 
1827
1548
  export interface ConversionFailedWebhookEvent {
@@ -1871,36 +1592,21 @@ export namespace ConversionFailedWebhookEvent {
1871
1592
  */
1872
1593
  created_at: string;
1873
1594
 
1874
- /**
1875
- * Failure details when status is failed, otherwise null.
1876
- */
1877
- failure: Payload.Failure | null;
1878
-
1879
1595
  /**
1880
1596
  * Key-value pairs stored with the conversion.
1881
1597
  */
1882
1598
  metadata: { [key: string]: string };
1883
1599
 
1884
- /**
1885
- * ID of the associated quote, or null.
1886
- */
1887
- quote_id: string | null;
1888
-
1889
1600
  /**
1890
1601
  * ID of the source account, or null.
1891
1602
  */
1892
1603
  source_account_id: string | null;
1893
1604
 
1894
1605
  /**
1895
- * Source amount as a string decimal.
1606
+ * Amount as a string decimal (e.g. "100.50").
1896
1607
  */
1897
1608
  source_amount: string;
1898
1609
 
1899
- /**
1900
- * Source currency code.
1901
- */
1902
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1903
-
1904
1610
  /**
1905
1611
  * Current status of the conversion.
1906
1612
  */
@@ -1912,9 +1618,9 @@ export namespace ConversionFailedWebhookEvent {
1912
1618
  target_account_id: string | null;
1913
1619
 
1914
1620
  /**
1915
- * Target currency code.
1621
+ * Amount as a string decimal (e.g. "100.50").
1916
1622
  */
1917
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1623
+ target_amount: string;
1918
1624
 
1919
1625
  /**
1920
1626
  * Resource type discriminator.
@@ -1926,18 +1632,6 @@ export namespace ConversionFailedWebhookEvent {
1926
1632
  */
1927
1633
  updated_at: string;
1928
1634
  }
1929
-
1930
- export namespace Payload {
1931
- /**
1932
- * Failure details when status is failed, otherwise null.
1933
- */
1934
- export interface Failure {
1935
- /**
1936
- * Human-readable description of the failure.
1937
- */
1938
- message: string;
1939
- }
1940
- }
1941
1635
  }
1942
1636
 
1943
1637
  export interface AccountHolderActiveWebhookEvent {
@@ -1978,12 +1672,15 @@ export namespace AccountHolderActiveWebhookEvent {
1978
1672
  id: string;
1979
1673
 
1980
1674
  /**
1981
- * Beneficiary details used to create this account holder.
1675
+ * Beneficiary details used to create this account holder. Which shape is returned
1676
+ * follows `country_of_citizenship`: **US individual** when it is `US`, **Non-US
1677
+ * individual** for any other country, **Business** when `holder_type` is
1678
+ * `business`.
1982
1679
  */
1983
1680
  beneficiary_data:
1984
- | Payload.UsBeneficiaryDataResponse
1985
- | Payload.NonUsBeneficiaryDataResponse
1986
- | Payload.BusinessBeneficiaryDataResponse;
1681
+ | Payload.V1UsBeneficiaryDataResponse
1682
+ | Payload.V1NonUsBeneficiaryDataResponse
1683
+ | Payload.V1BusinessBeneficiaryDataResponse;
1987
1684
 
1988
1685
  /**
1989
1686
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -2007,7 +1704,7 @@ export namespace AccountHolderActiveWebhookEvent {
2007
1704
  }
2008
1705
 
2009
1706
  export namespace Payload {
2010
- export interface UsBeneficiaryDataResponse {
1707
+ export interface V1UsBeneficiaryDataResponse {
2011
1708
  /**
2012
1709
  * ISO 3166-1 alpha-2 country code of citizenship.
2013
1710
  */
@@ -2023,8 +1720,8 @@ export namespace AccountHolderActiveWebhookEvent {
2023
1720
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
2024
1721
  */
2025
1722
  identification:
2026
- | UsBeneficiaryDataResponse.SsnIdentification
2027
- | UsBeneficiaryDataResponse.ItinIdentification;
1723
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
1724
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
2028
1725
 
2029
1726
  /**
2030
1727
  * Full legal name of the account holder.
@@ -2032,68 +1729,70 @@ export namespace AccountHolderActiveWebhookEvent {
2032
1729
  legal_name: string;
2033
1730
 
2034
1731
  /**
2035
- * Residential address of the account holder.
1732
+ * Residential address of the account holder. **US address** requires
1733
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
1734
+ * other country and allows `state` to be null.
2036
1735
  */
2037
1736
  residential_address:
2038
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
2039
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
1737
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
1738
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2040
1739
  }
2041
1740
 
2042
- export namespace UsBeneficiaryDataResponse {
2043
- export interface SsnIdentification {
1741
+ export namespace V1UsBeneficiaryDataResponse {
1742
+ export interface V1SsnIdentification {
2044
1743
  type: 'ssn';
2045
1744
 
2046
1745
  value: string;
2047
1746
  }
2048
1747
 
2049
- export interface ItinIdentification {
1748
+ export interface V1ItinIdentification {
2050
1749
  type: 'itin';
2051
1750
 
2052
1751
  value: string;
2053
1752
  }
2054
1753
 
2055
- export interface UsResidentialAddressResponse {
1754
+ export interface V1UsResidentialAddress {
2056
1755
  /**
2057
- * City name.
1756
+ * City or locality.
2058
1757
  */
2059
1758
  city: string;
2060
1759
 
2061
1760
  /**
2062
1761
  * ISO 3166-1 alpha-2 country code.
2063
1762
  */
2064
- country: 'US';
1763
+ country_code: 'US';
2065
1764
 
2066
1765
  /**
2067
- * Postal or ZIP code.
1766
+ * Primary street address.
2068
1767
  */
2069
- postal_code: string;
1768
+ line_1: string;
2070
1769
 
2071
1770
  /**
2072
- * Two-letter state code.
1771
+ * Secondary street address, or null if not recorded.
2073
1772
  */
2074
- state: string;
1773
+ line_2: string | null;
2075
1774
 
2076
1775
  /**
2077
- * Primary street address.
1776
+ * Postal or ZIP code.
2078
1777
  */
2079
- street_line_1: string;
1778
+ postal_code: string;
2080
1779
 
2081
1780
  /**
2082
- * Secondary street address (apartment, suite, etc.).
1781
+ * State, province, or region.
2083
1782
  */
2084
- street_line_2: string | null;
1783
+ state: string;
2085
1784
  }
2086
1785
 
2087
- export interface NonUsResidentialAddressResponse {
1786
+ export interface V1NonUsResidentialAddress {
2088
1787
  /**
2089
- * City name.
1788
+ * City or locality.
2090
1789
  */
2091
1790
  city: string;
2092
1791
 
2093
1792
  /**
2094
1793
  * ISO 3166-1 alpha-2 country code.
2095
1794
  */
2096
- country:
1795
+ country_code:
2097
1796
  | 'AF'
2098
1797
  | 'AL'
2099
1798
  | 'DZ'
@@ -2345,23 +2044,28 @@ export namespace AccountHolderActiveWebhookEvent {
2345
2044
  | 'XK';
2346
2045
 
2347
2046
  /**
2348
- * Postal or ZIP code.
2047
+ * Primary street address.
2349
2048
  */
2350
- postal_code: string;
2049
+ line_1: string;
2351
2050
 
2352
2051
  /**
2353
- * Primary street address.
2052
+ * Secondary street address, or null if not recorded.
2354
2053
  */
2355
- street_line_1: string;
2054
+ line_2: string | null;
2356
2055
 
2357
2056
  /**
2358
- * Secondary street address (apartment, suite, etc.).
2057
+ * Postal or ZIP code.
2058
+ */
2059
+ postal_code: string;
2060
+
2061
+ /**
2062
+ * State, province, or region, or null if not recorded.
2359
2063
  */
2360
- street_line_2: string | null;
2064
+ state: string | null;
2361
2065
  }
2362
2066
  }
2363
2067
 
2364
- export interface NonUsBeneficiaryDataResponse {
2068
+ export interface V1NonUsBeneficiaryDataResponse {
2365
2069
  /**
2366
2070
  * ISO 3166-1 alpha-2 country code of citizenship.
2367
2071
  */
@@ -2624,7 +2328,7 @@ export namespace AccountHolderActiveWebhookEvent {
2624
2328
  /**
2625
2329
  * Government-issued identification with type: "id" (generic government-issued ID).
2626
2330
  */
2627
- identification: NonUsBeneficiaryDataResponse.Identification;
2331
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
2628
2332
 
2629
2333
  /**
2630
2334
  * Full legal name of the account holder.
@@ -2632,14 +2336,16 @@ export namespace AccountHolderActiveWebhookEvent {
2632
2336
  legal_name: string;
2633
2337
 
2634
2338
  /**
2635
- * Residential address of the account holder.
2339
+ * Residential address of the account holder. **US address** requires
2340
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
2341
+ * other country and allows `state` to be null.
2636
2342
  */
2637
2343
  residential_address:
2638
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
2639
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2344
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
2345
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2640
2346
  }
2641
2347
 
2642
- export namespace NonUsBeneficiaryDataResponse {
2348
+ export namespace V1NonUsBeneficiaryDataResponse {
2643
2349
  /**
2644
2350
  * Government-issued identification with type: "id" (generic government-issued ID).
2645
2351
  */
@@ -2649,48 +2355,48 @@ export namespace AccountHolderActiveWebhookEvent {
2649
2355
  value: string;
2650
2356
  }
2651
2357
 
2652
- export interface UsResidentialAddressResponse {
2358
+ export interface V1UsResidentialAddress {
2653
2359
  /**
2654
- * City name.
2360
+ * City or locality.
2655
2361
  */
2656
2362
  city: string;
2657
2363
 
2658
2364
  /**
2659
2365
  * ISO 3166-1 alpha-2 country code.
2660
2366
  */
2661
- country: 'US';
2367
+ country_code: 'US';
2662
2368
 
2663
2369
  /**
2664
- * Postal or ZIP code.
2370
+ * Primary street address.
2665
2371
  */
2666
- postal_code: string;
2372
+ line_1: string;
2667
2373
 
2668
2374
  /**
2669
- * Two-letter state code.
2375
+ * Secondary street address, or null if not recorded.
2670
2376
  */
2671
- state: string;
2377
+ line_2: string | null;
2672
2378
 
2673
2379
  /**
2674
- * Primary street address.
2380
+ * Postal or ZIP code.
2675
2381
  */
2676
- street_line_1: string;
2382
+ postal_code: string;
2677
2383
 
2678
2384
  /**
2679
- * Secondary street address (apartment, suite, etc.).
2385
+ * State, province, or region.
2680
2386
  */
2681
- street_line_2: string | null;
2387
+ state: string;
2682
2388
  }
2683
2389
 
2684
- export interface NonUsResidentialAddressResponse {
2390
+ export interface V1NonUsResidentialAddress {
2685
2391
  /**
2686
- * City name.
2392
+ * City or locality.
2687
2393
  */
2688
2394
  city: string;
2689
2395
 
2690
2396
  /**
2691
2397
  * ISO 3166-1 alpha-2 country code.
2692
2398
  */
2693
- country:
2399
+ country_code:
2694
2400
  | 'AF'
2695
2401
  | 'AL'
2696
2402
  | 'DZ'
@@ -2942,38 +2648,44 @@ export namespace AccountHolderActiveWebhookEvent {
2942
2648
  | 'XK';
2943
2649
 
2944
2650
  /**
2945
- * Postal or ZIP code.
2651
+ * Primary street address.
2946
2652
  */
2947
- postal_code: string;
2653
+ line_1: string;
2948
2654
 
2949
2655
  /**
2950
- * Primary street address.
2656
+ * Secondary street address, or null if not recorded.
2657
+ */
2658
+ line_2: string | null;
2659
+
2660
+ /**
2661
+ * Postal or ZIP code.
2951
2662
  */
2952
- street_line_1: string;
2663
+ postal_code: string;
2953
2664
 
2954
2665
  /**
2955
- * Secondary street address (apartment, suite, etc.).
2666
+ * State, province, or region, or null if not recorded.
2956
2667
  */
2957
- street_line_2: string | null;
2668
+ state: string | null;
2958
2669
  }
2959
2670
  }
2960
2671
 
2961
- export interface BusinessBeneficiaryDataResponse {
2672
+ export interface V1BusinessBeneficiaryDataResponse {
2962
2673
  /**
2963
2674
  * Beneficial owners of the business. At least one required.
2964
2675
  */
2965
2676
  beneficial_owners: Array<
2966
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
2967
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
2677
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
2678
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
2968
2679
  >;
2969
2680
 
2970
2681
  /**
2971
2682
  * Individual with primary responsibility for controlling, managing, or directing
2972
- * the business.
2683
+ * the business. Follows the same US / non-US split as `beneficiary_data`, based on
2684
+ * the control person's own `country_of_citizenship`.
2973
2685
  */
2974
2686
  control_person:
2975
- | BusinessBeneficiaryDataResponse.UnionMember0
2976
- | BusinessBeneficiaryDataResponse.UnionMember1;
2687
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
2688
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
2977
2689
 
2978
2690
  /**
2979
2691
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -3241,26 +2953,30 @@ export namespace AccountHolderActiveWebhookEvent {
3241
2953
  legal_business_name: string;
3242
2954
 
3243
2955
  /**
3244
- * Physical operating address of the business.
2956
+ * Physical operating address of the business. **US address** requires
2957
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
2958
+ * other country and allows `state` to be null.
3245
2959
  */
3246
2960
  physical_address:
3247
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3248
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2961
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
2962
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3249
2963
 
3250
2964
  /**
3251
- * Registered legal address of the business.
2965
+ * Registered legal address of the business. **US address** requires
2966
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
2967
+ * other country and allows `state` to be null.
3252
2968
  */
3253
2969
  registered_address:
3254
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3255
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2970
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
2971
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3256
2972
 
3257
2973
  /**
3258
2974
  * Business registration number: type "ein" (Employer Identification Number, format
3259
2975
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
3260
2976
  */
3261
2977
  registration_number:
3262
- | BusinessBeneficiaryDataResponse.EinIdentification
3263
- | BusinessBeneficiaryDataResponse.SsnIdentification;
2978
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
2979
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
3264
2980
 
3265
2981
  /**
3266
2982
  * State or subdivision where the business is incorporated.
@@ -3273,8 +2989,8 @@ export namespace AccountHolderActiveWebhookEvent {
3273
2989
  year_of_incorporation: number;
3274
2990
  }
3275
2991
 
3276
- export namespace BusinessBeneficiaryDataResponse {
3277
- export interface UsBeneficiaryDataResponse {
2992
+ export namespace V1BusinessBeneficiaryDataResponse {
2993
+ export interface V1UsBeneficiaryDataResponse {
3278
2994
  /**
3279
2995
  * ISO 3166-1 alpha-2 country code of citizenship.
3280
2996
  */
@@ -3290,8 +3006,8 @@ export namespace AccountHolderActiveWebhookEvent {
3290
3006
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
3291
3007
  */
3292
3008
  identification:
3293
- | UsBeneficiaryDataResponse.SsnIdentification
3294
- | UsBeneficiaryDataResponse.ItinIdentification;
3009
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
3010
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
3295
3011
 
3296
3012
  /**
3297
3013
  * Full legal name of the account holder.
@@ -3299,68 +3015,70 @@ export namespace AccountHolderActiveWebhookEvent {
3299
3015
  legal_name: string;
3300
3016
 
3301
3017
  /**
3302
- * Residential address of the account holder.
3018
+ * Residential address of the account holder. **US address** requires
3019
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3020
+ * other country and allows `state` to be null.
3303
3021
  */
3304
3022
  residential_address:
3305
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
3306
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3023
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
3024
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3307
3025
  }
3308
3026
 
3309
- export namespace UsBeneficiaryDataResponse {
3310
- export interface SsnIdentification {
3027
+ export namespace V1UsBeneficiaryDataResponse {
3028
+ export interface V1SsnIdentification {
3311
3029
  type: 'ssn';
3312
3030
 
3313
3031
  value: string;
3314
3032
  }
3315
3033
 
3316
- export interface ItinIdentification {
3034
+ export interface V1ItinIdentification {
3317
3035
  type: 'itin';
3318
3036
 
3319
3037
  value: string;
3320
3038
  }
3321
3039
 
3322
- export interface UsResidentialAddressResponse {
3040
+ export interface V1UsResidentialAddress {
3323
3041
  /**
3324
- * City name.
3042
+ * City or locality.
3325
3043
  */
3326
3044
  city: string;
3327
3045
 
3328
3046
  /**
3329
3047
  * ISO 3166-1 alpha-2 country code.
3330
3048
  */
3331
- country: 'US';
3049
+ country_code: 'US';
3332
3050
 
3333
3051
  /**
3334
- * Postal or ZIP code.
3052
+ * Primary street address.
3335
3053
  */
3336
- postal_code: string;
3054
+ line_1: string;
3337
3055
 
3338
3056
  /**
3339
- * Two-letter state code.
3057
+ * Secondary street address, or null if not recorded.
3340
3058
  */
3341
- state: string;
3059
+ line_2: string | null;
3342
3060
 
3343
3061
  /**
3344
- * Primary street address.
3062
+ * Postal or ZIP code.
3345
3063
  */
3346
- street_line_1: string;
3064
+ postal_code: string;
3347
3065
 
3348
3066
  /**
3349
- * Secondary street address (apartment, suite, etc.).
3067
+ * State, province, or region.
3350
3068
  */
3351
- street_line_2: string | null;
3069
+ state: string;
3352
3070
  }
3353
3071
 
3354
- export interface NonUsResidentialAddressResponse {
3072
+ export interface V1NonUsResidentialAddress {
3355
3073
  /**
3356
- * City name.
3074
+ * City or locality.
3357
3075
  */
3358
3076
  city: string;
3359
3077
 
3360
3078
  /**
3361
3079
  * ISO 3166-1 alpha-2 country code.
3362
3080
  */
3363
- country:
3081
+ country_code:
3364
3082
  | 'AF'
3365
3083
  | 'AL'
3366
3084
  | 'DZ'
@@ -3612,23 +3330,28 @@ export namespace AccountHolderActiveWebhookEvent {
3612
3330
  | 'XK';
3613
3331
 
3614
3332
  /**
3615
- * Postal or ZIP code.
3333
+ * Primary street address.
3616
3334
  */
3617
- postal_code: string;
3335
+ line_1: string;
3618
3336
 
3619
3337
  /**
3620
- * Primary street address.
3338
+ * Secondary street address, or null if not recorded.
3339
+ */
3340
+ line_2: string | null;
3341
+
3342
+ /**
3343
+ * Postal or ZIP code.
3621
3344
  */
3622
- street_line_1: string;
3345
+ postal_code: string;
3623
3346
 
3624
3347
  /**
3625
- * Secondary street address (apartment, suite, etc.).
3348
+ * State, province, or region, or null if not recorded.
3626
3349
  */
3627
- street_line_2: string | null;
3350
+ state: string | null;
3628
3351
  }
3629
3352
  }
3630
3353
 
3631
- export interface NonUsBeneficiaryDataResponse {
3354
+ export interface V1NonUsBeneficiaryDataResponse {
3632
3355
  /**
3633
3356
  * ISO 3166-1 alpha-2 country code of citizenship.
3634
3357
  */
@@ -3891,7 +3614,7 @@ export namespace AccountHolderActiveWebhookEvent {
3891
3614
  /**
3892
3615
  * Government-issued identification with type: "id" (generic government-issued ID).
3893
3616
  */
3894
- identification: NonUsBeneficiaryDataResponse.Identification;
3617
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
3895
3618
 
3896
3619
  /**
3897
3620
  * Full legal name of the account holder.
@@ -3899,14 +3622,16 @@ export namespace AccountHolderActiveWebhookEvent {
3899
3622
  legal_name: string;
3900
3623
 
3901
3624
  /**
3902
- * Residential address of the account holder.
3625
+ * Residential address of the account holder. **US address** requires
3626
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3627
+ * other country and allows `state` to be null.
3903
3628
  */
3904
3629
  residential_address:
3905
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
3906
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3630
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
3631
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3907
3632
  }
3908
3633
 
3909
- export namespace NonUsBeneficiaryDataResponse {
3634
+ export namespace V1NonUsBeneficiaryDataResponse {
3910
3635
  /**
3911
3636
  * Government-issued identification with type: "id" (generic government-issued ID).
3912
3637
  */
@@ -3916,48 +3641,48 @@ export namespace AccountHolderActiveWebhookEvent {
3916
3641
  value: string;
3917
3642
  }
3918
3643
 
3919
- export interface UsResidentialAddressResponse {
3644
+ export interface V1UsResidentialAddress {
3920
3645
  /**
3921
- * City name.
3646
+ * City or locality.
3922
3647
  */
3923
3648
  city: string;
3924
3649
 
3925
3650
  /**
3926
3651
  * ISO 3166-1 alpha-2 country code.
3927
3652
  */
3928
- country: 'US';
3653
+ country_code: 'US';
3929
3654
 
3930
3655
  /**
3931
- * Postal or ZIP code.
3656
+ * Primary street address.
3932
3657
  */
3933
- postal_code: string;
3658
+ line_1: string;
3934
3659
 
3935
3660
  /**
3936
- * Two-letter state code.
3661
+ * Secondary street address, or null if not recorded.
3937
3662
  */
3938
- state: string;
3663
+ line_2: string | null;
3939
3664
 
3940
3665
  /**
3941
- * Primary street address.
3666
+ * Postal or ZIP code.
3942
3667
  */
3943
- street_line_1: string;
3668
+ postal_code: string;
3944
3669
 
3945
3670
  /**
3946
- * Secondary street address (apartment, suite, etc.).
3671
+ * State, province, or region.
3947
3672
  */
3948
- street_line_2: string | null;
3673
+ state: string;
3949
3674
  }
3950
3675
 
3951
- export interface NonUsResidentialAddressResponse {
3676
+ export interface V1NonUsResidentialAddress {
3952
3677
  /**
3953
- * City name.
3678
+ * City or locality.
3954
3679
  */
3955
3680
  city: string;
3956
3681
 
3957
3682
  /**
3958
3683
  * ISO 3166-1 alpha-2 country code.
3959
3684
  */
3960
- country:
3685
+ country_code:
3961
3686
  | 'AF'
3962
3687
  | 'AL'
3963
3688
  | 'DZ'
@@ -4209,19 +3934,24 @@ export namespace AccountHolderActiveWebhookEvent {
4209
3934
  | 'XK';
4210
3935
 
4211
3936
  /**
4212
- * Postal or ZIP code.
3937
+ * Primary street address.
4213
3938
  */
4214
- postal_code: string;
3939
+ line_1: string;
4215
3940
 
4216
3941
  /**
4217
- * Primary street address.
3942
+ * Secondary street address, or null if not recorded.
3943
+ */
3944
+ line_2: string | null;
3945
+
3946
+ /**
3947
+ * Postal or ZIP code.
4218
3948
  */
4219
- street_line_1: string;
3949
+ postal_code: string;
4220
3950
 
4221
3951
  /**
4222
- * Secondary street address (apartment, suite, etc.).
3952
+ * State, province, or region, or null if not recorded.
4223
3953
  */
4224
- street_line_2: string | null;
3954
+ state: string | null;
4225
3955
  }
4226
3956
  }
4227
3957
 
@@ -4240,7 +3970,7 @@ export namespace AccountHolderActiveWebhookEvent {
4240
3970
  * Government-issued identification with type: "ssn" (Social Security Number,
4241
3971
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
4242
3972
  */
4243
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
3973
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
4244
3974
 
4245
3975
  /**
4246
3976
  * Full legal name of the account holder.
@@ -4248,11 +3978,11 @@ export namespace AccountHolderActiveWebhookEvent {
4248
3978
  legal_name: string;
4249
3979
 
4250
3980
  /**
4251
- * Residential address of the account holder.
3981
+ * Residential address of the account holder. **US address** requires
3982
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3983
+ * other country and allows `state` to be null.
4252
3984
  */
4253
- residential_address:
4254
- | UnionMember0.UsResidentialAddressResponse
4255
- | UnionMember0.NonUsResidentialAddressResponse;
3985
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
4256
3986
 
4257
3987
  /**
4258
3988
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4262,60 +3992,60 @@ export namespace AccountHolderActiveWebhookEvent {
4262
3992
  }
4263
3993
 
4264
3994
  export namespace UnionMember0 {
4265
- export interface SsnIdentification {
3995
+ export interface V1SsnIdentification {
4266
3996
  type: 'ssn';
4267
3997
 
4268
3998
  value: string;
4269
3999
  }
4270
4000
 
4271
- export interface ItinIdentification {
4001
+ export interface V1ItinIdentification {
4272
4002
  type: 'itin';
4273
4003
 
4274
4004
  value: string;
4275
4005
  }
4276
4006
 
4277
- export interface UsResidentialAddressResponse {
4007
+ export interface V1UsResidentialAddress {
4278
4008
  /**
4279
- * City name.
4009
+ * City or locality.
4280
4010
  */
4281
4011
  city: string;
4282
4012
 
4283
4013
  /**
4284
4014
  * ISO 3166-1 alpha-2 country code.
4285
4015
  */
4286
- country: 'US';
4016
+ country_code: 'US';
4287
4017
 
4288
4018
  /**
4289
- * Postal or ZIP code.
4019
+ * Primary street address.
4290
4020
  */
4291
- postal_code: string;
4021
+ line_1: string;
4292
4022
 
4293
4023
  /**
4294
- * Two-letter state code.
4024
+ * Secondary street address, or null if not recorded.
4295
4025
  */
4296
- state: string;
4026
+ line_2: string | null;
4297
4027
 
4298
4028
  /**
4299
- * Primary street address.
4029
+ * Postal or ZIP code.
4300
4030
  */
4301
- street_line_1: string;
4031
+ postal_code: string;
4302
4032
 
4303
4033
  /**
4304
- * Secondary street address (apartment, suite, etc.).
4034
+ * State, province, or region.
4305
4035
  */
4306
- street_line_2: string | null;
4036
+ state: string;
4307
4037
  }
4308
4038
 
4309
- export interface NonUsResidentialAddressResponse {
4039
+ export interface V1NonUsResidentialAddress {
4310
4040
  /**
4311
- * City name.
4041
+ * City or locality.
4312
4042
  */
4313
4043
  city: string;
4314
4044
 
4315
4045
  /**
4316
4046
  * ISO 3166-1 alpha-2 country code.
4317
4047
  */
4318
- country:
4048
+ country_code:
4319
4049
  | 'AF'
4320
4050
  | 'AL'
4321
4051
  | 'DZ'
@@ -4567,19 +4297,24 @@ export namespace AccountHolderActiveWebhookEvent {
4567
4297
  | 'XK';
4568
4298
 
4569
4299
  /**
4570
- * Postal or ZIP code.
4300
+ * Primary street address.
4571
4301
  */
4572
- postal_code: string;
4302
+ line_1: string;
4573
4303
 
4574
4304
  /**
4575
- * Primary street address.
4305
+ * Secondary street address, or null if not recorded.
4306
+ */
4307
+ line_2: string | null;
4308
+
4309
+ /**
4310
+ * Postal or ZIP code.
4576
4311
  */
4577
- street_line_1: string;
4312
+ postal_code: string;
4578
4313
 
4579
4314
  /**
4580
- * Secondary street address (apartment, suite, etc.).
4315
+ * State, province, or region, or null if not recorded.
4581
4316
  */
4582
- street_line_2: string | null;
4317
+ state: string | null;
4583
4318
  }
4584
4319
  }
4585
4320
 
@@ -4854,11 +4589,11 @@ export namespace AccountHolderActiveWebhookEvent {
4854
4589
  legal_name: string;
4855
4590
 
4856
4591
  /**
4857
- * Residential address of the account holder.
4592
+ * Residential address of the account holder. **US address** requires
4593
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
4594
+ * other country and allows `state` to be null.
4858
4595
  */
4859
- residential_address:
4860
- | UnionMember1.UsResidentialAddressResponse
4861
- | UnionMember1.NonUsResidentialAddressResponse;
4596
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
4862
4597
 
4863
4598
  /**
4864
4599
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4877,48 +4612,48 @@ export namespace AccountHolderActiveWebhookEvent {
4877
4612
  value: string;
4878
4613
  }
4879
4614
 
4880
- export interface UsResidentialAddressResponse {
4615
+ export interface V1UsResidentialAddress {
4881
4616
  /**
4882
- * City name.
4617
+ * City or locality.
4883
4618
  */
4884
4619
  city: string;
4885
4620
 
4886
4621
  /**
4887
4622
  * ISO 3166-1 alpha-2 country code.
4888
4623
  */
4889
- country: 'US';
4624
+ country_code: 'US';
4890
4625
 
4891
4626
  /**
4892
- * Postal or ZIP code.
4627
+ * Primary street address.
4893
4628
  */
4894
- postal_code: string;
4629
+ line_1: string;
4895
4630
 
4896
4631
  /**
4897
- * Two-letter state code.
4632
+ * Secondary street address, or null if not recorded.
4898
4633
  */
4899
- state: string;
4634
+ line_2: string | null;
4900
4635
 
4901
4636
  /**
4902
- * Primary street address.
4637
+ * Postal or ZIP code.
4903
4638
  */
4904
- street_line_1: string;
4639
+ postal_code: string;
4905
4640
 
4906
4641
  /**
4907
- * Secondary street address (apartment, suite, etc.).
4642
+ * State, province, or region.
4908
4643
  */
4909
- street_line_2: string | null;
4644
+ state: string;
4910
4645
  }
4911
4646
 
4912
- export interface NonUsResidentialAddressResponse {
4647
+ export interface V1NonUsResidentialAddress {
4913
4648
  /**
4914
- * City name.
4649
+ * City or locality.
4915
4650
  */
4916
4651
  city: string;
4917
4652
 
4918
4653
  /**
4919
4654
  * ISO 3166-1 alpha-2 country code.
4920
4655
  */
4921
- country:
4656
+ country_code:
4922
4657
  | 'AF'
4923
4658
  | 'AL'
4924
4659
  | 'DZ'
@@ -5170,64 +4905,69 @@ export namespace AccountHolderActiveWebhookEvent {
5170
4905
  | 'XK';
5171
4906
 
5172
4907
  /**
5173
- * Postal or ZIP code.
4908
+ * Primary street address.
5174
4909
  */
5175
- postal_code: string;
4910
+ line_1: string;
5176
4911
 
5177
4912
  /**
5178
- * Primary street address.
4913
+ * Secondary street address, or null if not recorded.
4914
+ */
4915
+ line_2: string | null;
4916
+
4917
+ /**
4918
+ * Postal or ZIP code.
5179
4919
  */
5180
- street_line_1: string;
4920
+ postal_code: string;
5181
4921
 
5182
4922
  /**
5183
- * Secondary street address (apartment, suite, etc.).
4923
+ * State, province, or region, or null if not recorded.
5184
4924
  */
5185
- street_line_2: string | null;
4925
+ state: string | null;
5186
4926
  }
5187
4927
  }
5188
4928
 
5189
- export interface UsResidentialAddressResponse {
4929
+ export interface V1UsResidentialAddress {
5190
4930
  /**
5191
- * City name.
4931
+ * City or locality.
5192
4932
  */
5193
4933
  city: string;
5194
4934
 
5195
4935
  /**
5196
4936
  * ISO 3166-1 alpha-2 country code.
5197
4937
  */
5198
- country: 'US';
4938
+ country_code: 'US';
5199
4939
 
5200
4940
  /**
5201
- * Postal or ZIP code.
4941
+ * Primary street address.
5202
4942
  */
5203
- postal_code: string;
4943
+ line_1: string;
5204
4944
 
5205
4945
  /**
5206
- * Two-letter state code.
4946
+ * Secondary street address, or null if not recorded.
5207
4947
  */
5208
- state: string;
4948
+ line_2: string | null;
5209
4949
 
5210
4950
  /**
5211
- * Primary street address.
4951
+ * Postal or ZIP code.
5212
4952
  */
5213
- street_line_1: string;
4953
+ postal_code: string;
5214
4954
 
5215
4955
  /**
5216
- * Secondary street address (apartment, suite, etc.).
4956
+ * State, province, or region.
5217
4957
  */
5218
- street_line_2: string | null;
4958
+ state: string;
5219
4959
  }
5220
4960
 
5221
- export interface NonUsResidentialAddressResponse {
4961
+ export interface V1NonUsResidentialAddress {
5222
4962
  /**
5223
- * City name.
4963
+ * City or locality.
5224
4964
  */
5225
4965
  city: string;
5226
4966
 
5227
4967
  /**
5228
4968
  * ISO 3166-1 alpha-2 country code.
5229
4969
  */
5230
- country:
4970
+ country_code:
5231
4971
  | 'AF'
5232
4972
  | 'AL'
5233
4973
  | 'DZ'
@@ -5479,63 +5219,68 @@ export namespace AccountHolderActiveWebhookEvent {
5479
5219
  | 'XK';
5480
5220
 
5481
5221
  /**
5482
- * Postal or ZIP code.
5222
+ * Primary street address.
5483
5223
  */
5484
- postal_code: string;
5224
+ line_1: string;
5485
5225
 
5486
5226
  /**
5487
- * Primary street address.
5227
+ * Secondary street address, or null if not recorded.
5488
5228
  */
5489
- street_line_1: string;
5229
+ line_2: string | null;
5490
5230
 
5491
5231
  /**
5492
- * Secondary street address (apartment, suite, etc.).
5232
+ * Postal or ZIP code.
5233
+ */
5234
+ postal_code: string;
5235
+
5236
+ /**
5237
+ * State, province, or region, or null if not recorded.
5493
5238
  */
5494
- street_line_2: string | null;
5239
+ state: string | null;
5495
5240
  }
5496
5241
 
5497
- export interface UsResidentialAddressResponse {
5242
+ export interface V1UsResidentialAddress {
5498
5243
  /**
5499
- * City name.
5244
+ * City or locality.
5500
5245
  */
5501
5246
  city: string;
5502
5247
 
5503
5248
  /**
5504
5249
  * ISO 3166-1 alpha-2 country code.
5505
5250
  */
5506
- country: 'US';
5251
+ country_code: 'US';
5507
5252
 
5508
5253
  /**
5509
- * Postal or ZIP code.
5254
+ * Primary street address.
5510
5255
  */
5511
- postal_code: string;
5256
+ line_1: string;
5512
5257
 
5513
5258
  /**
5514
- * Two-letter state code.
5259
+ * Secondary street address, or null if not recorded.
5515
5260
  */
5516
- state: string;
5261
+ line_2: string | null;
5517
5262
 
5518
5263
  /**
5519
- * Primary street address.
5264
+ * Postal or ZIP code.
5520
5265
  */
5521
- street_line_1: string;
5266
+ postal_code: string;
5522
5267
 
5523
5268
  /**
5524
- * Secondary street address (apartment, suite, etc.).
5269
+ * State, province, or region.
5525
5270
  */
5526
- street_line_2: string | null;
5271
+ state: string;
5527
5272
  }
5528
5273
 
5529
- export interface NonUsResidentialAddressResponse {
5274
+ export interface V1NonUsResidentialAddress {
5530
5275
  /**
5531
- * City name.
5276
+ * City or locality.
5532
5277
  */
5533
5278
  city: string;
5534
5279
 
5535
5280
  /**
5536
5281
  * ISO 3166-1 alpha-2 country code.
5537
5282
  */
5538
- country:
5283
+ country_code:
5539
5284
  | 'AF'
5540
5285
  | 'AL'
5541
5286
  | 'DZ'
@@ -5787,28 +5532,33 @@ export namespace AccountHolderActiveWebhookEvent {
5787
5532
  | 'XK';
5788
5533
 
5789
5534
  /**
5790
- * Postal or ZIP code.
5535
+ * Primary street address.
5791
5536
  */
5792
- postal_code: string;
5537
+ line_1: string;
5793
5538
 
5794
5539
  /**
5795
- * Primary street address.
5540
+ * Secondary street address, or null if not recorded.
5541
+ */
5542
+ line_2: string | null;
5543
+
5544
+ /**
5545
+ * Postal or ZIP code.
5796
5546
  */
5797
- street_line_1: string;
5547
+ postal_code: string;
5798
5548
 
5799
5549
  /**
5800
- * Secondary street address (apartment, suite, etc.).
5550
+ * State, province, or region, or null if not recorded.
5801
5551
  */
5802
- street_line_2: string | null;
5552
+ state: string | null;
5803
5553
  }
5804
5554
 
5805
- export interface EinIdentification {
5555
+ export interface V1EinIdentification {
5806
5556
  type: 'ein';
5807
5557
 
5808
5558
  value: string;
5809
5559
  }
5810
5560
 
5811
- export interface SsnIdentification {
5561
+ export interface V1SsnIdentification {
5812
5562
  type: 'ssn';
5813
5563
 
5814
5564
  value: string;
@@ -5855,12 +5605,15 @@ export namespace AccountHolderClosedWebhookEvent {
5855
5605
  id: string;
5856
5606
 
5857
5607
  /**
5858
- * Beneficiary details used to create this account holder.
5608
+ * Beneficiary details used to create this account holder. Which shape is returned
5609
+ * follows `country_of_citizenship`: **US individual** when it is `US`, **Non-US
5610
+ * individual** for any other country, **Business** when `holder_type` is
5611
+ * `business`.
5859
5612
  */
5860
5613
  beneficiary_data:
5861
- | Payload.UsBeneficiaryDataResponse
5862
- | Payload.NonUsBeneficiaryDataResponse
5863
- | Payload.BusinessBeneficiaryDataResponse;
5614
+ | Payload.V1UsBeneficiaryDataResponse
5615
+ | Payload.V1NonUsBeneficiaryDataResponse
5616
+ | Payload.V1BusinessBeneficiaryDataResponse;
5864
5617
 
5865
5618
  /**
5866
5619
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -5884,7 +5637,7 @@ export namespace AccountHolderClosedWebhookEvent {
5884
5637
  }
5885
5638
 
5886
5639
  export namespace Payload {
5887
- export interface UsBeneficiaryDataResponse {
5640
+ export interface V1UsBeneficiaryDataResponse {
5888
5641
  /**
5889
5642
  * ISO 3166-1 alpha-2 country code of citizenship.
5890
5643
  */
@@ -5900,8 +5653,8 @@ export namespace AccountHolderClosedWebhookEvent {
5900
5653
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
5901
5654
  */
5902
5655
  identification:
5903
- | UsBeneficiaryDataResponse.SsnIdentification
5904
- | UsBeneficiaryDataResponse.ItinIdentification;
5656
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
5657
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
5905
5658
 
5906
5659
  /**
5907
5660
  * Full legal name of the account holder.
@@ -5909,68 +5662,70 @@ export namespace AccountHolderClosedWebhookEvent {
5909
5662
  legal_name: string;
5910
5663
 
5911
5664
  /**
5912
- * Residential address of the account holder.
5665
+ * Residential address of the account holder. **US address** requires
5666
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
5667
+ * other country and allows `state` to be null.
5913
5668
  */
5914
5669
  residential_address:
5915
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
5916
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
5670
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
5671
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
5917
5672
  }
5918
5673
 
5919
- export namespace UsBeneficiaryDataResponse {
5920
- export interface SsnIdentification {
5674
+ export namespace V1UsBeneficiaryDataResponse {
5675
+ export interface V1SsnIdentification {
5921
5676
  type: 'ssn';
5922
5677
 
5923
5678
  value: string;
5924
5679
  }
5925
5680
 
5926
- export interface ItinIdentification {
5681
+ export interface V1ItinIdentification {
5927
5682
  type: 'itin';
5928
5683
 
5929
5684
  value: string;
5930
5685
  }
5931
5686
 
5932
- export interface UsResidentialAddressResponse {
5687
+ export interface V1UsResidentialAddress {
5933
5688
  /**
5934
- * City name.
5689
+ * City or locality.
5935
5690
  */
5936
5691
  city: string;
5937
5692
 
5938
5693
  /**
5939
5694
  * ISO 3166-1 alpha-2 country code.
5940
5695
  */
5941
- country: 'US';
5696
+ country_code: 'US';
5942
5697
 
5943
5698
  /**
5944
- * Postal or ZIP code.
5699
+ * Primary street address.
5945
5700
  */
5946
- postal_code: string;
5701
+ line_1: string;
5947
5702
 
5948
5703
  /**
5949
- * Two-letter state code.
5704
+ * Secondary street address, or null if not recorded.
5950
5705
  */
5951
- state: string;
5706
+ line_2: string | null;
5952
5707
 
5953
5708
  /**
5954
- * Primary street address.
5709
+ * Postal or ZIP code.
5955
5710
  */
5956
- street_line_1: string;
5711
+ postal_code: string;
5957
5712
 
5958
5713
  /**
5959
- * Secondary street address (apartment, suite, etc.).
5714
+ * State, province, or region.
5960
5715
  */
5961
- street_line_2: string | null;
5716
+ state: string;
5962
5717
  }
5963
5718
 
5964
- export interface NonUsResidentialAddressResponse {
5719
+ export interface V1NonUsResidentialAddress {
5965
5720
  /**
5966
- * City name.
5721
+ * City or locality.
5967
5722
  */
5968
5723
  city: string;
5969
5724
 
5970
5725
  /**
5971
5726
  * ISO 3166-1 alpha-2 country code.
5972
5727
  */
5973
- country:
5728
+ country_code:
5974
5729
  | 'AF'
5975
5730
  | 'AL'
5976
5731
  | 'DZ'
@@ -6222,23 +5977,28 @@ export namespace AccountHolderClosedWebhookEvent {
6222
5977
  | 'XK';
6223
5978
 
6224
5979
  /**
6225
- * Postal or ZIP code.
5980
+ * Primary street address.
6226
5981
  */
6227
- postal_code: string;
5982
+ line_1: string;
6228
5983
 
6229
5984
  /**
6230
- * Primary street address.
5985
+ * Secondary street address, or null if not recorded.
5986
+ */
5987
+ line_2: string | null;
5988
+
5989
+ /**
5990
+ * Postal or ZIP code.
6231
5991
  */
6232
- street_line_1: string;
5992
+ postal_code: string;
6233
5993
 
6234
5994
  /**
6235
- * Secondary street address (apartment, suite, etc.).
5995
+ * State, province, or region, or null if not recorded.
6236
5996
  */
6237
- street_line_2: string | null;
5997
+ state: string | null;
6238
5998
  }
6239
5999
  }
6240
6000
 
6241
- export interface NonUsBeneficiaryDataResponse {
6001
+ export interface V1NonUsBeneficiaryDataResponse {
6242
6002
  /**
6243
6003
  * ISO 3166-1 alpha-2 country code of citizenship.
6244
6004
  */
@@ -6501,7 +6261,7 @@ export namespace AccountHolderClosedWebhookEvent {
6501
6261
  /**
6502
6262
  * Government-issued identification with type: "id" (generic government-issued ID).
6503
6263
  */
6504
- identification: NonUsBeneficiaryDataResponse.Identification;
6264
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
6505
6265
 
6506
6266
  /**
6507
6267
  * Full legal name of the account holder.
@@ -6509,14 +6269,16 @@ export namespace AccountHolderClosedWebhookEvent {
6509
6269
  legal_name: string;
6510
6270
 
6511
6271
  /**
6512
- * Residential address of the account holder.
6272
+ * Residential address of the account holder. **US address** requires
6273
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
6274
+ * other country and allows `state` to be null.
6513
6275
  */
6514
6276
  residential_address:
6515
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
6516
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6277
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
6278
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
6517
6279
  }
6518
6280
 
6519
- export namespace NonUsBeneficiaryDataResponse {
6281
+ export namespace V1NonUsBeneficiaryDataResponse {
6520
6282
  /**
6521
6283
  * Government-issued identification with type: "id" (generic government-issued ID).
6522
6284
  */
@@ -6526,48 +6288,48 @@ export namespace AccountHolderClosedWebhookEvent {
6526
6288
  value: string;
6527
6289
  }
6528
6290
 
6529
- export interface UsResidentialAddressResponse {
6291
+ export interface V1UsResidentialAddress {
6530
6292
  /**
6531
- * City name.
6293
+ * City or locality.
6532
6294
  */
6533
6295
  city: string;
6534
6296
 
6535
6297
  /**
6536
6298
  * ISO 3166-1 alpha-2 country code.
6537
6299
  */
6538
- country: 'US';
6300
+ country_code: 'US';
6539
6301
 
6540
6302
  /**
6541
- * Postal or ZIP code.
6303
+ * Primary street address.
6542
6304
  */
6543
- postal_code: string;
6305
+ line_1: string;
6544
6306
 
6545
6307
  /**
6546
- * Two-letter state code.
6308
+ * Secondary street address, or null if not recorded.
6547
6309
  */
6548
- state: string;
6310
+ line_2: string | null;
6549
6311
 
6550
6312
  /**
6551
- * Primary street address.
6313
+ * Postal or ZIP code.
6552
6314
  */
6553
- street_line_1: string;
6315
+ postal_code: string;
6554
6316
 
6555
6317
  /**
6556
- * Secondary street address (apartment, suite, etc.).
6318
+ * State, province, or region.
6557
6319
  */
6558
- street_line_2: string | null;
6320
+ state: string;
6559
6321
  }
6560
6322
 
6561
- export interface NonUsResidentialAddressResponse {
6323
+ export interface V1NonUsResidentialAddress {
6562
6324
  /**
6563
- * City name.
6325
+ * City or locality.
6564
6326
  */
6565
6327
  city: string;
6566
6328
 
6567
6329
  /**
6568
6330
  * ISO 3166-1 alpha-2 country code.
6569
6331
  */
6570
- country:
6332
+ country_code:
6571
6333
  | 'AF'
6572
6334
  | 'AL'
6573
6335
  | 'DZ'
@@ -6819,38 +6581,44 @@ export namespace AccountHolderClosedWebhookEvent {
6819
6581
  | 'XK';
6820
6582
 
6821
6583
  /**
6822
- * Postal or ZIP code.
6584
+ * Primary street address.
6823
6585
  */
6824
- postal_code: string;
6586
+ line_1: string;
6825
6587
 
6826
6588
  /**
6827
- * Primary street address.
6589
+ * Secondary street address, or null if not recorded.
6590
+ */
6591
+ line_2: string | null;
6592
+
6593
+ /**
6594
+ * Postal or ZIP code.
6828
6595
  */
6829
- street_line_1: string;
6596
+ postal_code: string;
6830
6597
 
6831
6598
  /**
6832
- * Secondary street address (apartment, suite, etc.).
6599
+ * State, province, or region, or null if not recorded.
6833
6600
  */
6834
- street_line_2: string | null;
6601
+ state: string | null;
6835
6602
  }
6836
6603
  }
6837
6604
 
6838
- export interface BusinessBeneficiaryDataResponse {
6605
+ export interface V1BusinessBeneficiaryDataResponse {
6839
6606
  /**
6840
6607
  * Beneficial owners of the business. At least one required.
6841
6608
  */
6842
6609
  beneficial_owners: Array<
6843
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
6844
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
6610
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
6611
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
6845
6612
  >;
6846
6613
 
6847
6614
  /**
6848
6615
  * Individual with primary responsibility for controlling, managing, or directing
6849
- * the business.
6616
+ * the business. Follows the same US / non-US split as `beneficiary_data`, based on
6617
+ * the control person's own `country_of_citizenship`.
6850
6618
  */
6851
6619
  control_person:
6852
- | BusinessBeneficiaryDataResponse.UnionMember0
6853
- | BusinessBeneficiaryDataResponse.UnionMember1;
6620
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
6621
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
6854
6622
 
6855
6623
  /**
6856
6624
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -7118,26 +6886,30 @@ export namespace AccountHolderClosedWebhookEvent {
7118
6886
  legal_business_name: string;
7119
6887
 
7120
6888
  /**
7121
- * Physical operating address of the business.
6889
+ * Physical operating address of the business. **US address** requires
6890
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
6891
+ * other country and allows `state` to be null.
7122
6892
  */
7123
6893
  physical_address:
7124
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7125
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6894
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
6895
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7126
6896
 
7127
6897
  /**
7128
- * Registered legal address of the business.
6898
+ * Registered legal address of the business. **US address** requires
6899
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
6900
+ * other country and allows `state` to be null.
7129
6901
  */
7130
6902
  registered_address:
7131
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7132
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6903
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
6904
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7133
6905
 
7134
6906
  /**
7135
6907
  * Business registration number: type "ein" (Employer Identification Number, format
7136
6908
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
7137
6909
  */
7138
6910
  registration_number:
7139
- | BusinessBeneficiaryDataResponse.EinIdentification
7140
- | BusinessBeneficiaryDataResponse.SsnIdentification;
6911
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
6912
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
7141
6913
 
7142
6914
  /**
7143
6915
  * State or subdivision where the business is incorporated.
@@ -7150,8 +6922,8 @@ export namespace AccountHolderClosedWebhookEvent {
7150
6922
  year_of_incorporation: number;
7151
6923
  }
7152
6924
 
7153
- export namespace BusinessBeneficiaryDataResponse {
7154
- export interface UsBeneficiaryDataResponse {
6925
+ export namespace V1BusinessBeneficiaryDataResponse {
6926
+ export interface V1UsBeneficiaryDataResponse {
7155
6927
  /**
7156
6928
  * ISO 3166-1 alpha-2 country code of citizenship.
7157
6929
  */
@@ -7167,8 +6939,8 @@ export namespace AccountHolderClosedWebhookEvent {
7167
6939
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
7168
6940
  */
7169
6941
  identification:
7170
- | UsBeneficiaryDataResponse.SsnIdentification
7171
- | UsBeneficiaryDataResponse.ItinIdentification;
6942
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
6943
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
7172
6944
 
7173
6945
  /**
7174
6946
  * Full legal name of the account holder.
@@ -7176,68 +6948,70 @@ export namespace AccountHolderClosedWebhookEvent {
7176
6948
  legal_name: string;
7177
6949
 
7178
6950
  /**
7179
- * Residential address of the account holder.
6951
+ * Residential address of the account holder. **US address** requires
6952
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
6953
+ * other country and allows `state` to be null.
7180
6954
  */
7181
6955
  residential_address:
7182
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
7183
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6956
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
6957
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7184
6958
  }
7185
6959
 
7186
- export namespace UsBeneficiaryDataResponse {
7187
- export interface SsnIdentification {
6960
+ export namespace V1UsBeneficiaryDataResponse {
6961
+ export interface V1SsnIdentification {
7188
6962
  type: 'ssn';
7189
6963
 
7190
6964
  value: string;
7191
6965
  }
7192
6966
 
7193
- export interface ItinIdentification {
6967
+ export interface V1ItinIdentification {
7194
6968
  type: 'itin';
7195
6969
 
7196
6970
  value: string;
7197
6971
  }
7198
6972
 
7199
- export interface UsResidentialAddressResponse {
6973
+ export interface V1UsResidentialAddress {
7200
6974
  /**
7201
- * City name.
6975
+ * City or locality.
7202
6976
  */
7203
6977
  city: string;
7204
6978
 
7205
6979
  /**
7206
6980
  * ISO 3166-1 alpha-2 country code.
7207
6981
  */
7208
- country: 'US';
6982
+ country_code: 'US';
7209
6983
 
7210
6984
  /**
7211
- * Postal or ZIP code.
6985
+ * Primary street address.
7212
6986
  */
7213
- postal_code: string;
6987
+ line_1: string;
7214
6988
 
7215
6989
  /**
7216
- * Two-letter state code.
6990
+ * Secondary street address, or null if not recorded.
7217
6991
  */
7218
- state: string;
6992
+ line_2: string | null;
7219
6993
 
7220
6994
  /**
7221
- * Primary street address.
6995
+ * Postal or ZIP code.
7222
6996
  */
7223
- street_line_1: string;
6997
+ postal_code: string;
7224
6998
 
7225
6999
  /**
7226
- * Secondary street address (apartment, suite, etc.).
7000
+ * State, province, or region.
7227
7001
  */
7228
- street_line_2: string | null;
7002
+ state: string;
7229
7003
  }
7230
7004
 
7231
- export interface NonUsResidentialAddressResponse {
7005
+ export interface V1NonUsResidentialAddress {
7232
7006
  /**
7233
- * City name.
7007
+ * City or locality.
7234
7008
  */
7235
7009
  city: string;
7236
7010
 
7237
7011
  /**
7238
7012
  * ISO 3166-1 alpha-2 country code.
7239
7013
  */
7240
- country:
7014
+ country_code:
7241
7015
  | 'AF'
7242
7016
  | 'AL'
7243
7017
  | 'DZ'
@@ -7489,23 +7263,28 @@ export namespace AccountHolderClosedWebhookEvent {
7489
7263
  | 'XK';
7490
7264
 
7491
7265
  /**
7492
- * Postal or ZIP code.
7266
+ * Primary street address.
7493
7267
  */
7494
- postal_code: string;
7268
+ line_1: string;
7495
7269
 
7496
7270
  /**
7497
- * Primary street address.
7271
+ * Secondary street address, or null if not recorded.
7272
+ */
7273
+ line_2: string | null;
7274
+
7275
+ /**
7276
+ * Postal or ZIP code.
7498
7277
  */
7499
- street_line_1: string;
7278
+ postal_code: string;
7500
7279
 
7501
7280
  /**
7502
- * Secondary street address (apartment, suite, etc.).
7281
+ * State, province, or region, or null if not recorded.
7503
7282
  */
7504
- street_line_2: string | null;
7283
+ state: string | null;
7505
7284
  }
7506
7285
  }
7507
7286
 
7508
- export interface NonUsBeneficiaryDataResponse {
7287
+ export interface V1NonUsBeneficiaryDataResponse {
7509
7288
  /**
7510
7289
  * ISO 3166-1 alpha-2 country code of citizenship.
7511
7290
  */
@@ -7768,7 +7547,7 @@ export namespace AccountHolderClosedWebhookEvent {
7768
7547
  /**
7769
7548
  * Government-issued identification with type: "id" (generic government-issued ID).
7770
7549
  */
7771
- identification: NonUsBeneficiaryDataResponse.Identification;
7550
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
7772
7551
 
7773
7552
  /**
7774
7553
  * Full legal name of the account holder.
@@ -7776,14 +7555,16 @@ export namespace AccountHolderClosedWebhookEvent {
7776
7555
  legal_name: string;
7777
7556
 
7778
7557
  /**
7779
- * Residential address of the account holder.
7558
+ * Residential address of the account holder. **US address** requires
7559
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7560
+ * other country and allows `state` to be null.
7780
7561
  */
7781
7562
  residential_address:
7782
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
7783
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7563
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
7564
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7784
7565
  }
7785
7566
 
7786
- export namespace NonUsBeneficiaryDataResponse {
7567
+ export namespace V1NonUsBeneficiaryDataResponse {
7787
7568
  /**
7788
7569
  * Government-issued identification with type: "id" (generic government-issued ID).
7789
7570
  */
@@ -7793,48 +7574,48 @@ export namespace AccountHolderClosedWebhookEvent {
7793
7574
  value: string;
7794
7575
  }
7795
7576
 
7796
- export interface UsResidentialAddressResponse {
7577
+ export interface V1UsResidentialAddress {
7797
7578
  /**
7798
- * City name.
7579
+ * City or locality.
7799
7580
  */
7800
7581
  city: string;
7801
7582
 
7802
7583
  /**
7803
7584
  * ISO 3166-1 alpha-2 country code.
7804
7585
  */
7805
- country: 'US';
7586
+ country_code: 'US';
7806
7587
 
7807
7588
  /**
7808
- * Postal or ZIP code.
7589
+ * Primary street address.
7809
7590
  */
7810
- postal_code: string;
7591
+ line_1: string;
7811
7592
 
7812
7593
  /**
7813
- * Two-letter state code.
7594
+ * Secondary street address, or null if not recorded.
7814
7595
  */
7815
- state: string;
7596
+ line_2: string | null;
7816
7597
 
7817
7598
  /**
7818
- * Primary street address.
7599
+ * Postal or ZIP code.
7819
7600
  */
7820
- street_line_1: string;
7601
+ postal_code: string;
7821
7602
 
7822
7603
  /**
7823
- * Secondary street address (apartment, suite, etc.).
7604
+ * State, province, or region.
7824
7605
  */
7825
- street_line_2: string | null;
7606
+ state: string;
7826
7607
  }
7827
7608
 
7828
- export interface NonUsResidentialAddressResponse {
7609
+ export interface V1NonUsResidentialAddress {
7829
7610
  /**
7830
- * City name.
7611
+ * City or locality.
7831
7612
  */
7832
7613
  city: string;
7833
7614
 
7834
7615
  /**
7835
7616
  * ISO 3166-1 alpha-2 country code.
7836
7617
  */
7837
- country:
7618
+ country_code:
7838
7619
  | 'AF'
7839
7620
  | 'AL'
7840
7621
  | 'DZ'
@@ -8086,19 +7867,24 @@ export namespace AccountHolderClosedWebhookEvent {
8086
7867
  | 'XK';
8087
7868
 
8088
7869
  /**
8089
- * Postal or ZIP code.
7870
+ * Primary street address.
8090
7871
  */
8091
- postal_code: string;
7872
+ line_1: string;
8092
7873
 
8093
7874
  /**
8094
- * Primary street address.
7875
+ * Secondary street address, or null if not recorded.
7876
+ */
7877
+ line_2: string | null;
7878
+
7879
+ /**
7880
+ * Postal or ZIP code.
8095
7881
  */
8096
- street_line_1: string;
7882
+ postal_code: string;
8097
7883
 
8098
7884
  /**
8099
- * Secondary street address (apartment, suite, etc.).
7885
+ * State, province, or region, or null if not recorded.
8100
7886
  */
8101
- street_line_2: string | null;
7887
+ state: string | null;
8102
7888
  }
8103
7889
  }
8104
7890
 
@@ -8117,7 +7903,7 @@ export namespace AccountHolderClosedWebhookEvent {
8117
7903
  * Government-issued identification with type: "ssn" (Social Security Number,
8118
7904
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
8119
7905
  */
8120
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
7906
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
8121
7907
 
8122
7908
  /**
8123
7909
  * Full legal name of the account holder.
@@ -8125,11 +7911,11 @@ export namespace AccountHolderClosedWebhookEvent {
8125
7911
  legal_name: string;
8126
7912
 
8127
7913
  /**
8128
- * Residential address of the account holder.
7914
+ * Residential address of the account holder. **US address** requires
7915
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7916
+ * other country and allows `state` to be null.
8129
7917
  */
8130
- residential_address:
8131
- | UnionMember0.UsResidentialAddressResponse
8132
- | UnionMember0.NonUsResidentialAddressResponse;
7918
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
8133
7919
 
8134
7920
  /**
8135
7921
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8139,60 +7925,60 @@ export namespace AccountHolderClosedWebhookEvent {
8139
7925
  }
8140
7926
 
8141
7927
  export namespace UnionMember0 {
8142
- export interface SsnIdentification {
7928
+ export interface V1SsnIdentification {
8143
7929
  type: 'ssn';
8144
7930
 
8145
7931
  value: string;
8146
7932
  }
8147
7933
 
8148
- export interface ItinIdentification {
7934
+ export interface V1ItinIdentification {
8149
7935
  type: 'itin';
8150
7936
 
8151
7937
  value: string;
8152
7938
  }
8153
7939
 
8154
- export interface UsResidentialAddressResponse {
7940
+ export interface V1UsResidentialAddress {
8155
7941
  /**
8156
- * City name.
7942
+ * City or locality.
8157
7943
  */
8158
7944
  city: string;
8159
7945
 
8160
7946
  /**
8161
7947
  * ISO 3166-1 alpha-2 country code.
8162
7948
  */
8163
- country: 'US';
7949
+ country_code: 'US';
8164
7950
 
8165
7951
  /**
8166
- * Postal or ZIP code.
7952
+ * Primary street address.
8167
7953
  */
8168
- postal_code: string;
7954
+ line_1: string;
8169
7955
 
8170
7956
  /**
8171
- * Two-letter state code.
7957
+ * Secondary street address, or null if not recorded.
8172
7958
  */
8173
- state: string;
7959
+ line_2: string | null;
8174
7960
 
8175
7961
  /**
8176
- * Primary street address.
7962
+ * Postal or ZIP code.
8177
7963
  */
8178
- street_line_1: string;
7964
+ postal_code: string;
8179
7965
 
8180
7966
  /**
8181
- * Secondary street address (apartment, suite, etc.).
7967
+ * State, province, or region.
8182
7968
  */
8183
- street_line_2: string | null;
7969
+ state: string;
8184
7970
  }
8185
7971
 
8186
- export interface NonUsResidentialAddressResponse {
7972
+ export interface V1NonUsResidentialAddress {
8187
7973
  /**
8188
- * City name.
7974
+ * City or locality.
8189
7975
  */
8190
7976
  city: string;
8191
7977
 
8192
7978
  /**
8193
7979
  * ISO 3166-1 alpha-2 country code.
8194
7980
  */
8195
- country:
7981
+ country_code:
8196
7982
  | 'AF'
8197
7983
  | 'AL'
8198
7984
  | 'DZ'
@@ -8444,19 +8230,24 @@ export namespace AccountHolderClosedWebhookEvent {
8444
8230
  | 'XK';
8445
8231
 
8446
8232
  /**
8447
- * Postal or ZIP code.
8233
+ * Primary street address.
8448
8234
  */
8449
- postal_code: string;
8235
+ line_1: string;
8450
8236
 
8451
8237
  /**
8452
- * Primary street address.
8238
+ * Secondary street address, or null if not recorded.
8239
+ */
8240
+ line_2: string | null;
8241
+
8242
+ /**
8243
+ * Postal or ZIP code.
8453
8244
  */
8454
- street_line_1: string;
8245
+ postal_code: string;
8455
8246
 
8456
8247
  /**
8457
- * Secondary street address (apartment, suite, etc.).
8248
+ * State, province, or region, or null if not recorded.
8458
8249
  */
8459
- street_line_2: string | null;
8250
+ state: string | null;
8460
8251
  }
8461
8252
  }
8462
8253
 
@@ -8731,11 +8522,11 @@ export namespace AccountHolderClosedWebhookEvent {
8731
8522
  legal_name: string;
8732
8523
 
8733
8524
  /**
8734
- * Residential address of the account holder.
8525
+ * Residential address of the account holder. **US address** requires
8526
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
8527
+ * other country and allows `state` to be null.
8735
8528
  */
8736
- residential_address:
8737
- | UnionMember1.UsResidentialAddressResponse
8738
- | UnionMember1.NonUsResidentialAddressResponse;
8529
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
8739
8530
 
8740
8531
  /**
8741
8532
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8754,48 +8545,48 @@ export namespace AccountHolderClosedWebhookEvent {
8754
8545
  value: string;
8755
8546
  }
8756
8547
 
8757
- export interface UsResidentialAddressResponse {
8548
+ export interface V1UsResidentialAddress {
8758
8549
  /**
8759
- * City name.
8550
+ * City or locality.
8760
8551
  */
8761
8552
  city: string;
8762
8553
 
8763
8554
  /**
8764
8555
  * ISO 3166-1 alpha-2 country code.
8765
8556
  */
8766
- country: 'US';
8557
+ country_code: 'US';
8767
8558
 
8768
8559
  /**
8769
- * Postal or ZIP code.
8560
+ * Primary street address.
8770
8561
  */
8771
- postal_code: string;
8562
+ line_1: string;
8772
8563
 
8773
8564
  /**
8774
- * Two-letter state code.
8565
+ * Secondary street address, or null if not recorded.
8775
8566
  */
8776
- state: string;
8567
+ line_2: string | null;
8777
8568
 
8778
8569
  /**
8779
- * Primary street address.
8570
+ * Postal or ZIP code.
8780
8571
  */
8781
- street_line_1: string;
8572
+ postal_code: string;
8782
8573
 
8783
8574
  /**
8784
- * Secondary street address (apartment, suite, etc.).
8575
+ * State, province, or region.
8785
8576
  */
8786
- street_line_2: string | null;
8577
+ state: string;
8787
8578
  }
8788
8579
 
8789
- export interface NonUsResidentialAddressResponse {
8580
+ export interface V1NonUsResidentialAddress {
8790
8581
  /**
8791
- * City name.
8582
+ * City or locality.
8792
8583
  */
8793
8584
  city: string;
8794
8585
 
8795
8586
  /**
8796
8587
  * ISO 3166-1 alpha-2 country code.
8797
8588
  */
8798
- country:
8589
+ country_code:
8799
8590
  | 'AF'
8800
8591
  | 'AL'
8801
8592
  | 'DZ'
@@ -9047,64 +8838,69 @@ export namespace AccountHolderClosedWebhookEvent {
9047
8838
  | 'XK';
9048
8839
 
9049
8840
  /**
9050
- * Postal or ZIP code.
8841
+ * Primary street address.
9051
8842
  */
9052
- postal_code: string;
8843
+ line_1: string;
9053
8844
 
9054
8845
  /**
9055
- * Primary street address.
8846
+ * Secondary street address, or null if not recorded.
8847
+ */
8848
+ line_2: string | null;
8849
+
8850
+ /**
8851
+ * Postal or ZIP code.
9056
8852
  */
9057
- street_line_1: string;
8853
+ postal_code: string;
9058
8854
 
9059
8855
  /**
9060
- * Secondary street address (apartment, suite, etc.).
8856
+ * State, province, or region, or null if not recorded.
9061
8857
  */
9062
- street_line_2: string | null;
8858
+ state: string | null;
9063
8859
  }
9064
8860
  }
9065
8861
 
9066
- export interface UsResidentialAddressResponse {
8862
+ export interface V1UsResidentialAddress {
9067
8863
  /**
9068
- * City name.
8864
+ * City or locality.
9069
8865
  */
9070
8866
  city: string;
9071
8867
 
9072
8868
  /**
9073
8869
  * ISO 3166-1 alpha-2 country code.
9074
8870
  */
9075
- country: 'US';
8871
+ country_code: 'US';
9076
8872
 
9077
8873
  /**
9078
- * Postal or ZIP code.
8874
+ * Primary street address.
9079
8875
  */
9080
- postal_code: string;
8876
+ line_1: string;
9081
8877
 
9082
8878
  /**
9083
- * Two-letter state code.
8879
+ * Secondary street address, or null if not recorded.
9084
8880
  */
9085
- state: string;
8881
+ line_2: string | null;
9086
8882
 
9087
8883
  /**
9088
- * Primary street address.
8884
+ * Postal or ZIP code.
9089
8885
  */
9090
- street_line_1: string;
8886
+ postal_code: string;
9091
8887
 
9092
8888
  /**
9093
- * Secondary street address (apartment, suite, etc.).
8889
+ * State, province, or region.
9094
8890
  */
9095
- street_line_2: string | null;
8891
+ state: string;
9096
8892
  }
9097
8893
 
9098
- export interface NonUsResidentialAddressResponse {
8894
+ export interface V1NonUsResidentialAddress {
9099
8895
  /**
9100
- * City name.
8896
+ * City or locality.
9101
8897
  */
9102
8898
  city: string;
9103
8899
 
9104
8900
  /**
9105
8901
  * ISO 3166-1 alpha-2 country code.
9106
8902
  */
9107
- country:
8903
+ country_code:
9108
8904
  | 'AF'
9109
8905
  | 'AL'
9110
8906
  | 'DZ'
@@ -9356,63 +9152,68 @@ export namespace AccountHolderClosedWebhookEvent {
9356
9152
  | 'XK';
9357
9153
 
9358
9154
  /**
9359
- * Postal or ZIP code.
9155
+ * Primary street address.
9360
9156
  */
9361
- postal_code: string;
9157
+ line_1: string;
9362
9158
 
9363
9159
  /**
9364
- * Primary street address.
9160
+ * Secondary street address, or null if not recorded.
9161
+ */
9162
+ line_2: string | null;
9163
+
9164
+ /**
9165
+ * Postal or ZIP code.
9365
9166
  */
9366
- street_line_1: string;
9167
+ postal_code: string;
9367
9168
 
9368
9169
  /**
9369
- * Secondary street address (apartment, suite, etc.).
9170
+ * State, province, or region, or null if not recorded.
9370
9171
  */
9371
- street_line_2: string | null;
9172
+ state: string | null;
9372
9173
  }
9373
9174
 
9374
- export interface UsResidentialAddressResponse {
9175
+ export interface V1UsResidentialAddress {
9375
9176
  /**
9376
- * City name.
9177
+ * City or locality.
9377
9178
  */
9378
9179
  city: string;
9379
9180
 
9380
9181
  /**
9381
9182
  * ISO 3166-1 alpha-2 country code.
9382
9183
  */
9383
- country: 'US';
9184
+ country_code: 'US';
9384
9185
 
9385
9186
  /**
9386
- * Postal or ZIP code.
9187
+ * Primary street address.
9387
9188
  */
9388
- postal_code: string;
9189
+ line_1: string;
9389
9190
 
9390
9191
  /**
9391
- * Two-letter state code.
9192
+ * Secondary street address, or null if not recorded.
9392
9193
  */
9393
- state: string;
9194
+ line_2: string | null;
9394
9195
 
9395
9196
  /**
9396
- * Primary street address.
9197
+ * Postal or ZIP code.
9397
9198
  */
9398
- street_line_1: string;
9199
+ postal_code: string;
9399
9200
 
9400
9201
  /**
9401
- * Secondary street address (apartment, suite, etc.).
9202
+ * State, province, or region.
9402
9203
  */
9403
- street_line_2: string | null;
9204
+ state: string;
9404
9205
  }
9405
9206
 
9406
- export interface NonUsResidentialAddressResponse {
9207
+ export interface V1NonUsResidentialAddress {
9407
9208
  /**
9408
- * City name.
9209
+ * City or locality.
9409
9210
  */
9410
9211
  city: string;
9411
9212
 
9412
9213
  /**
9413
9214
  * ISO 3166-1 alpha-2 country code.
9414
9215
  */
9415
- country:
9216
+ country_code:
9416
9217
  | 'AF'
9417
9218
  | 'AL'
9418
9219
  | 'DZ'
@@ -9664,28 +9465,33 @@ export namespace AccountHolderClosedWebhookEvent {
9664
9465
  | 'XK';
9665
9466
 
9666
9467
  /**
9667
- * Postal or ZIP code.
9468
+ * Primary street address.
9668
9469
  */
9669
- postal_code: string;
9470
+ line_1: string;
9670
9471
 
9671
9472
  /**
9672
- * Primary street address.
9473
+ * Secondary street address, or null if not recorded.
9474
+ */
9475
+ line_2: string | null;
9476
+
9477
+ /**
9478
+ * Postal or ZIP code.
9673
9479
  */
9674
- street_line_1: string;
9480
+ postal_code: string;
9675
9481
 
9676
9482
  /**
9677
- * Secondary street address (apartment, suite, etc.).
9483
+ * State, province, or region, or null if not recorded.
9678
9484
  */
9679
- street_line_2: string | null;
9485
+ state: string | null;
9680
9486
  }
9681
9487
 
9682
- export interface EinIdentification {
9488
+ export interface V1EinIdentification {
9683
9489
  type: 'ein';
9684
9490
 
9685
9491
  value: string;
9686
9492
  }
9687
9493
 
9688
- export interface SsnIdentification {
9494
+ export interface V1SsnIdentification {
9689
9495
  type: 'ssn';
9690
9496
 
9691
9497
  value: string;