@augustusbank/typescript-sdk 0.20.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 +28 -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 -1126
  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,30 +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: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
81
+ failure: Payload.Failure | null;
77
82
 
78
83
  /**
79
- * Failure details when status is failed, otherwise null.
84
+ * ISO 8601 UTC timestamp when the payout was initiated.
80
85
  */
81
- failure: Payload.Failure | null;
86
+ initiated_at: string;
82
87
 
83
88
  /**
84
89
  * Key-value pairs stored with the payout.
@@ -86,19 +91,47 @@ export namespace PayoutCreatedWebhookEvent {
86
91
  metadata: { [key: string]: string };
87
92
 
88
93
  /**
89
- * Payment reference.
94
+ * Payment scheme or blockchain used for the payout, or null when unknown.
90
95
  */
91
- 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;
92
114
 
93
115
  /**
94
- * ID of the account that was debited.
116
+ * ISO 8601 UTC timestamp when the payout was sent.
95
117
  */
96
- source_account_id: string;
118
+ sent_at: string | null;
97
119
 
98
120
  /**
99
121
  * Current status of the payout.
100
122
  */
101
- 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;
102
135
 
103
136
  /**
104
137
  * Resource type discriminator.
@@ -106,103 +139,13 @@ export namespace PayoutCreatedWebhookEvent {
106
139
  type: 'payout';
107
140
 
108
141
  /**
109
- * 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.
110
144
  */
111
- updated_at: string;
145
+ unstructured_remittance_information: string | null;
112
146
  }
113
147
 
114
148
  export namespace Payload {
115
- export interface UnionMember0 {
116
- /**
117
- * Name of the account holder.
118
- */
119
- account_holder_name: string;
120
-
121
- /**
122
- * Bank Identifier Code, or null if not provided.
123
- */
124
- bic: string | null;
125
-
126
- /**
127
- * International Bank Account Number.
128
- */
129
- iban: string;
130
-
131
- /**
132
- * Discriminator for IBAN financial address.
133
- */
134
- type: 'iban';
135
- }
136
-
137
- export interface UnionMember1 {
138
- /**
139
- * Name of the account holder.
140
- */
141
- account_holder_name: string;
142
-
143
- /**
144
- * UK account number (8 digits).
145
- */
146
- account_number: string;
147
-
148
- /**
149
- * UK sort code (6 digits).
150
- */
151
- sort_code: string;
152
-
153
- /**
154
- * Discriminator for UK sort code financial address.
155
- */
156
- type: 'sort_code';
157
- }
158
-
159
- export interface UnionMember2 {
160
- /**
161
- * Name of the account holder.
162
- */
163
- account_holder_name: string;
164
-
165
- /**
166
- * Bank account number.
167
- */
168
- account_number: string;
169
-
170
- /**
171
- * ABA routing number (9 digits).
172
- */
173
- routing_number: string;
174
-
175
- /**
176
- * Discriminator for ABA wire financial address.
177
- */
178
- type: 'aba';
179
- }
180
-
181
- export interface UnionMember3 {
182
- /**
183
- * Wallet address on the specified blockchain.
184
- */
185
- address: string;
186
-
187
- /**
188
- * Blockchain network for the crypto wallet.
189
- */
190
- blockchain:
191
- | 'bitcoin'
192
- | 'ethereum'
193
- | 'solana'
194
- | 'polygon'
195
- | 'bitcoin_testnet4'
196
- | 'ethereum_sepolia'
197
- | 'solana_devnet'
198
- | 'polygon_amoy';
199
-
200
- /**
201
- * Discriminator for crypto wallet financial address.
202
- */
203
- type: 'crypto_wallet';
204
- }
205
-
206
149
  /**
207
150
  * Failure details when status is failed, otherwise null.
208
151
  */
@@ -215,6 +158,7 @@ export namespace PayoutCreatedWebhookEvent {
215
158
  | 'account_blocked'
216
159
  | 'insufficient_funds'
217
160
  | 'invalid_account_format'
161
+ | 'invalid_routing_number'
218
162
  | 'invalid_instruction'
219
163
  | 'invalid_amount'
220
164
  | 'invalid_time'
@@ -276,30 +220,35 @@ export namespace PayoutInitiatedWebhookEvent {
276
220
  */
277
221
  id: string;
278
222
 
223
+ /**
224
+ * ID of the account that was debited.
225
+ */
226
+ account_id: string;
227
+
279
228
  /**
280
229
  * Amount as a string decimal (e.g. "100.50").
281
230
  */
282
231
  amount: string;
283
232
 
284
233
  /**
285
- * ISO 8601 UTC timestamp when the payout was created.
234
+ * ID of the counterparty that receives the money.
286
235
  */
287
- created_at: string;
236
+ counterparty_id: string;
288
237
 
289
238
  /**
290
- * Currency code (ISO 4217 currency code or crypto currency code).
239
+ * Currency code (ISO 4217 or crypto).
291
240
  */
292
241
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
293
242
 
294
243
  /**
295
- * Bank account or crypto wallet the payout was sent to.
244
+ * Failure details when status is failed, otherwise null.
296
245
  */
297
- destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
246
+ failure: Payload.Failure | null;
298
247
 
299
248
  /**
300
- * Failure details when status is failed, otherwise null.
249
+ * ISO 8601 UTC timestamp when the payout was initiated.
301
250
  */
302
- failure: Payload.Failure | null;
251
+ initiated_at: string;
303
252
 
304
253
  /**
305
254
  * Key-value pairs stored with the payout.
@@ -307,19 +256,47 @@ export namespace PayoutInitiatedWebhookEvent {
307
256
  metadata: { [key: string]: string };
308
257
 
309
258
  /**
310
- * Payment reference.
259
+ * Payment scheme or blockchain used for the payout, or null when unknown.
311
260
  */
312
- 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;
313
279
 
314
280
  /**
315
- * ID of the account that was debited.
281
+ * ISO 8601 UTC timestamp when the payout was sent.
316
282
  */
317
- source_account_id: string;
283
+ sent_at: string | null;
318
284
 
319
285
  /**
320
286
  * Current status of the payout.
321
287
  */
322
- 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;
323
300
 
324
301
  /**
325
302
  * Resource type discriminator.
@@ -327,103 +304,13 @@ export namespace PayoutInitiatedWebhookEvent {
327
304
  type: 'payout';
328
305
 
329
306
  /**
330
- * 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.
331
309
  */
332
- updated_at: string;
310
+ unstructured_remittance_information: string | null;
333
311
  }
334
312
 
335
313
  export namespace Payload {
336
- export interface UnionMember0 {
337
- /**
338
- * Name of the account holder.
339
- */
340
- account_holder_name: string;
341
-
342
- /**
343
- * Bank Identifier Code, or null if not provided.
344
- */
345
- bic: string | null;
346
-
347
- /**
348
- * International Bank Account Number.
349
- */
350
- iban: string;
351
-
352
- /**
353
- * Discriminator for IBAN financial address.
354
- */
355
- type: 'iban';
356
- }
357
-
358
- export interface UnionMember1 {
359
- /**
360
- * Name of the account holder.
361
- */
362
- account_holder_name: string;
363
-
364
- /**
365
- * UK account number (8 digits).
366
- */
367
- account_number: string;
368
-
369
- /**
370
- * UK sort code (6 digits).
371
- */
372
- sort_code: string;
373
-
374
- /**
375
- * Discriminator for UK sort code financial address.
376
- */
377
- type: 'sort_code';
378
- }
379
-
380
- export interface UnionMember2 {
381
- /**
382
- * Name of the account holder.
383
- */
384
- account_holder_name: string;
385
-
386
- /**
387
- * Bank account number.
388
- */
389
- account_number: string;
390
-
391
- /**
392
- * ABA routing number (9 digits).
393
- */
394
- routing_number: string;
395
-
396
- /**
397
- * Discriminator for ABA wire financial address.
398
- */
399
- type: 'aba';
400
- }
401
-
402
- export interface UnionMember3 {
403
- /**
404
- * Wallet address on the specified blockchain.
405
- */
406
- address: string;
407
-
408
- /**
409
- * Blockchain network for the crypto wallet.
410
- */
411
- blockchain:
412
- | 'bitcoin'
413
- | 'ethereum'
414
- | 'solana'
415
- | 'polygon'
416
- | 'bitcoin_testnet4'
417
- | 'ethereum_sepolia'
418
- | 'solana_devnet'
419
- | 'polygon_amoy';
420
-
421
- /**
422
- * Discriminator for crypto wallet financial address.
423
- */
424
- type: 'crypto_wallet';
425
- }
426
-
427
314
  /**
428
315
  * Failure details when status is failed, otherwise null.
429
316
  */
@@ -436,6 +323,7 @@ export namespace PayoutInitiatedWebhookEvent {
436
323
  | 'account_blocked'
437
324
  | 'insufficient_funds'
438
325
  | 'invalid_account_format'
326
+ | 'invalid_routing_number'
439
327
  | 'invalid_instruction'
440
328
  | 'invalid_amount'
441
329
  | 'invalid_time'
@@ -497,30 +385,35 @@ export namespace PayoutPaidWebhookEvent {
497
385
  */
498
386
  id: string;
499
387
 
388
+ /**
389
+ * ID of the account that was debited.
390
+ */
391
+ account_id: string;
392
+
500
393
  /**
501
394
  * Amount as a string decimal (e.g. "100.50").
502
395
  */
503
396
  amount: string;
504
397
 
505
398
  /**
506
- * ISO 8601 UTC timestamp when the payout was created.
399
+ * ID of the counterparty that receives the money.
507
400
  */
508
- created_at: string;
401
+ counterparty_id: string;
509
402
 
510
403
  /**
511
- * Currency code (ISO 4217 currency code or crypto currency code).
404
+ * Currency code (ISO 4217 or crypto).
512
405
  */
513
406
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
514
407
 
515
408
  /**
516
- * Bank account or crypto wallet the payout was sent to.
409
+ * Failure details when status is failed, otherwise null.
517
410
  */
518
- destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
411
+ failure: Payload.Failure | null;
519
412
 
520
413
  /**
521
- * Failure details when status is failed, otherwise null.
414
+ * ISO 8601 UTC timestamp when the payout was initiated.
522
415
  */
523
- failure: Payload.Failure | null;
416
+ initiated_at: string;
524
417
 
525
418
  /**
526
419
  * Key-value pairs stored with the payout.
@@ -528,19 +421,47 @@ export namespace PayoutPaidWebhookEvent {
528
421
  metadata: { [key: string]: string };
529
422
 
530
423
  /**
531
- * Payment reference.
424
+ * Payment scheme or blockchain used for the payout, or null when unknown.
532
425
  */
533
- 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;
534
444
 
535
445
  /**
536
- * ID of the account that was debited.
446
+ * ISO 8601 UTC timestamp when the payout was sent.
537
447
  */
538
- source_account_id: string;
448
+ sent_at: string | null;
539
449
 
540
450
  /**
541
451
  * Current status of the payout.
542
452
  */
543
- 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;
544
465
 
545
466
  /**
546
467
  * Resource type discriminator.
@@ -548,103 +469,13 @@ export namespace PayoutPaidWebhookEvent {
548
469
  type: 'payout';
549
470
 
550
471
  /**
551
- * 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.
552
474
  */
553
- updated_at: string;
475
+ unstructured_remittance_information: string | null;
554
476
  }
555
477
 
556
478
  export namespace Payload {
557
- export interface UnionMember0 {
558
- /**
559
- * Name of the account holder.
560
- */
561
- account_holder_name: string;
562
-
563
- /**
564
- * Bank Identifier Code, or null if not provided.
565
- */
566
- bic: string | null;
567
-
568
- /**
569
- * International Bank Account Number.
570
- */
571
- iban: string;
572
-
573
- /**
574
- * Discriminator for IBAN financial address.
575
- */
576
- type: 'iban';
577
- }
578
-
579
- export interface UnionMember1 {
580
- /**
581
- * Name of the account holder.
582
- */
583
- account_holder_name: string;
584
-
585
- /**
586
- * UK account number (8 digits).
587
- */
588
- account_number: string;
589
-
590
- /**
591
- * UK sort code (6 digits).
592
- */
593
- sort_code: string;
594
-
595
- /**
596
- * Discriminator for UK sort code financial address.
597
- */
598
- type: 'sort_code';
599
- }
600
-
601
- export interface UnionMember2 {
602
- /**
603
- * Name of the account holder.
604
- */
605
- account_holder_name: string;
606
-
607
- /**
608
- * Bank account number.
609
- */
610
- account_number: string;
611
-
612
- /**
613
- * ABA routing number (9 digits).
614
- */
615
- routing_number: string;
616
-
617
- /**
618
- * Discriminator for ABA wire financial address.
619
- */
620
- type: 'aba';
621
- }
622
-
623
- export interface UnionMember3 {
624
- /**
625
- * Wallet address on the specified blockchain.
626
- */
627
- address: string;
628
-
629
- /**
630
- * Blockchain network for the crypto wallet.
631
- */
632
- blockchain:
633
- | 'bitcoin'
634
- | 'ethereum'
635
- | 'solana'
636
- | 'polygon'
637
- | 'bitcoin_testnet4'
638
- | 'ethereum_sepolia'
639
- | 'solana_devnet'
640
- | 'polygon_amoy';
641
-
642
- /**
643
- * Discriminator for crypto wallet financial address.
644
- */
645
- type: 'crypto_wallet';
646
- }
647
-
648
479
  /**
649
480
  * Failure details when status is failed, otherwise null.
650
481
  */
@@ -657,6 +488,7 @@ export namespace PayoutPaidWebhookEvent {
657
488
  | 'account_blocked'
658
489
  | 'insufficient_funds'
659
490
  | 'invalid_account_format'
491
+ | 'invalid_routing_number'
660
492
  | 'invalid_instruction'
661
493
  | 'invalid_amount'
662
494
  | 'invalid_time'
@@ -718,30 +550,35 @@ export namespace PayoutFailedWebhookEvent {
718
550
  */
719
551
  id: string;
720
552
 
553
+ /**
554
+ * ID of the account that was debited.
555
+ */
556
+ account_id: string;
557
+
721
558
  /**
722
559
  * Amount as a string decimal (e.g. "100.50").
723
560
  */
724
561
  amount: string;
725
562
 
726
563
  /**
727
- * ISO 8601 UTC timestamp when the payout was created.
564
+ * ID of the counterparty that receives the money.
728
565
  */
729
- created_at: string;
566
+ counterparty_id: string;
730
567
 
731
568
  /**
732
- * Currency code (ISO 4217 currency code or crypto currency code).
569
+ * Currency code (ISO 4217 or crypto).
733
570
  */
734
571
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
735
572
 
736
573
  /**
737
- * Bank account or crypto wallet the payout was sent to.
574
+ * Failure details when status is failed, otherwise null.
738
575
  */
739
- destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
576
+ failure: Payload.Failure | null;
740
577
 
741
578
  /**
742
- * Failure details when status is failed, otherwise null.
579
+ * ISO 8601 UTC timestamp when the payout was initiated.
743
580
  */
744
- failure: Payload.Failure | null;
581
+ initiated_at: string;
745
582
 
746
583
  /**
747
584
  * Key-value pairs stored with the payout.
@@ -749,19 +586,47 @@ export namespace PayoutFailedWebhookEvent {
749
586
  metadata: { [key: string]: string };
750
587
 
751
588
  /**
752
- * Payment reference.
589
+ * Payment scheme or blockchain used for the payout, or null when unknown.
753
590
  */
754
- 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;
755
609
 
756
610
  /**
757
- * ID of the account that was debited.
611
+ * ISO 8601 UTC timestamp when the payout was sent.
758
612
  */
759
- source_account_id: string;
613
+ sent_at: string | null;
760
614
 
761
615
  /**
762
616
  * Current status of the payout.
763
617
  */
764
- 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;
765
630
 
766
631
  /**
767
632
  * Resource type discriminator.
@@ -769,103 +634,13 @@ export namespace PayoutFailedWebhookEvent {
769
634
  type: 'payout';
770
635
 
771
636
  /**
772
- * 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.
773
639
  */
774
- updated_at: string;
640
+ unstructured_remittance_information: string | null;
775
641
  }
776
642
 
777
643
  export namespace Payload {
778
- export interface UnionMember0 {
779
- /**
780
- * Name of the account holder.
781
- */
782
- account_holder_name: string;
783
-
784
- /**
785
- * Bank Identifier Code, or null if not provided.
786
- */
787
- bic: string | null;
788
-
789
- /**
790
- * International Bank Account Number.
791
- */
792
- iban: string;
793
-
794
- /**
795
- * Discriminator for IBAN financial address.
796
- */
797
- type: 'iban';
798
- }
799
-
800
- export interface UnionMember1 {
801
- /**
802
- * Name of the account holder.
803
- */
804
- account_holder_name: string;
805
-
806
- /**
807
- * UK account number (8 digits).
808
- */
809
- account_number: string;
810
-
811
- /**
812
- * UK sort code (6 digits).
813
- */
814
- sort_code: string;
815
-
816
- /**
817
- * Discriminator for UK sort code financial address.
818
- */
819
- type: 'sort_code';
820
- }
821
-
822
- export interface UnionMember2 {
823
- /**
824
- * Name of the account holder.
825
- */
826
- account_holder_name: string;
827
-
828
- /**
829
- * Bank account number.
830
- */
831
- account_number: string;
832
-
833
- /**
834
- * ABA routing number (9 digits).
835
- */
836
- routing_number: string;
837
-
838
- /**
839
- * Discriminator for ABA wire financial address.
840
- */
841
- type: 'aba';
842
- }
843
-
844
- export interface UnionMember3 {
845
- /**
846
- * Wallet address on the specified blockchain.
847
- */
848
- address: string;
849
-
850
- /**
851
- * Blockchain network for the crypto wallet.
852
- */
853
- blockchain:
854
- | 'bitcoin'
855
- | 'ethereum'
856
- | 'solana'
857
- | 'polygon'
858
- | 'bitcoin_testnet4'
859
- | 'ethereum_sepolia'
860
- | 'solana_devnet'
861
- | 'polygon_amoy';
862
-
863
- /**
864
- * Discriminator for crypto wallet financial address.
865
- */
866
- type: 'crypto_wallet';
867
- }
868
-
869
644
  /**
870
645
  * Failure details when status is failed, otherwise null.
871
646
  */
@@ -878,6 +653,7 @@ export namespace PayoutFailedWebhookEvent {
878
653
  | 'account_blocked'
879
654
  | 'insufficient_funds'
880
655
  | 'invalid_account_format'
656
+ | 'invalid_routing_number'
881
657
  | 'invalid_instruction'
882
658
  | 'invalid_amount'
883
659
  | 'invalid_time'
@@ -945,12 +721,7 @@ export namespace ReturnInitiatedWebhookEvent {
945
721
  amount: string;
946
722
 
947
723
  /**
948
- * ISO 8601 UTC timestamp when the return was created.
949
- */
950
- created_at: string;
951
-
952
- /**
953
- * Currency code (ISO 4217 currency code or crypto currency code).
724
+ * Currency code (ISO 4217 or crypto).
954
725
  */
955
726
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
956
727
 
@@ -960,24 +731,57 @@ export namespace ReturnInitiatedWebhookEvent {
960
731
  deposit_id: string;
961
732
 
962
733
  /**
963
- * 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.
964
767
  */
965
- failure: Payload.Failure | null;
768
+ sent_at: string | null;
966
769
 
967
770
  /**
968
771
  * Current status of the return.
969
772
  */
970
- status: 'pending' | 'paid' | 'failed' | 'returned';
773
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
971
774
 
972
775
  /**
973
- * Type of the resource.
776
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
777
+ * rails support this field.
974
778
  */
975
- type: 'return';
779
+ tx_hash: string | null;
976
780
 
977
781
  /**
978
- * ISO 8601 UTC timestamp when the return was last updated.
782
+ * Resource type discriminator.
979
783
  */
980
- updated_at: string;
784
+ type: 'return';
981
785
  }
982
786
 
983
787
  export namespace Payload {
@@ -993,6 +797,7 @@ export namespace ReturnInitiatedWebhookEvent {
993
797
  | 'account_blocked'
994
798
  | 'insufficient_funds'
995
799
  | 'invalid_account_format'
800
+ | 'invalid_routing_number'
996
801
  | 'invalid_instruction'
997
802
  | 'invalid_amount'
998
803
  | 'invalid_time'
@@ -1060,12 +865,7 @@ export namespace ReturnPaidWebhookEvent {
1060
865
  amount: string;
1061
866
 
1062
867
  /**
1063
- * ISO 8601 UTC timestamp when the return was created.
1064
- */
1065
- created_at: string;
1066
-
1067
- /**
1068
- * Currency code (ISO 4217 currency code or crypto currency code).
868
+ * Currency code (ISO 4217 or crypto).
1069
869
  */
1070
870
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1071
871
 
@@ -1079,20 +879,53 @@ export namespace ReturnPaidWebhookEvent {
1079
879
  */
1080
880
  failure: Payload.Failure | null;
1081
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
+
1082
914
  /**
1083
915
  * Current status of the return.
1084
916
  */
1085
- status: 'pending' | 'paid' | 'failed' | 'returned';
917
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1086
918
 
1087
919
  /**
1088
- * Type of the resource.
920
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
921
+ * rails support this field.
1089
922
  */
1090
- type: 'return';
923
+ tx_hash: string | null;
1091
924
 
1092
925
  /**
1093
- * ISO 8601 UTC timestamp when the return was last updated.
926
+ * Resource type discriminator.
1094
927
  */
1095
- updated_at: string;
928
+ type: 'return';
1096
929
  }
1097
930
 
1098
931
  export namespace Payload {
@@ -1108,6 +941,7 @@ export namespace ReturnPaidWebhookEvent {
1108
941
  | 'account_blocked'
1109
942
  | 'insufficient_funds'
1110
943
  | 'invalid_account_format'
944
+ | 'invalid_routing_number'
1111
945
  | 'invalid_instruction'
1112
946
  | 'invalid_amount'
1113
947
  | 'invalid_time'
@@ -1175,12 +1009,7 @@ export namespace ReturnFailedWebhookEvent {
1175
1009
  amount: string;
1176
1010
 
1177
1011
  /**
1178
- * ISO 8601 UTC timestamp when the return was created.
1179
- */
1180
- created_at: string;
1181
-
1182
- /**
1183
- * Currency code (ISO 4217 currency code or crypto currency code).
1012
+ * Currency code (ISO 4217 or crypto).
1184
1013
  */
1185
1014
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1186
1015
 
@@ -1194,20 +1023,53 @@ export namespace ReturnFailedWebhookEvent {
1194
1023
  */
1195
1024
  failure: Payload.Failure | null;
1196
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
+
1197
1058
  /**
1198
1059
  * Current status of the return.
1199
1060
  */
1200
- status: 'pending' | 'paid' | 'failed' | 'returned';
1061
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1201
1062
 
1202
1063
  /**
1203
- * Type of the resource.
1064
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1065
+ * rails support this field.
1204
1066
  */
1205
- type: 'return';
1067
+ tx_hash: string | null;
1206
1068
 
1207
1069
  /**
1208
- * ISO 8601 UTC timestamp when the return was last updated.
1070
+ * Resource type discriminator.
1209
1071
  */
1210
- updated_at: string;
1072
+ type: 'return';
1211
1073
  }
1212
1074
 
1213
1075
  export namespace Payload {
@@ -1223,6 +1085,7 @@ export namespace ReturnFailedWebhookEvent {
1223
1085
  | 'account_blocked'
1224
1086
  | 'insufficient_funds'
1225
1087
  | 'invalid_account_format'
1088
+ | 'invalid_routing_number'
1226
1089
  | 'invalid_instruction'
1227
1090
  | 'invalid_amount'
1228
1091
  | 'invalid_time'
@@ -1290,12 +1153,7 @@ export namespace ReturnReturnedWebhookEvent {
1290
1153
  amount: string;
1291
1154
 
1292
1155
  /**
1293
- * ISO 8601 UTC timestamp when the return was created.
1294
- */
1295
- created_at: string;
1296
-
1297
- /**
1298
- * Currency code (ISO 4217 currency code or crypto currency code).
1156
+ * Currency code (ISO 4217 or crypto).
1299
1157
  */
1300
1158
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1301
1159
 
@@ -1309,20 +1167,53 @@ export namespace ReturnReturnedWebhookEvent {
1309
1167
  */
1310
1168
  failure: Payload.Failure | null;
1311
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
+
1312
1202
  /**
1313
1203
  * Current status of the return.
1314
1204
  */
1315
- status: 'pending' | 'paid' | 'failed' | 'returned';
1205
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1316
1206
 
1317
1207
  /**
1318
- * Type of the resource.
1208
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1209
+ * rails support this field.
1319
1210
  */
1320
- type: 'return';
1211
+ tx_hash: string | null;
1321
1212
 
1322
1213
  /**
1323
- * ISO 8601 UTC timestamp when the return was last updated.
1214
+ * Resource type discriminator.
1324
1215
  */
1325
- updated_at: string;
1216
+ type: 'return';
1326
1217
  }
1327
1218
 
1328
1219
  export namespace Payload {
@@ -1338,6 +1229,7 @@ export namespace ReturnReturnedWebhookEvent {
1338
1229
  | 'account_blocked'
1339
1230
  | 'insufficient_funds'
1340
1231
  | 'invalid_account_format'
1232
+ | 'invalid_routing_number'
1341
1233
  | 'invalid_instruction'
1342
1234
  | 'invalid_amount'
1343
1235
  | 'invalid_time'
@@ -1400,55 +1292,45 @@ export namespace DepositReceivedWebhookEvent {
1400
1292
  id: string;
1401
1293
 
1402
1294
  /**
1403
- * Amount as a string decimal (e.g. "100.50").
1295
+ * ID of the account that was credited with the deposit.
1404
1296
  */
1405
- amount: string;
1297
+ account_id: string;
1406
1298
 
1407
1299
  /**
1408
- * Reference visible on the bank statement, or null when not applicable.
1300
+ * Amount as a string decimal (e.g. "100.50").
1409
1301
  */
1410
- bank_statement_reference: string | null;
1302
+ amount: string;
1411
1303
 
1412
1304
  /**
1413
- * ISO 8601 UTC timestamp when the deposit was created.
1305
+ * ID of the counterparty that sent the money, or null when not known.
1414
1306
  */
1415
- created_at: string;
1307
+ counterparty_id: string | null;
1416
1308
 
1417
1309
  /**
1418
- * Supported fiat or crypto currency code for the deposit amount.
1310
+ * Currency code (ISO 4217 or crypto).
1419
1311
  */
1420
1312
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1421
1313
 
1422
1314
  /**
1423
- * ID of the merchant account that received the deposit.
1424
- */
1425
- destination_account_id: string;
1426
-
1427
- /**
1428
- * Payment rail or blockchain used for the deposit.
1315
+ * Payment scheme or blockchain used for the deposit, or null when unknown.
1429
1316
  */
1430
1317
  rail:
1318
+ | 'sepa'
1431
1319
  | 'sepa_instant'
1432
1320
  | 'faster_payments'
1433
- | 'sepa'
1434
- | 'elixir'
1435
- | 'express_elixir'
1436
- | 'sek_account_to_account'
1437
- | 'sumclearing'
1438
- | 'straksclearing'
1439
1321
  | 'swift'
1440
1322
  | 'internal'
1441
1323
  | 'target'
1442
1324
  | 'ach'
1443
1325
  | 'fedwire'
1444
- | 'btc'
1445
- | 'btc_testnet4'
1446
- | 'eth'
1447
- | 'eth_sepolia'
1448
- | 'sol'
1449
- | 'sol_devnet'
1450
- | 'matic'
1451
- | 'matic_amoy'
1326
+ | 'bitcoin'
1327
+ | 'bitcoin_testnet4'
1328
+ | 'ethereum'
1329
+ | 'ethereum_sepolia'
1330
+ | 'solana'
1331
+ | 'solana_devnet'
1332
+ | 'polygon'
1333
+ | 'polygon_amoy'
1452
1334
  | null;
1453
1335
 
1454
1336
  /**
@@ -1457,17 +1339,18 @@ export namespace DepositReceivedWebhookEvent {
1457
1339
  returns: Array<string>;
1458
1340
 
1459
1341
  /**
1460
- * Counterparty bank account or crypto wallet that sent the funds.
1342
+ * ISO 8601 UTC timestamp when the deposit was settled.
1461
1343
  */
1462
- source: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
1344
+ settled_at: string;
1463
1345
 
1464
1346
  /**
1465
1347
  * Current status of the deposit.
1466
1348
  */
1467
- status: 'received' | 'in_return' | 'returned' | 'return_failed' | 'return_returned';
1349
+ status: 'settled';
1468
1350
 
1469
1351
  /**
1470
- * 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.
1471
1354
  */
1472
1355
  tx_hash: string | null;
1473
1356
 
@@ -1477,102 +1360,10 @@ export namespace DepositReceivedWebhookEvent {
1477
1360
  type: 'deposit';
1478
1361
 
1479
1362
  /**
1480
- * 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.
1481
1365
  */
1482
- updated_at: string;
1483
- }
1484
-
1485
- export namespace Payload {
1486
- export interface UnionMember0 {
1487
- /**
1488
- * Name of the account holder.
1489
- */
1490
- account_holder_name: string;
1491
-
1492
- /**
1493
- * Bank Identifier Code, or null if not provided.
1494
- */
1495
- bic: string | null;
1496
-
1497
- /**
1498
- * International Bank Account Number.
1499
- */
1500
- iban: string;
1501
-
1502
- /**
1503
- * Discriminator for IBAN source.
1504
- */
1505
- type: 'iban';
1506
- }
1507
-
1508
- export interface UnionMember1 {
1509
- /**
1510
- * Name of the account holder.
1511
- */
1512
- account_holder_name: string;
1513
-
1514
- /**
1515
- * UK account number (8 digits).
1516
- */
1517
- account_number: string;
1518
-
1519
- /**
1520
- * UK sort code (6 digits).
1521
- */
1522
- sort_code: string;
1523
-
1524
- /**
1525
- * Discriminator for UK sort code source.
1526
- */
1527
- type: 'sort_code';
1528
- }
1529
-
1530
- export interface UnionMember2 {
1531
- /**
1532
- * Name of the account holder.
1533
- */
1534
- account_holder_name: string;
1535
-
1536
- /**
1537
- * Bank account number.
1538
- */
1539
- account_number: string;
1540
-
1541
- /**
1542
- * ABA routing number (9 digits).
1543
- */
1544
- routing_number: string;
1545
-
1546
- /**
1547
- * Discriminator for ABA wire source.
1548
- */
1549
- type: 'aba';
1550
- }
1551
-
1552
- export interface UnionMember3 {
1553
- /**
1554
- * Wallet address on the specified blockchain.
1555
- */
1556
- address: string;
1557
-
1558
- /**
1559
- * Blockchain network for the crypto wallet.
1560
- */
1561
- blockchain:
1562
- | 'bitcoin'
1563
- | 'ethereum'
1564
- | 'solana'
1565
- | 'polygon'
1566
- | 'bitcoin_testnet4'
1567
- | 'ethereum_sepolia'
1568
- | 'solana_devnet'
1569
- | 'polygon_amoy';
1570
-
1571
- /**
1572
- * Discriminator for crypto wallet source.
1573
- */
1574
- type: 'crypto_wallet';
1575
- }
1366
+ unstructured_remittance_information: string | null;
1576
1367
  }
1577
1368
  }
1578
1369
 
@@ -1623,36 +1414,21 @@ export namespace ConversionCreatedWebhookEvent {
1623
1414
  */
1624
1415
  created_at: string;
1625
1416
 
1626
- /**
1627
- * Failure details when status is failed, otherwise null.
1628
- */
1629
- failure: Payload.Failure | null;
1630
-
1631
1417
  /**
1632
1418
  * Key-value pairs stored with the conversion.
1633
1419
  */
1634
1420
  metadata: { [key: string]: string };
1635
1421
 
1636
- /**
1637
- * ID of the associated quote, or null.
1638
- */
1639
- quote_id: string | null;
1640
-
1641
1422
  /**
1642
1423
  * ID of the source account, or null.
1643
1424
  */
1644
1425
  source_account_id: string | null;
1645
1426
 
1646
1427
  /**
1647
- * Source amount as a string decimal.
1428
+ * Amount as a string decimal (e.g. "100.50").
1648
1429
  */
1649
1430
  source_amount: string;
1650
1431
 
1651
- /**
1652
- * Source currency code.
1653
- */
1654
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1655
-
1656
1432
  /**
1657
1433
  * Current status of the conversion.
1658
1434
  */
@@ -1664,9 +1440,9 @@ export namespace ConversionCreatedWebhookEvent {
1664
1440
  target_account_id: string | null;
1665
1441
 
1666
1442
  /**
1667
- * Target currency code.
1443
+ * Amount as a string decimal (e.g. "100.50").
1668
1444
  */
1669
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1445
+ target_amount: string;
1670
1446
 
1671
1447
  /**
1672
1448
  * Resource type discriminator.
@@ -1678,18 +1454,6 @@ export namespace ConversionCreatedWebhookEvent {
1678
1454
  */
1679
1455
  updated_at: string;
1680
1456
  }
1681
-
1682
- export namespace Payload {
1683
- /**
1684
- * Failure details when status is failed, otherwise null.
1685
- */
1686
- export interface Failure {
1687
- /**
1688
- * Human-readable description of the failure.
1689
- */
1690
- message: string;
1691
- }
1692
- }
1693
1457
  }
1694
1458
 
1695
1459
  export interface ConversionCompletedWebhookEvent {
@@ -1739,36 +1503,21 @@ export namespace ConversionCompletedWebhookEvent {
1739
1503
  */
1740
1504
  created_at: string;
1741
1505
 
1742
- /**
1743
- * Failure details when status is failed, otherwise null.
1744
- */
1745
- failure: Payload.Failure | null;
1746
-
1747
1506
  /**
1748
1507
  * Key-value pairs stored with the conversion.
1749
1508
  */
1750
1509
  metadata: { [key: string]: string };
1751
1510
 
1752
- /**
1753
- * ID of the associated quote, or null.
1754
- */
1755
- quote_id: string | null;
1756
-
1757
1511
  /**
1758
1512
  * ID of the source account, or null.
1759
1513
  */
1760
1514
  source_account_id: string | null;
1761
1515
 
1762
1516
  /**
1763
- * Source amount as a string decimal.
1517
+ * Amount as a string decimal (e.g. "100.50").
1764
1518
  */
1765
1519
  source_amount: string;
1766
1520
 
1767
- /**
1768
- * Source currency code.
1769
- */
1770
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1771
-
1772
1521
  /**
1773
1522
  * Current status of the conversion.
1774
1523
  */
@@ -1780,9 +1529,9 @@ export namespace ConversionCompletedWebhookEvent {
1780
1529
  target_account_id: string | null;
1781
1530
 
1782
1531
  /**
1783
- * Target currency code.
1532
+ * Amount as a string decimal (e.g. "100.50").
1784
1533
  */
1785
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1534
+ target_amount: string;
1786
1535
 
1787
1536
  /**
1788
1537
  * Resource type discriminator.
@@ -1794,18 +1543,6 @@ export namespace ConversionCompletedWebhookEvent {
1794
1543
  */
1795
1544
  updated_at: string;
1796
1545
  }
1797
-
1798
- export namespace Payload {
1799
- /**
1800
- * Failure details when status is failed, otherwise null.
1801
- */
1802
- export interface Failure {
1803
- /**
1804
- * Human-readable description of the failure.
1805
- */
1806
- message: string;
1807
- }
1808
- }
1809
1546
  }
1810
1547
 
1811
1548
  export interface ConversionFailedWebhookEvent {
@@ -1855,36 +1592,21 @@ export namespace ConversionFailedWebhookEvent {
1855
1592
  */
1856
1593
  created_at: string;
1857
1594
 
1858
- /**
1859
- * Failure details when status is failed, otherwise null.
1860
- */
1861
- failure: Payload.Failure | null;
1862
-
1863
1595
  /**
1864
1596
  * Key-value pairs stored with the conversion.
1865
1597
  */
1866
1598
  metadata: { [key: string]: string };
1867
1599
 
1868
- /**
1869
- * ID of the associated quote, or null.
1870
- */
1871
- quote_id: string | null;
1872
-
1873
1600
  /**
1874
1601
  * ID of the source account, or null.
1875
1602
  */
1876
1603
  source_account_id: string | null;
1877
1604
 
1878
1605
  /**
1879
- * Source amount as a string decimal.
1606
+ * Amount as a string decimal (e.g. "100.50").
1880
1607
  */
1881
1608
  source_amount: string;
1882
1609
 
1883
- /**
1884
- * Source currency code.
1885
- */
1886
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1887
-
1888
1610
  /**
1889
1611
  * Current status of the conversion.
1890
1612
  */
@@ -1896,9 +1618,9 @@ export namespace ConversionFailedWebhookEvent {
1896
1618
  target_account_id: string | null;
1897
1619
 
1898
1620
  /**
1899
- * Target currency code.
1621
+ * Amount as a string decimal (e.g. "100.50").
1900
1622
  */
1901
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1623
+ target_amount: string;
1902
1624
 
1903
1625
  /**
1904
1626
  * Resource type discriminator.
@@ -1910,18 +1632,6 @@ export namespace ConversionFailedWebhookEvent {
1910
1632
  */
1911
1633
  updated_at: string;
1912
1634
  }
1913
-
1914
- export namespace Payload {
1915
- /**
1916
- * Failure details when status is failed, otherwise null.
1917
- */
1918
- export interface Failure {
1919
- /**
1920
- * Human-readable description of the failure.
1921
- */
1922
- message: string;
1923
- }
1924
- }
1925
1635
  }
1926
1636
 
1927
1637
  export interface AccountHolderActiveWebhookEvent {
@@ -1962,12 +1672,15 @@ export namespace AccountHolderActiveWebhookEvent {
1962
1672
  id: string;
1963
1673
 
1964
1674
  /**
1965
- * 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`.
1966
1679
  */
1967
1680
  beneficiary_data:
1968
- | Payload.UsBeneficiaryDataResponse
1969
- | Payload.NonUsBeneficiaryDataResponse
1970
- | Payload.BusinessBeneficiaryDataResponse;
1681
+ | Payload.V1UsBeneficiaryDataResponse
1682
+ | Payload.V1NonUsBeneficiaryDataResponse
1683
+ | Payload.V1BusinessBeneficiaryDataResponse;
1971
1684
 
1972
1685
  /**
1973
1686
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -1991,7 +1704,7 @@ export namespace AccountHolderActiveWebhookEvent {
1991
1704
  }
1992
1705
 
1993
1706
  export namespace Payload {
1994
- export interface UsBeneficiaryDataResponse {
1707
+ export interface V1UsBeneficiaryDataResponse {
1995
1708
  /**
1996
1709
  * ISO 3166-1 alpha-2 country code of citizenship.
1997
1710
  */
@@ -2007,8 +1720,8 @@ export namespace AccountHolderActiveWebhookEvent {
2007
1720
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
2008
1721
  */
2009
1722
  identification:
2010
- | UsBeneficiaryDataResponse.SsnIdentification
2011
- | UsBeneficiaryDataResponse.ItinIdentification;
1723
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
1724
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
2012
1725
 
2013
1726
  /**
2014
1727
  * Full legal name of the account holder.
@@ -2016,68 +1729,70 @@ export namespace AccountHolderActiveWebhookEvent {
2016
1729
  legal_name: string;
2017
1730
 
2018
1731
  /**
2019
- * 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.
2020
1735
  */
2021
1736
  residential_address:
2022
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
2023
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
1737
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
1738
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2024
1739
  }
2025
1740
 
2026
- export namespace UsBeneficiaryDataResponse {
2027
- export interface SsnIdentification {
1741
+ export namespace V1UsBeneficiaryDataResponse {
1742
+ export interface V1SsnIdentification {
2028
1743
  type: 'ssn';
2029
1744
 
2030
1745
  value: string;
2031
1746
  }
2032
1747
 
2033
- export interface ItinIdentification {
1748
+ export interface V1ItinIdentification {
2034
1749
  type: 'itin';
2035
1750
 
2036
1751
  value: string;
2037
1752
  }
2038
1753
 
2039
- export interface UsResidentialAddressResponse {
1754
+ export interface V1UsResidentialAddress {
2040
1755
  /**
2041
- * City name.
1756
+ * City or locality.
2042
1757
  */
2043
1758
  city: string;
2044
1759
 
2045
1760
  /**
2046
1761
  * ISO 3166-1 alpha-2 country code.
2047
1762
  */
2048
- country: 'US';
1763
+ country_code: 'US';
2049
1764
 
2050
1765
  /**
2051
- * Postal or ZIP code.
1766
+ * Primary street address.
2052
1767
  */
2053
- postal_code: string;
1768
+ line_1: string;
2054
1769
 
2055
1770
  /**
2056
- * Two-letter state code.
1771
+ * Secondary street address, or null if not recorded.
2057
1772
  */
2058
- state: string;
1773
+ line_2: string | null;
2059
1774
 
2060
1775
  /**
2061
- * Primary street address.
1776
+ * Postal or ZIP code.
2062
1777
  */
2063
- street_line_1: string;
1778
+ postal_code: string;
2064
1779
 
2065
1780
  /**
2066
- * Secondary street address (apartment, suite, etc.).
1781
+ * State, province, or region.
2067
1782
  */
2068
- street_line_2: string | null;
1783
+ state: string;
2069
1784
  }
2070
1785
 
2071
- export interface NonUsResidentialAddressResponse {
1786
+ export interface V1NonUsResidentialAddress {
2072
1787
  /**
2073
- * City name.
1788
+ * City or locality.
2074
1789
  */
2075
1790
  city: string;
2076
1791
 
2077
1792
  /**
2078
1793
  * ISO 3166-1 alpha-2 country code.
2079
1794
  */
2080
- country:
1795
+ country_code:
2081
1796
  | 'AF'
2082
1797
  | 'AL'
2083
1798
  | 'DZ'
@@ -2329,23 +2044,28 @@ export namespace AccountHolderActiveWebhookEvent {
2329
2044
  | 'XK';
2330
2045
 
2331
2046
  /**
2332
- * Postal or ZIP code.
2047
+ * Primary street address.
2333
2048
  */
2334
- postal_code: string;
2049
+ line_1: string;
2335
2050
 
2336
2051
  /**
2337
- * Primary street address.
2052
+ * Secondary street address, or null if not recorded.
2338
2053
  */
2339
- street_line_1: string;
2054
+ line_2: string | null;
2340
2055
 
2341
2056
  /**
2342
- * 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.
2343
2063
  */
2344
- street_line_2: string | null;
2064
+ state: string | null;
2345
2065
  }
2346
2066
  }
2347
2067
 
2348
- export interface NonUsBeneficiaryDataResponse {
2068
+ export interface V1NonUsBeneficiaryDataResponse {
2349
2069
  /**
2350
2070
  * ISO 3166-1 alpha-2 country code of citizenship.
2351
2071
  */
@@ -2608,7 +2328,7 @@ export namespace AccountHolderActiveWebhookEvent {
2608
2328
  /**
2609
2329
  * Government-issued identification with type: "id" (generic government-issued ID).
2610
2330
  */
2611
- identification: NonUsBeneficiaryDataResponse.Identification;
2331
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
2612
2332
 
2613
2333
  /**
2614
2334
  * Full legal name of the account holder.
@@ -2616,14 +2336,16 @@ export namespace AccountHolderActiveWebhookEvent {
2616
2336
  legal_name: string;
2617
2337
 
2618
2338
  /**
2619
- * 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.
2620
2342
  */
2621
2343
  residential_address:
2622
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
2623
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2344
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
2345
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2624
2346
  }
2625
2347
 
2626
- export namespace NonUsBeneficiaryDataResponse {
2348
+ export namespace V1NonUsBeneficiaryDataResponse {
2627
2349
  /**
2628
2350
  * Government-issued identification with type: "id" (generic government-issued ID).
2629
2351
  */
@@ -2633,48 +2355,48 @@ export namespace AccountHolderActiveWebhookEvent {
2633
2355
  value: string;
2634
2356
  }
2635
2357
 
2636
- export interface UsResidentialAddressResponse {
2358
+ export interface V1UsResidentialAddress {
2637
2359
  /**
2638
- * City name.
2360
+ * City or locality.
2639
2361
  */
2640
2362
  city: string;
2641
2363
 
2642
2364
  /**
2643
2365
  * ISO 3166-1 alpha-2 country code.
2644
2366
  */
2645
- country: 'US';
2367
+ country_code: 'US';
2646
2368
 
2647
2369
  /**
2648
- * Postal or ZIP code.
2370
+ * Primary street address.
2649
2371
  */
2650
- postal_code: string;
2372
+ line_1: string;
2651
2373
 
2652
2374
  /**
2653
- * Two-letter state code.
2375
+ * Secondary street address, or null if not recorded.
2654
2376
  */
2655
- state: string;
2377
+ line_2: string | null;
2656
2378
 
2657
2379
  /**
2658
- * Primary street address.
2380
+ * Postal or ZIP code.
2659
2381
  */
2660
- street_line_1: string;
2382
+ postal_code: string;
2661
2383
 
2662
2384
  /**
2663
- * Secondary street address (apartment, suite, etc.).
2385
+ * State, province, or region.
2664
2386
  */
2665
- street_line_2: string | null;
2387
+ state: string;
2666
2388
  }
2667
2389
 
2668
- export interface NonUsResidentialAddressResponse {
2390
+ export interface V1NonUsResidentialAddress {
2669
2391
  /**
2670
- * City name.
2392
+ * City or locality.
2671
2393
  */
2672
2394
  city: string;
2673
2395
 
2674
2396
  /**
2675
2397
  * ISO 3166-1 alpha-2 country code.
2676
2398
  */
2677
- country:
2399
+ country_code:
2678
2400
  | 'AF'
2679
2401
  | 'AL'
2680
2402
  | 'DZ'
@@ -2926,38 +2648,44 @@ export namespace AccountHolderActiveWebhookEvent {
2926
2648
  | 'XK';
2927
2649
 
2928
2650
  /**
2929
- * Postal or ZIP code.
2651
+ * Primary street address.
2930
2652
  */
2931
- postal_code: string;
2653
+ line_1: string;
2932
2654
 
2933
2655
  /**
2934
- * 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.
2935
2662
  */
2936
- street_line_1: string;
2663
+ postal_code: string;
2937
2664
 
2938
2665
  /**
2939
- * Secondary street address (apartment, suite, etc.).
2666
+ * State, province, or region, or null if not recorded.
2940
2667
  */
2941
- street_line_2: string | null;
2668
+ state: string | null;
2942
2669
  }
2943
2670
  }
2944
2671
 
2945
- export interface BusinessBeneficiaryDataResponse {
2672
+ export interface V1BusinessBeneficiaryDataResponse {
2946
2673
  /**
2947
2674
  * Beneficial owners of the business. At least one required.
2948
2675
  */
2949
2676
  beneficial_owners: Array<
2950
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
2951
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
2677
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
2678
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
2952
2679
  >;
2953
2680
 
2954
2681
  /**
2955
2682
  * Individual with primary responsibility for controlling, managing, or directing
2956
- * 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`.
2957
2685
  */
2958
2686
  control_person:
2959
- | BusinessBeneficiaryDataResponse.UnionMember0
2960
- | BusinessBeneficiaryDataResponse.UnionMember1;
2687
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
2688
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
2961
2689
 
2962
2690
  /**
2963
2691
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -3225,26 +2953,30 @@ export namespace AccountHolderActiveWebhookEvent {
3225
2953
  legal_business_name: string;
3226
2954
 
3227
2955
  /**
3228
- * 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.
3229
2959
  */
3230
2960
  physical_address:
3231
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3232
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2961
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
2962
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3233
2963
 
3234
2964
  /**
3235
- * 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.
3236
2968
  */
3237
2969
  registered_address:
3238
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3239
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2970
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
2971
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3240
2972
 
3241
2973
  /**
3242
2974
  * Business registration number: type "ein" (Employer Identification Number, format
3243
2975
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
3244
2976
  */
3245
2977
  registration_number:
3246
- | BusinessBeneficiaryDataResponse.EinIdentification
3247
- | BusinessBeneficiaryDataResponse.SsnIdentification;
2978
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
2979
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
3248
2980
 
3249
2981
  /**
3250
2982
  * State or subdivision where the business is incorporated.
@@ -3257,8 +2989,8 @@ export namespace AccountHolderActiveWebhookEvent {
3257
2989
  year_of_incorporation: number;
3258
2990
  }
3259
2991
 
3260
- export namespace BusinessBeneficiaryDataResponse {
3261
- export interface UsBeneficiaryDataResponse {
2992
+ export namespace V1BusinessBeneficiaryDataResponse {
2993
+ export interface V1UsBeneficiaryDataResponse {
3262
2994
  /**
3263
2995
  * ISO 3166-1 alpha-2 country code of citizenship.
3264
2996
  */
@@ -3274,8 +3006,8 @@ export namespace AccountHolderActiveWebhookEvent {
3274
3006
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
3275
3007
  */
3276
3008
  identification:
3277
- | UsBeneficiaryDataResponse.SsnIdentification
3278
- | UsBeneficiaryDataResponse.ItinIdentification;
3009
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
3010
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
3279
3011
 
3280
3012
  /**
3281
3013
  * Full legal name of the account holder.
@@ -3283,68 +3015,70 @@ export namespace AccountHolderActiveWebhookEvent {
3283
3015
  legal_name: string;
3284
3016
 
3285
3017
  /**
3286
- * 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.
3287
3021
  */
3288
3022
  residential_address:
3289
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
3290
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3023
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
3024
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3291
3025
  }
3292
3026
 
3293
- export namespace UsBeneficiaryDataResponse {
3294
- export interface SsnIdentification {
3027
+ export namespace V1UsBeneficiaryDataResponse {
3028
+ export interface V1SsnIdentification {
3295
3029
  type: 'ssn';
3296
3030
 
3297
3031
  value: string;
3298
3032
  }
3299
3033
 
3300
- export interface ItinIdentification {
3034
+ export interface V1ItinIdentification {
3301
3035
  type: 'itin';
3302
3036
 
3303
3037
  value: string;
3304
3038
  }
3305
3039
 
3306
- export interface UsResidentialAddressResponse {
3040
+ export interface V1UsResidentialAddress {
3307
3041
  /**
3308
- * City name.
3042
+ * City or locality.
3309
3043
  */
3310
3044
  city: string;
3311
3045
 
3312
3046
  /**
3313
3047
  * ISO 3166-1 alpha-2 country code.
3314
3048
  */
3315
- country: 'US';
3049
+ country_code: 'US';
3316
3050
 
3317
3051
  /**
3318
- * Postal or ZIP code.
3052
+ * Primary street address.
3319
3053
  */
3320
- postal_code: string;
3054
+ line_1: string;
3321
3055
 
3322
3056
  /**
3323
- * Two-letter state code.
3057
+ * Secondary street address, or null if not recorded.
3324
3058
  */
3325
- state: string;
3059
+ line_2: string | null;
3326
3060
 
3327
3061
  /**
3328
- * Primary street address.
3062
+ * Postal or ZIP code.
3329
3063
  */
3330
- street_line_1: string;
3064
+ postal_code: string;
3331
3065
 
3332
3066
  /**
3333
- * Secondary street address (apartment, suite, etc.).
3067
+ * State, province, or region.
3334
3068
  */
3335
- street_line_2: string | null;
3069
+ state: string;
3336
3070
  }
3337
3071
 
3338
- export interface NonUsResidentialAddressResponse {
3072
+ export interface V1NonUsResidentialAddress {
3339
3073
  /**
3340
- * City name.
3074
+ * City or locality.
3341
3075
  */
3342
3076
  city: string;
3343
3077
 
3344
3078
  /**
3345
3079
  * ISO 3166-1 alpha-2 country code.
3346
3080
  */
3347
- country:
3081
+ country_code:
3348
3082
  | 'AF'
3349
3083
  | 'AL'
3350
3084
  | 'DZ'
@@ -3596,23 +3330,28 @@ export namespace AccountHolderActiveWebhookEvent {
3596
3330
  | 'XK';
3597
3331
 
3598
3332
  /**
3599
- * Postal or ZIP code.
3333
+ * Primary street address.
3600
3334
  */
3601
- postal_code: string;
3335
+ line_1: string;
3602
3336
 
3603
3337
  /**
3604
- * 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.
3605
3344
  */
3606
- street_line_1: string;
3345
+ postal_code: string;
3607
3346
 
3608
3347
  /**
3609
- * Secondary street address (apartment, suite, etc.).
3348
+ * State, province, or region, or null if not recorded.
3610
3349
  */
3611
- street_line_2: string | null;
3350
+ state: string | null;
3612
3351
  }
3613
3352
  }
3614
3353
 
3615
- export interface NonUsBeneficiaryDataResponse {
3354
+ export interface V1NonUsBeneficiaryDataResponse {
3616
3355
  /**
3617
3356
  * ISO 3166-1 alpha-2 country code of citizenship.
3618
3357
  */
@@ -3875,7 +3614,7 @@ export namespace AccountHolderActiveWebhookEvent {
3875
3614
  /**
3876
3615
  * Government-issued identification with type: "id" (generic government-issued ID).
3877
3616
  */
3878
- identification: NonUsBeneficiaryDataResponse.Identification;
3617
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
3879
3618
 
3880
3619
  /**
3881
3620
  * Full legal name of the account holder.
@@ -3883,14 +3622,16 @@ export namespace AccountHolderActiveWebhookEvent {
3883
3622
  legal_name: string;
3884
3623
 
3885
3624
  /**
3886
- * 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.
3887
3628
  */
3888
3629
  residential_address:
3889
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
3890
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3630
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
3631
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3891
3632
  }
3892
3633
 
3893
- export namespace NonUsBeneficiaryDataResponse {
3634
+ export namespace V1NonUsBeneficiaryDataResponse {
3894
3635
  /**
3895
3636
  * Government-issued identification with type: "id" (generic government-issued ID).
3896
3637
  */
@@ -3900,48 +3641,48 @@ export namespace AccountHolderActiveWebhookEvent {
3900
3641
  value: string;
3901
3642
  }
3902
3643
 
3903
- export interface UsResidentialAddressResponse {
3644
+ export interface V1UsResidentialAddress {
3904
3645
  /**
3905
- * City name.
3646
+ * City or locality.
3906
3647
  */
3907
3648
  city: string;
3908
3649
 
3909
3650
  /**
3910
3651
  * ISO 3166-1 alpha-2 country code.
3911
3652
  */
3912
- country: 'US';
3653
+ country_code: 'US';
3913
3654
 
3914
3655
  /**
3915
- * Postal or ZIP code.
3656
+ * Primary street address.
3916
3657
  */
3917
- postal_code: string;
3658
+ line_1: string;
3918
3659
 
3919
3660
  /**
3920
- * Two-letter state code.
3661
+ * Secondary street address, or null if not recorded.
3921
3662
  */
3922
- state: string;
3663
+ line_2: string | null;
3923
3664
 
3924
3665
  /**
3925
- * Primary street address.
3666
+ * Postal or ZIP code.
3926
3667
  */
3927
- street_line_1: string;
3668
+ postal_code: string;
3928
3669
 
3929
3670
  /**
3930
- * Secondary street address (apartment, suite, etc.).
3671
+ * State, province, or region.
3931
3672
  */
3932
- street_line_2: string | null;
3673
+ state: string;
3933
3674
  }
3934
3675
 
3935
- export interface NonUsResidentialAddressResponse {
3676
+ export interface V1NonUsResidentialAddress {
3936
3677
  /**
3937
- * City name.
3678
+ * City or locality.
3938
3679
  */
3939
3680
  city: string;
3940
3681
 
3941
3682
  /**
3942
3683
  * ISO 3166-1 alpha-2 country code.
3943
3684
  */
3944
- country:
3685
+ country_code:
3945
3686
  | 'AF'
3946
3687
  | 'AL'
3947
3688
  | 'DZ'
@@ -4193,19 +3934,24 @@ export namespace AccountHolderActiveWebhookEvent {
4193
3934
  | 'XK';
4194
3935
 
4195
3936
  /**
4196
- * Postal or ZIP code.
3937
+ * Primary street address.
4197
3938
  */
4198
- postal_code: string;
3939
+ line_1: string;
4199
3940
 
4200
3941
  /**
4201
- * 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.
4202
3948
  */
4203
- street_line_1: string;
3949
+ postal_code: string;
4204
3950
 
4205
3951
  /**
4206
- * Secondary street address (apartment, suite, etc.).
3952
+ * State, province, or region, or null if not recorded.
4207
3953
  */
4208
- street_line_2: string | null;
3954
+ state: string | null;
4209
3955
  }
4210
3956
  }
4211
3957
 
@@ -4224,7 +3970,7 @@ export namespace AccountHolderActiveWebhookEvent {
4224
3970
  * Government-issued identification with type: "ssn" (Social Security Number,
4225
3971
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
4226
3972
  */
4227
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
3973
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
4228
3974
 
4229
3975
  /**
4230
3976
  * Full legal name of the account holder.
@@ -4232,11 +3978,11 @@ export namespace AccountHolderActiveWebhookEvent {
4232
3978
  legal_name: string;
4233
3979
 
4234
3980
  /**
4235
- * 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.
4236
3984
  */
4237
- residential_address:
4238
- | UnionMember0.UsResidentialAddressResponse
4239
- | UnionMember0.NonUsResidentialAddressResponse;
3985
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
4240
3986
 
4241
3987
  /**
4242
3988
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4246,60 +3992,60 @@ export namespace AccountHolderActiveWebhookEvent {
4246
3992
  }
4247
3993
 
4248
3994
  export namespace UnionMember0 {
4249
- export interface SsnIdentification {
3995
+ export interface V1SsnIdentification {
4250
3996
  type: 'ssn';
4251
3997
 
4252
3998
  value: string;
4253
3999
  }
4254
4000
 
4255
- export interface ItinIdentification {
4001
+ export interface V1ItinIdentification {
4256
4002
  type: 'itin';
4257
4003
 
4258
4004
  value: string;
4259
4005
  }
4260
4006
 
4261
- export interface UsResidentialAddressResponse {
4007
+ export interface V1UsResidentialAddress {
4262
4008
  /**
4263
- * City name.
4009
+ * City or locality.
4264
4010
  */
4265
4011
  city: string;
4266
4012
 
4267
4013
  /**
4268
4014
  * ISO 3166-1 alpha-2 country code.
4269
4015
  */
4270
- country: 'US';
4016
+ country_code: 'US';
4271
4017
 
4272
4018
  /**
4273
- * Postal or ZIP code.
4019
+ * Primary street address.
4274
4020
  */
4275
- postal_code: string;
4021
+ line_1: string;
4276
4022
 
4277
4023
  /**
4278
- * Two-letter state code.
4024
+ * Secondary street address, or null if not recorded.
4279
4025
  */
4280
- state: string;
4026
+ line_2: string | null;
4281
4027
 
4282
4028
  /**
4283
- * Primary street address.
4029
+ * Postal or ZIP code.
4284
4030
  */
4285
- street_line_1: string;
4031
+ postal_code: string;
4286
4032
 
4287
4033
  /**
4288
- * Secondary street address (apartment, suite, etc.).
4034
+ * State, province, or region.
4289
4035
  */
4290
- street_line_2: string | null;
4036
+ state: string;
4291
4037
  }
4292
4038
 
4293
- export interface NonUsResidentialAddressResponse {
4039
+ export interface V1NonUsResidentialAddress {
4294
4040
  /**
4295
- * City name.
4041
+ * City or locality.
4296
4042
  */
4297
4043
  city: string;
4298
4044
 
4299
4045
  /**
4300
4046
  * ISO 3166-1 alpha-2 country code.
4301
4047
  */
4302
- country:
4048
+ country_code:
4303
4049
  | 'AF'
4304
4050
  | 'AL'
4305
4051
  | 'DZ'
@@ -4551,19 +4297,24 @@ export namespace AccountHolderActiveWebhookEvent {
4551
4297
  | 'XK';
4552
4298
 
4553
4299
  /**
4554
- * Postal or ZIP code.
4300
+ * Primary street address.
4555
4301
  */
4556
- postal_code: string;
4302
+ line_1: string;
4557
4303
 
4558
4304
  /**
4559
- * 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.
4560
4311
  */
4561
- street_line_1: string;
4312
+ postal_code: string;
4562
4313
 
4563
4314
  /**
4564
- * Secondary street address (apartment, suite, etc.).
4315
+ * State, province, or region, or null if not recorded.
4565
4316
  */
4566
- street_line_2: string | null;
4317
+ state: string | null;
4567
4318
  }
4568
4319
  }
4569
4320
 
@@ -4838,11 +4589,11 @@ export namespace AccountHolderActiveWebhookEvent {
4838
4589
  legal_name: string;
4839
4590
 
4840
4591
  /**
4841
- * 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.
4842
4595
  */
4843
- residential_address:
4844
- | UnionMember1.UsResidentialAddressResponse
4845
- | UnionMember1.NonUsResidentialAddressResponse;
4596
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
4846
4597
 
4847
4598
  /**
4848
4599
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4861,48 +4612,48 @@ export namespace AccountHolderActiveWebhookEvent {
4861
4612
  value: string;
4862
4613
  }
4863
4614
 
4864
- export interface UsResidentialAddressResponse {
4615
+ export interface V1UsResidentialAddress {
4865
4616
  /**
4866
- * City name.
4617
+ * City or locality.
4867
4618
  */
4868
4619
  city: string;
4869
4620
 
4870
4621
  /**
4871
4622
  * ISO 3166-1 alpha-2 country code.
4872
4623
  */
4873
- country: 'US';
4624
+ country_code: 'US';
4874
4625
 
4875
4626
  /**
4876
- * Postal or ZIP code.
4627
+ * Primary street address.
4877
4628
  */
4878
- postal_code: string;
4629
+ line_1: string;
4879
4630
 
4880
4631
  /**
4881
- * Two-letter state code.
4632
+ * Secondary street address, or null if not recorded.
4882
4633
  */
4883
- state: string;
4634
+ line_2: string | null;
4884
4635
 
4885
4636
  /**
4886
- * Primary street address.
4637
+ * Postal or ZIP code.
4887
4638
  */
4888
- street_line_1: string;
4639
+ postal_code: string;
4889
4640
 
4890
4641
  /**
4891
- * Secondary street address (apartment, suite, etc.).
4642
+ * State, province, or region.
4892
4643
  */
4893
- street_line_2: string | null;
4644
+ state: string;
4894
4645
  }
4895
4646
 
4896
- export interface NonUsResidentialAddressResponse {
4647
+ export interface V1NonUsResidentialAddress {
4897
4648
  /**
4898
- * City name.
4649
+ * City or locality.
4899
4650
  */
4900
4651
  city: string;
4901
4652
 
4902
4653
  /**
4903
4654
  * ISO 3166-1 alpha-2 country code.
4904
4655
  */
4905
- country:
4656
+ country_code:
4906
4657
  | 'AF'
4907
4658
  | 'AL'
4908
4659
  | 'DZ'
@@ -5154,64 +4905,69 @@ export namespace AccountHolderActiveWebhookEvent {
5154
4905
  | 'XK';
5155
4906
 
5156
4907
  /**
5157
- * Postal or ZIP code.
4908
+ * Primary street address.
5158
4909
  */
5159
- postal_code: string;
4910
+ line_1: string;
5160
4911
 
5161
4912
  /**
5162
- * 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.
5163
4919
  */
5164
- street_line_1: string;
4920
+ postal_code: string;
5165
4921
 
5166
4922
  /**
5167
- * Secondary street address (apartment, suite, etc.).
4923
+ * State, province, or region, or null if not recorded.
5168
4924
  */
5169
- street_line_2: string | null;
4925
+ state: string | null;
5170
4926
  }
5171
4927
  }
5172
4928
 
5173
- export interface UsResidentialAddressResponse {
4929
+ export interface V1UsResidentialAddress {
5174
4930
  /**
5175
- * City name.
4931
+ * City or locality.
5176
4932
  */
5177
4933
  city: string;
5178
4934
 
5179
4935
  /**
5180
4936
  * ISO 3166-1 alpha-2 country code.
5181
4937
  */
5182
- country: 'US';
4938
+ country_code: 'US';
5183
4939
 
5184
4940
  /**
5185
- * Postal or ZIP code.
4941
+ * Primary street address.
5186
4942
  */
5187
- postal_code: string;
4943
+ line_1: string;
5188
4944
 
5189
4945
  /**
5190
- * Two-letter state code.
4946
+ * Secondary street address, or null if not recorded.
5191
4947
  */
5192
- state: string;
4948
+ line_2: string | null;
5193
4949
 
5194
4950
  /**
5195
- * Primary street address.
4951
+ * Postal or ZIP code.
5196
4952
  */
5197
- street_line_1: string;
4953
+ postal_code: string;
5198
4954
 
5199
4955
  /**
5200
- * Secondary street address (apartment, suite, etc.).
4956
+ * State, province, or region.
5201
4957
  */
5202
- street_line_2: string | null;
4958
+ state: string;
5203
4959
  }
5204
4960
 
5205
- export interface NonUsResidentialAddressResponse {
4961
+ export interface V1NonUsResidentialAddress {
5206
4962
  /**
5207
- * City name.
4963
+ * City or locality.
5208
4964
  */
5209
4965
  city: string;
5210
4966
 
5211
4967
  /**
5212
4968
  * ISO 3166-1 alpha-2 country code.
5213
4969
  */
5214
- country:
4970
+ country_code:
5215
4971
  | 'AF'
5216
4972
  | 'AL'
5217
4973
  | 'DZ'
@@ -5463,63 +5219,68 @@ export namespace AccountHolderActiveWebhookEvent {
5463
5219
  | 'XK';
5464
5220
 
5465
5221
  /**
5466
- * Postal or ZIP code.
5222
+ * Primary street address.
5467
5223
  */
5468
- postal_code: string;
5224
+ line_1: string;
5469
5225
 
5470
5226
  /**
5471
- * Primary street address.
5227
+ * Secondary street address, or null if not recorded.
5472
5228
  */
5473
- street_line_1: string;
5229
+ line_2: string | null;
5474
5230
 
5475
5231
  /**
5476
- * 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.
5477
5238
  */
5478
- street_line_2: string | null;
5239
+ state: string | null;
5479
5240
  }
5480
5241
 
5481
- export interface UsResidentialAddressResponse {
5242
+ export interface V1UsResidentialAddress {
5482
5243
  /**
5483
- * City name.
5244
+ * City or locality.
5484
5245
  */
5485
5246
  city: string;
5486
5247
 
5487
5248
  /**
5488
5249
  * ISO 3166-1 alpha-2 country code.
5489
5250
  */
5490
- country: 'US';
5251
+ country_code: 'US';
5491
5252
 
5492
5253
  /**
5493
- * Postal or ZIP code.
5254
+ * Primary street address.
5494
5255
  */
5495
- postal_code: string;
5256
+ line_1: string;
5496
5257
 
5497
5258
  /**
5498
- * Two-letter state code.
5259
+ * Secondary street address, or null if not recorded.
5499
5260
  */
5500
- state: string;
5261
+ line_2: string | null;
5501
5262
 
5502
5263
  /**
5503
- * Primary street address.
5264
+ * Postal or ZIP code.
5504
5265
  */
5505
- street_line_1: string;
5266
+ postal_code: string;
5506
5267
 
5507
5268
  /**
5508
- * Secondary street address (apartment, suite, etc.).
5269
+ * State, province, or region.
5509
5270
  */
5510
- street_line_2: string | null;
5271
+ state: string;
5511
5272
  }
5512
5273
 
5513
- export interface NonUsResidentialAddressResponse {
5274
+ export interface V1NonUsResidentialAddress {
5514
5275
  /**
5515
- * City name.
5276
+ * City or locality.
5516
5277
  */
5517
5278
  city: string;
5518
5279
 
5519
5280
  /**
5520
5281
  * ISO 3166-1 alpha-2 country code.
5521
5282
  */
5522
- country:
5283
+ country_code:
5523
5284
  | 'AF'
5524
5285
  | 'AL'
5525
5286
  | 'DZ'
@@ -5771,28 +5532,33 @@ export namespace AccountHolderActiveWebhookEvent {
5771
5532
  | 'XK';
5772
5533
 
5773
5534
  /**
5774
- * Postal or ZIP code.
5535
+ * Primary street address.
5775
5536
  */
5776
- postal_code: string;
5537
+ line_1: string;
5777
5538
 
5778
5539
  /**
5779
- * 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.
5780
5546
  */
5781
- street_line_1: string;
5547
+ postal_code: string;
5782
5548
 
5783
5549
  /**
5784
- * Secondary street address (apartment, suite, etc.).
5550
+ * State, province, or region, or null if not recorded.
5785
5551
  */
5786
- street_line_2: string | null;
5552
+ state: string | null;
5787
5553
  }
5788
5554
 
5789
- export interface EinIdentification {
5555
+ export interface V1EinIdentification {
5790
5556
  type: 'ein';
5791
5557
 
5792
5558
  value: string;
5793
5559
  }
5794
5560
 
5795
- export interface SsnIdentification {
5561
+ export interface V1SsnIdentification {
5796
5562
  type: 'ssn';
5797
5563
 
5798
5564
  value: string;
@@ -5839,12 +5605,15 @@ export namespace AccountHolderClosedWebhookEvent {
5839
5605
  id: string;
5840
5606
 
5841
5607
  /**
5842
- * 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`.
5843
5612
  */
5844
5613
  beneficiary_data:
5845
- | Payload.UsBeneficiaryDataResponse
5846
- | Payload.NonUsBeneficiaryDataResponse
5847
- | Payload.BusinessBeneficiaryDataResponse;
5614
+ | Payload.V1UsBeneficiaryDataResponse
5615
+ | Payload.V1NonUsBeneficiaryDataResponse
5616
+ | Payload.V1BusinessBeneficiaryDataResponse;
5848
5617
 
5849
5618
  /**
5850
5619
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -5868,7 +5637,7 @@ export namespace AccountHolderClosedWebhookEvent {
5868
5637
  }
5869
5638
 
5870
5639
  export namespace Payload {
5871
- export interface UsBeneficiaryDataResponse {
5640
+ export interface V1UsBeneficiaryDataResponse {
5872
5641
  /**
5873
5642
  * ISO 3166-1 alpha-2 country code of citizenship.
5874
5643
  */
@@ -5884,8 +5653,8 @@ export namespace AccountHolderClosedWebhookEvent {
5884
5653
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
5885
5654
  */
5886
5655
  identification:
5887
- | UsBeneficiaryDataResponse.SsnIdentification
5888
- | UsBeneficiaryDataResponse.ItinIdentification;
5656
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
5657
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
5889
5658
 
5890
5659
  /**
5891
5660
  * Full legal name of the account holder.
@@ -5893,68 +5662,70 @@ export namespace AccountHolderClosedWebhookEvent {
5893
5662
  legal_name: string;
5894
5663
 
5895
5664
  /**
5896
- * 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.
5897
5668
  */
5898
5669
  residential_address:
5899
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
5900
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
5670
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
5671
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
5901
5672
  }
5902
5673
 
5903
- export namespace UsBeneficiaryDataResponse {
5904
- export interface SsnIdentification {
5674
+ export namespace V1UsBeneficiaryDataResponse {
5675
+ export interface V1SsnIdentification {
5905
5676
  type: 'ssn';
5906
5677
 
5907
5678
  value: string;
5908
5679
  }
5909
5680
 
5910
- export interface ItinIdentification {
5681
+ export interface V1ItinIdentification {
5911
5682
  type: 'itin';
5912
5683
 
5913
5684
  value: string;
5914
5685
  }
5915
5686
 
5916
- export interface UsResidentialAddressResponse {
5687
+ export interface V1UsResidentialAddress {
5917
5688
  /**
5918
- * City name.
5689
+ * City or locality.
5919
5690
  */
5920
5691
  city: string;
5921
5692
 
5922
5693
  /**
5923
5694
  * ISO 3166-1 alpha-2 country code.
5924
5695
  */
5925
- country: 'US';
5696
+ country_code: 'US';
5926
5697
 
5927
5698
  /**
5928
- * Postal or ZIP code.
5699
+ * Primary street address.
5929
5700
  */
5930
- postal_code: string;
5701
+ line_1: string;
5931
5702
 
5932
5703
  /**
5933
- * Two-letter state code.
5704
+ * Secondary street address, or null if not recorded.
5934
5705
  */
5935
- state: string;
5706
+ line_2: string | null;
5936
5707
 
5937
5708
  /**
5938
- * Primary street address.
5709
+ * Postal or ZIP code.
5939
5710
  */
5940
- street_line_1: string;
5711
+ postal_code: string;
5941
5712
 
5942
5713
  /**
5943
- * Secondary street address (apartment, suite, etc.).
5714
+ * State, province, or region.
5944
5715
  */
5945
- street_line_2: string | null;
5716
+ state: string;
5946
5717
  }
5947
5718
 
5948
- export interface NonUsResidentialAddressResponse {
5719
+ export interface V1NonUsResidentialAddress {
5949
5720
  /**
5950
- * City name.
5721
+ * City or locality.
5951
5722
  */
5952
5723
  city: string;
5953
5724
 
5954
5725
  /**
5955
5726
  * ISO 3166-1 alpha-2 country code.
5956
5727
  */
5957
- country:
5728
+ country_code:
5958
5729
  | 'AF'
5959
5730
  | 'AL'
5960
5731
  | 'DZ'
@@ -6206,23 +5977,28 @@ export namespace AccountHolderClosedWebhookEvent {
6206
5977
  | 'XK';
6207
5978
 
6208
5979
  /**
6209
- * Postal or ZIP code.
5980
+ * Primary street address.
6210
5981
  */
6211
- postal_code: string;
5982
+ line_1: string;
6212
5983
 
6213
5984
  /**
6214
- * 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.
6215
5991
  */
6216
- street_line_1: string;
5992
+ postal_code: string;
6217
5993
 
6218
5994
  /**
6219
- * Secondary street address (apartment, suite, etc.).
5995
+ * State, province, or region, or null if not recorded.
6220
5996
  */
6221
- street_line_2: string | null;
5997
+ state: string | null;
6222
5998
  }
6223
5999
  }
6224
6000
 
6225
- export interface NonUsBeneficiaryDataResponse {
6001
+ export interface V1NonUsBeneficiaryDataResponse {
6226
6002
  /**
6227
6003
  * ISO 3166-1 alpha-2 country code of citizenship.
6228
6004
  */
@@ -6485,7 +6261,7 @@ export namespace AccountHolderClosedWebhookEvent {
6485
6261
  /**
6486
6262
  * Government-issued identification with type: "id" (generic government-issued ID).
6487
6263
  */
6488
- identification: NonUsBeneficiaryDataResponse.Identification;
6264
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
6489
6265
 
6490
6266
  /**
6491
6267
  * Full legal name of the account holder.
@@ -6493,14 +6269,16 @@ export namespace AccountHolderClosedWebhookEvent {
6493
6269
  legal_name: string;
6494
6270
 
6495
6271
  /**
6496
- * 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.
6497
6275
  */
6498
6276
  residential_address:
6499
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
6500
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6277
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
6278
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
6501
6279
  }
6502
6280
 
6503
- export namespace NonUsBeneficiaryDataResponse {
6281
+ export namespace V1NonUsBeneficiaryDataResponse {
6504
6282
  /**
6505
6283
  * Government-issued identification with type: "id" (generic government-issued ID).
6506
6284
  */
@@ -6510,48 +6288,48 @@ export namespace AccountHolderClosedWebhookEvent {
6510
6288
  value: string;
6511
6289
  }
6512
6290
 
6513
- export interface UsResidentialAddressResponse {
6291
+ export interface V1UsResidentialAddress {
6514
6292
  /**
6515
- * City name.
6293
+ * City or locality.
6516
6294
  */
6517
6295
  city: string;
6518
6296
 
6519
6297
  /**
6520
6298
  * ISO 3166-1 alpha-2 country code.
6521
6299
  */
6522
- country: 'US';
6300
+ country_code: 'US';
6523
6301
 
6524
6302
  /**
6525
- * Postal or ZIP code.
6303
+ * Primary street address.
6526
6304
  */
6527
- postal_code: string;
6305
+ line_1: string;
6528
6306
 
6529
6307
  /**
6530
- * Two-letter state code.
6308
+ * Secondary street address, or null if not recorded.
6531
6309
  */
6532
- state: string;
6310
+ line_2: string | null;
6533
6311
 
6534
6312
  /**
6535
- * Primary street address.
6313
+ * Postal or ZIP code.
6536
6314
  */
6537
- street_line_1: string;
6315
+ postal_code: string;
6538
6316
 
6539
6317
  /**
6540
- * Secondary street address (apartment, suite, etc.).
6318
+ * State, province, or region.
6541
6319
  */
6542
- street_line_2: string | null;
6320
+ state: string;
6543
6321
  }
6544
6322
 
6545
- export interface NonUsResidentialAddressResponse {
6323
+ export interface V1NonUsResidentialAddress {
6546
6324
  /**
6547
- * City name.
6325
+ * City or locality.
6548
6326
  */
6549
6327
  city: string;
6550
6328
 
6551
6329
  /**
6552
6330
  * ISO 3166-1 alpha-2 country code.
6553
6331
  */
6554
- country:
6332
+ country_code:
6555
6333
  | 'AF'
6556
6334
  | 'AL'
6557
6335
  | 'DZ'
@@ -6803,38 +6581,44 @@ export namespace AccountHolderClosedWebhookEvent {
6803
6581
  | 'XK';
6804
6582
 
6805
6583
  /**
6806
- * Postal or ZIP code.
6584
+ * Primary street address.
6807
6585
  */
6808
- postal_code: string;
6586
+ line_1: string;
6809
6587
 
6810
6588
  /**
6811
- * 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.
6812
6595
  */
6813
- street_line_1: string;
6596
+ postal_code: string;
6814
6597
 
6815
6598
  /**
6816
- * Secondary street address (apartment, suite, etc.).
6599
+ * State, province, or region, or null if not recorded.
6817
6600
  */
6818
- street_line_2: string | null;
6601
+ state: string | null;
6819
6602
  }
6820
6603
  }
6821
6604
 
6822
- export interface BusinessBeneficiaryDataResponse {
6605
+ export interface V1BusinessBeneficiaryDataResponse {
6823
6606
  /**
6824
6607
  * Beneficial owners of the business. At least one required.
6825
6608
  */
6826
6609
  beneficial_owners: Array<
6827
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
6828
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
6610
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
6611
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
6829
6612
  >;
6830
6613
 
6831
6614
  /**
6832
6615
  * Individual with primary responsibility for controlling, managing, or directing
6833
- * 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`.
6834
6618
  */
6835
6619
  control_person:
6836
- | BusinessBeneficiaryDataResponse.UnionMember0
6837
- | BusinessBeneficiaryDataResponse.UnionMember1;
6620
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
6621
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
6838
6622
 
6839
6623
  /**
6840
6624
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -7102,26 +6886,30 @@ export namespace AccountHolderClosedWebhookEvent {
7102
6886
  legal_business_name: string;
7103
6887
 
7104
6888
  /**
7105
- * 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.
7106
6892
  */
7107
6893
  physical_address:
7108
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7109
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6894
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
6895
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7110
6896
 
7111
6897
  /**
7112
- * 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.
7113
6901
  */
7114
6902
  registered_address:
7115
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7116
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6903
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
6904
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7117
6905
 
7118
6906
  /**
7119
6907
  * Business registration number: type "ein" (Employer Identification Number, format
7120
6908
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
7121
6909
  */
7122
6910
  registration_number:
7123
- | BusinessBeneficiaryDataResponse.EinIdentification
7124
- | BusinessBeneficiaryDataResponse.SsnIdentification;
6911
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
6912
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
7125
6913
 
7126
6914
  /**
7127
6915
  * State or subdivision where the business is incorporated.
@@ -7134,8 +6922,8 @@ export namespace AccountHolderClosedWebhookEvent {
7134
6922
  year_of_incorporation: number;
7135
6923
  }
7136
6924
 
7137
- export namespace BusinessBeneficiaryDataResponse {
7138
- export interface UsBeneficiaryDataResponse {
6925
+ export namespace V1BusinessBeneficiaryDataResponse {
6926
+ export interface V1UsBeneficiaryDataResponse {
7139
6927
  /**
7140
6928
  * ISO 3166-1 alpha-2 country code of citizenship.
7141
6929
  */
@@ -7151,8 +6939,8 @@ export namespace AccountHolderClosedWebhookEvent {
7151
6939
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
7152
6940
  */
7153
6941
  identification:
7154
- | UsBeneficiaryDataResponse.SsnIdentification
7155
- | UsBeneficiaryDataResponse.ItinIdentification;
6942
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
6943
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
7156
6944
 
7157
6945
  /**
7158
6946
  * Full legal name of the account holder.
@@ -7160,68 +6948,70 @@ export namespace AccountHolderClosedWebhookEvent {
7160
6948
  legal_name: string;
7161
6949
 
7162
6950
  /**
7163
- * 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.
7164
6954
  */
7165
6955
  residential_address:
7166
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
7167
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6956
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
6957
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7168
6958
  }
7169
6959
 
7170
- export namespace UsBeneficiaryDataResponse {
7171
- export interface SsnIdentification {
6960
+ export namespace V1UsBeneficiaryDataResponse {
6961
+ export interface V1SsnIdentification {
7172
6962
  type: 'ssn';
7173
6963
 
7174
6964
  value: string;
7175
6965
  }
7176
6966
 
7177
- export interface ItinIdentification {
6967
+ export interface V1ItinIdentification {
7178
6968
  type: 'itin';
7179
6969
 
7180
6970
  value: string;
7181
6971
  }
7182
6972
 
7183
- export interface UsResidentialAddressResponse {
6973
+ export interface V1UsResidentialAddress {
7184
6974
  /**
7185
- * City name.
6975
+ * City or locality.
7186
6976
  */
7187
6977
  city: string;
7188
6978
 
7189
6979
  /**
7190
6980
  * ISO 3166-1 alpha-2 country code.
7191
6981
  */
7192
- country: 'US';
6982
+ country_code: 'US';
7193
6983
 
7194
6984
  /**
7195
- * Postal or ZIP code.
6985
+ * Primary street address.
7196
6986
  */
7197
- postal_code: string;
6987
+ line_1: string;
7198
6988
 
7199
6989
  /**
7200
- * Two-letter state code.
6990
+ * Secondary street address, or null if not recorded.
7201
6991
  */
7202
- state: string;
6992
+ line_2: string | null;
7203
6993
 
7204
6994
  /**
7205
- * Primary street address.
6995
+ * Postal or ZIP code.
7206
6996
  */
7207
- street_line_1: string;
6997
+ postal_code: string;
7208
6998
 
7209
6999
  /**
7210
- * Secondary street address (apartment, suite, etc.).
7000
+ * State, province, or region.
7211
7001
  */
7212
- street_line_2: string | null;
7002
+ state: string;
7213
7003
  }
7214
7004
 
7215
- export interface NonUsResidentialAddressResponse {
7005
+ export interface V1NonUsResidentialAddress {
7216
7006
  /**
7217
- * City name.
7007
+ * City or locality.
7218
7008
  */
7219
7009
  city: string;
7220
7010
 
7221
7011
  /**
7222
7012
  * ISO 3166-1 alpha-2 country code.
7223
7013
  */
7224
- country:
7014
+ country_code:
7225
7015
  | 'AF'
7226
7016
  | 'AL'
7227
7017
  | 'DZ'
@@ -7473,23 +7263,28 @@ export namespace AccountHolderClosedWebhookEvent {
7473
7263
  | 'XK';
7474
7264
 
7475
7265
  /**
7476
- * Postal or ZIP code.
7266
+ * Primary street address.
7477
7267
  */
7478
- postal_code: string;
7268
+ line_1: string;
7479
7269
 
7480
7270
  /**
7481
- * 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.
7482
7277
  */
7483
- street_line_1: string;
7278
+ postal_code: string;
7484
7279
 
7485
7280
  /**
7486
- * Secondary street address (apartment, suite, etc.).
7281
+ * State, province, or region, or null if not recorded.
7487
7282
  */
7488
- street_line_2: string | null;
7283
+ state: string | null;
7489
7284
  }
7490
7285
  }
7491
7286
 
7492
- export interface NonUsBeneficiaryDataResponse {
7287
+ export interface V1NonUsBeneficiaryDataResponse {
7493
7288
  /**
7494
7289
  * ISO 3166-1 alpha-2 country code of citizenship.
7495
7290
  */
@@ -7752,7 +7547,7 @@ export namespace AccountHolderClosedWebhookEvent {
7752
7547
  /**
7753
7548
  * Government-issued identification with type: "id" (generic government-issued ID).
7754
7549
  */
7755
- identification: NonUsBeneficiaryDataResponse.Identification;
7550
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
7756
7551
 
7757
7552
  /**
7758
7553
  * Full legal name of the account holder.
@@ -7760,14 +7555,16 @@ export namespace AccountHolderClosedWebhookEvent {
7760
7555
  legal_name: string;
7761
7556
 
7762
7557
  /**
7763
- * 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.
7764
7561
  */
7765
7562
  residential_address:
7766
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
7767
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7563
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
7564
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7768
7565
  }
7769
7566
 
7770
- export namespace NonUsBeneficiaryDataResponse {
7567
+ export namespace V1NonUsBeneficiaryDataResponse {
7771
7568
  /**
7772
7569
  * Government-issued identification with type: "id" (generic government-issued ID).
7773
7570
  */
@@ -7777,48 +7574,48 @@ export namespace AccountHolderClosedWebhookEvent {
7777
7574
  value: string;
7778
7575
  }
7779
7576
 
7780
- export interface UsResidentialAddressResponse {
7577
+ export interface V1UsResidentialAddress {
7781
7578
  /**
7782
- * City name.
7579
+ * City or locality.
7783
7580
  */
7784
7581
  city: string;
7785
7582
 
7786
7583
  /**
7787
7584
  * ISO 3166-1 alpha-2 country code.
7788
7585
  */
7789
- country: 'US';
7586
+ country_code: 'US';
7790
7587
 
7791
7588
  /**
7792
- * Postal or ZIP code.
7589
+ * Primary street address.
7793
7590
  */
7794
- postal_code: string;
7591
+ line_1: string;
7795
7592
 
7796
7593
  /**
7797
- * Two-letter state code.
7594
+ * Secondary street address, or null if not recorded.
7798
7595
  */
7799
- state: string;
7596
+ line_2: string | null;
7800
7597
 
7801
7598
  /**
7802
- * Primary street address.
7599
+ * Postal or ZIP code.
7803
7600
  */
7804
- street_line_1: string;
7601
+ postal_code: string;
7805
7602
 
7806
7603
  /**
7807
- * Secondary street address (apartment, suite, etc.).
7604
+ * State, province, or region.
7808
7605
  */
7809
- street_line_2: string | null;
7606
+ state: string;
7810
7607
  }
7811
7608
 
7812
- export interface NonUsResidentialAddressResponse {
7609
+ export interface V1NonUsResidentialAddress {
7813
7610
  /**
7814
- * City name.
7611
+ * City or locality.
7815
7612
  */
7816
7613
  city: string;
7817
7614
 
7818
7615
  /**
7819
7616
  * ISO 3166-1 alpha-2 country code.
7820
7617
  */
7821
- country:
7618
+ country_code:
7822
7619
  | 'AF'
7823
7620
  | 'AL'
7824
7621
  | 'DZ'
@@ -8070,19 +7867,24 @@ export namespace AccountHolderClosedWebhookEvent {
8070
7867
  | 'XK';
8071
7868
 
8072
7869
  /**
8073
- * Postal or ZIP code.
7870
+ * Primary street address.
8074
7871
  */
8075
- postal_code: string;
7872
+ line_1: string;
8076
7873
 
8077
7874
  /**
8078
- * 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.
8079
7881
  */
8080
- street_line_1: string;
7882
+ postal_code: string;
8081
7883
 
8082
7884
  /**
8083
- * Secondary street address (apartment, suite, etc.).
7885
+ * State, province, or region, or null if not recorded.
8084
7886
  */
8085
- street_line_2: string | null;
7887
+ state: string | null;
8086
7888
  }
8087
7889
  }
8088
7890
 
@@ -8101,7 +7903,7 @@ export namespace AccountHolderClosedWebhookEvent {
8101
7903
  * Government-issued identification with type: "ssn" (Social Security Number,
8102
7904
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
8103
7905
  */
8104
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
7906
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
8105
7907
 
8106
7908
  /**
8107
7909
  * Full legal name of the account holder.
@@ -8109,11 +7911,11 @@ export namespace AccountHolderClosedWebhookEvent {
8109
7911
  legal_name: string;
8110
7912
 
8111
7913
  /**
8112
- * 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.
8113
7917
  */
8114
- residential_address:
8115
- | UnionMember0.UsResidentialAddressResponse
8116
- | UnionMember0.NonUsResidentialAddressResponse;
7918
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
8117
7919
 
8118
7920
  /**
8119
7921
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8123,60 +7925,60 @@ export namespace AccountHolderClosedWebhookEvent {
8123
7925
  }
8124
7926
 
8125
7927
  export namespace UnionMember0 {
8126
- export interface SsnIdentification {
7928
+ export interface V1SsnIdentification {
8127
7929
  type: 'ssn';
8128
7930
 
8129
7931
  value: string;
8130
7932
  }
8131
7933
 
8132
- export interface ItinIdentification {
7934
+ export interface V1ItinIdentification {
8133
7935
  type: 'itin';
8134
7936
 
8135
7937
  value: string;
8136
7938
  }
8137
7939
 
8138
- export interface UsResidentialAddressResponse {
7940
+ export interface V1UsResidentialAddress {
8139
7941
  /**
8140
- * City name.
7942
+ * City or locality.
8141
7943
  */
8142
7944
  city: string;
8143
7945
 
8144
7946
  /**
8145
7947
  * ISO 3166-1 alpha-2 country code.
8146
7948
  */
8147
- country: 'US';
7949
+ country_code: 'US';
8148
7950
 
8149
7951
  /**
8150
- * Postal or ZIP code.
7952
+ * Primary street address.
8151
7953
  */
8152
- postal_code: string;
7954
+ line_1: string;
8153
7955
 
8154
7956
  /**
8155
- * Two-letter state code.
7957
+ * Secondary street address, or null if not recorded.
8156
7958
  */
8157
- state: string;
7959
+ line_2: string | null;
8158
7960
 
8159
7961
  /**
8160
- * Primary street address.
7962
+ * Postal or ZIP code.
8161
7963
  */
8162
- street_line_1: string;
7964
+ postal_code: string;
8163
7965
 
8164
7966
  /**
8165
- * Secondary street address (apartment, suite, etc.).
7967
+ * State, province, or region.
8166
7968
  */
8167
- street_line_2: string | null;
7969
+ state: string;
8168
7970
  }
8169
7971
 
8170
- export interface NonUsResidentialAddressResponse {
7972
+ export interface V1NonUsResidentialAddress {
8171
7973
  /**
8172
- * City name.
7974
+ * City or locality.
8173
7975
  */
8174
7976
  city: string;
8175
7977
 
8176
7978
  /**
8177
7979
  * ISO 3166-1 alpha-2 country code.
8178
7980
  */
8179
- country:
7981
+ country_code:
8180
7982
  | 'AF'
8181
7983
  | 'AL'
8182
7984
  | 'DZ'
@@ -8428,19 +8230,24 @@ export namespace AccountHolderClosedWebhookEvent {
8428
8230
  | 'XK';
8429
8231
 
8430
8232
  /**
8431
- * Postal or ZIP code.
8233
+ * Primary street address.
8432
8234
  */
8433
- postal_code: string;
8235
+ line_1: string;
8434
8236
 
8435
8237
  /**
8436
- * 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.
8437
8244
  */
8438
- street_line_1: string;
8245
+ postal_code: string;
8439
8246
 
8440
8247
  /**
8441
- * Secondary street address (apartment, suite, etc.).
8248
+ * State, province, or region, or null if not recorded.
8442
8249
  */
8443
- street_line_2: string | null;
8250
+ state: string | null;
8444
8251
  }
8445
8252
  }
8446
8253
 
@@ -8715,11 +8522,11 @@ export namespace AccountHolderClosedWebhookEvent {
8715
8522
  legal_name: string;
8716
8523
 
8717
8524
  /**
8718
- * 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.
8719
8528
  */
8720
- residential_address:
8721
- | UnionMember1.UsResidentialAddressResponse
8722
- | UnionMember1.NonUsResidentialAddressResponse;
8529
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
8723
8530
 
8724
8531
  /**
8725
8532
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8738,48 +8545,48 @@ export namespace AccountHolderClosedWebhookEvent {
8738
8545
  value: string;
8739
8546
  }
8740
8547
 
8741
- export interface UsResidentialAddressResponse {
8548
+ export interface V1UsResidentialAddress {
8742
8549
  /**
8743
- * City name.
8550
+ * City or locality.
8744
8551
  */
8745
8552
  city: string;
8746
8553
 
8747
8554
  /**
8748
8555
  * ISO 3166-1 alpha-2 country code.
8749
8556
  */
8750
- country: 'US';
8557
+ country_code: 'US';
8751
8558
 
8752
8559
  /**
8753
- * Postal or ZIP code.
8560
+ * Primary street address.
8754
8561
  */
8755
- postal_code: string;
8562
+ line_1: string;
8756
8563
 
8757
8564
  /**
8758
- * Two-letter state code.
8565
+ * Secondary street address, or null if not recorded.
8759
8566
  */
8760
- state: string;
8567
+ line_2: string | null;
8761
8568
 
8762
8569
  /**
8763
- * Primary street address.
8570
+ * Postal or ZIP code.
8764
8571
  */
8765
- street_line_1: string;
8572
+ postal_code: string;
8766
8573
 
8767
8574
  /**
8768
- * Secondary street address (apartment, suite, etc.).
8575
+ * State, province, or region.
8769
8576
  */
8770
- street_line_2: string | null;
8577
+ state: string;
8771
8578
  }
8772
8579
 
8773
- export interface NonUsResidentialAddressResponse {
8580
+ export interface V1NonUsResidentialAddress {
8774
8581
  /**
8775
- * City name.
8582
+ * City or locality.
8776
8583
  */
8777
8584
  city: string;
8778
8585
 
8779
8586
  /**
8780
8587
  * ISO 3166-1 alpha-2 country code.
8781
8588
  */
8782
- country:
8589
+ country_code:
8783
8590
  | 'AF'
8784
8591
  | 'AL'
8785
8592
  | 'DZ'
@@ -9031,64 +8838,69 @@ export namespace AccountHolderClosedWebhookEvent {
9031
8838
  | 'XK';
9032
8839
 
9033
8840
  /**
9034
- * Postal or ZIP code.
8841
+ * Primary street address.
9035
8842
  */
9036
- postal_code: string;
8843
+ line_1: string;
9037
8844
 
9038
8845
  /**
9039
- * 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.
9040
8852
  */
9041
- street_line_1: string;
8853
+ postal_code: string;
9042
8854
 
9043
8855
  /**
9044
- * Secondary street address (apartment, suite, etc.).
8856
+ * State, province, or region, or null if not recorded.
9045
8857
  */
9046
- street_line_2: string | null;
8858
+ state: string | null;
9047
8859
  }
9048
8860
  }
9049
8861
 
9050
- export interface UsResidentialAddressResponse {
8862
+ export interface V1UsResidentialAddress {
9051
8863
  /**
9052
- * City name.
8864
+ * City or locality.
9053
8865
  */
9054
8866
  city: string;
9055
8867
 
9056
8868
  /**
9057
8869
  * ISO 3166-1 alpha-2 country code.
9058
8870
  */
9059
- country: 'US';
8871
+ country_code: 'US';
9060
8872
 
9061
8873
  /**
9062
- * Postal or ZIP code.
8874
+ * Primary street address.
9063
8875
  */
9064
- postal_code: string;
8876
+ line_1: string;
9065
8877
 
9066
8878
  /**
9067
- * Two-letter state code.
8879
+ * Secondary street address, or null if not recorded.
9068
8880
  */
9069
- state: string;
8881
+ line_2: string | null;
9070
8882
 
9071
8883
  /**
9072
- * Primary street address.
8884
+ * Postal or ZIP code.
9073
8885
  */
9074
- street_line_1: string;
8886
+ postal_code: string;
9075
8887
 
9076
8888
  /**
9077
- * Secondary street address (apartment, suite, etc.).
8889
+ * State, province, or region.
9078
8890
  */
9079
- street_line_2: string | null;
8891
+ state: string;
9080
8892
  }
9081
8893
 
9082
- export interface NonUsResidentialAddressResponse {
8894
+ export interface V1NonUsResidentialAddress {
9083
8895
  /**
9084
- * City name.
8896
+ * City or locality.
9085
8897
  */
9086
8898
  city: string;
9087
8899
 
9088
8900
  /**
9089
8901
  * ISO 3166-1 alpha-2 country code.
9090
8902
  */
9091
- country:
8903
+ country_code:
9092
8904
  | 'AF'
9093
8905
  | 'AL'
9094
8906
  | 'DZ'
@@ -9340,63 +9152,68 @@ export namespace AccountHolderClosedWebhookEvent {
9340
9152
  | 'XK';
9341
9153
 
9342
9154
  /**
9343
- * Postal or ZIP code.
9155
+ * Primary street address.
9344
9156
  */
9345
- postal_code: string;
9157
+ line_1: string;
9346
9158
 
9347
9159
  /**
9348
- * 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.
9349
9166
  */
9350
- street_line_1: string;
9167
+ postal_code: string;
9351
9168
 
9352
9169
  /**
9353
- * Secondary street address (apartment, suite, etc.).
9170
+ * State, province, or region, or null if not recorded.
9354
9171
  */
9355
- street_line_2: string | null;
9172
+ state: string | null;
9356
9173
  }
9357
9174
 
9358
- export interface UsResidentialAddressResponse {
9175
+ export interface V1UsResidentialAddress {
9359
9176
  /**
9360
- * City name.
9177
+ * City or locality.
9361
9178
  */
9362
9179
  city: string;
9363
9180
 
9364
9181
  /**
9365
9182
  * ISO 3166-1 alpha-2 country code.
9366
9183
  */
9367
- country: 'US';
9184
+ country_code: 'US';
9368
9185
 
9369
9186
  /**
9370
- * Postal or ZIP code.
9187
+ * Primary street address.
9371
9188
  */
9372
- postal_code: string;
9189
+ line_1: string;
9373
9190
 
9374
9191
  /**
9375
- * Two-letter state code.
9192
+ * Secondary street address, or null if not recorded.
9376
9193
  */
9377
- state: string;
9194
+ line_2: string | null;
9378
9195
 
9379
9196
  /**
9380
- * Primary street address.
9197
+ * Postal or ZIP code.
9381
9198
  */
9382
- street_line_1: string;
9199
+ postal_code: string;
9383
9200
 
9384
9201
  /**
9385
- * Secondary street address (apartment, suite, etc.).
9202
+ * State, province, or region.
9386
9203
  */
9387
- street_line_2: string | null;
9204
+ state: string;
9388
9205
  }
9389
9206
 
9390
- export interface NonUsResidentialAddressResponse {
9207
+ export interface V1NonUsResidentialAddress {
9391
9208
  /**
9392
- * City name.
9209
+ * City or locality.
9393
9210
  */
9394
9211
  city: string;
9395
9212
 
9396
9213
  /**
9397
9214
  * ISO 3166-1 alpha-2 country code.
9398
9215
  */
9399
- country:
9216
+ country_code:
9400
9217
  | 'AF'
9401
9218
  | 'AL'
9402
9219
  | 'DZ'
@@ -9648,28 +9465,33 @@ export namespace AccountHolderClosedWebhookEvent {
9648
9465
  | 'XK';
9649
9466
 
9650
9467
  /**
9651
- * Postal or ZIP code.
9468
+ * Primary street address.
9652
9469
  */
9653
- postal_code: string;
9470
+ line_1: string;
9654
9471
 
9655
9472
  /**
9656
- * 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.
9657
9479
  */
9658
- street_line_1: string;
9480
+ postal_code: string;
9659
9481
 
9660
9482
  /**
9661
- * Secondary street address (apartment, suite, etc.).
9483
+ * State, province, or region, or null if not recorded.
9662
9484
  */
9663
- street_line_2: string | null;
9485
+ state: string | null;
9664
9486
  }
9665
9487
 
9666
- export interface EinIdentification {
9488
+ export interface V1EinIdentification {
9667
9489
  type: 'ein';
9668
9490
 
9669
9491
  value: string;
9670
9492
  }
9671
9493
 
9672
- export interface SsnIdentification {
9494
+ export interface V1SsnIdentification {
9673
9495
  type: 'ssn';
9674
9496
 
9675
9497
  value: string;