@augustusbank/typescript-sdk 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  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 +22 -17
  20. package/resources/account-programs.d.mts.map +1 -1
  21. package/resources/account-programs.d.ts +22 -17
  22. package/resources/account-programs.d.ts.map +1 -1
  23. package/resources/account-programs.js +2 -2
  24. package/resources/account-programs.js.map +1 -1
  25. package/resources/account-programs.mjs +2 -2
  26. package/resources/account-programs.mjs.map +1 -1
  27. package/resources/accounts.d.mts +226 -48
  28. package/resources/accounts.d.mts.map +1 -1
  29. package/resources/accounts.d.ts +226 -48
  30. package/resources/accounts.d.ts.map +1 -1
  31. package/resources/accounts.js +55 -2
  32. package/resources/accounts.js.map +1 -1
  33. package/resources/accounts.mjs +55 -2
  34. package/resources/accounts.mjs.map +1 -1
  35. package/resources/api-keys.d.mts +1 -1
  36. package/resources/api-keys.d.mts.map +1 -1
  37. package/resources/api-keys.d.ts +1 -1
  38. package/resources/api-keys.d.ts.map +1 -1
  39. package/resources/api-versions.d.mts +3 -0
  40. package/resources/api-versions.d.mts.map +1 -1
  41. package/resources/api-versions.d.ts +3 -0
  42. package/resources/api-versions.d.ts.map +1 -1
  43. package/resources/conversions.d.mts +36 -81
  44. package/resources/conversions.d.mts.map +1 -1
  45. package/resources/conversions.d.ts +36 -81
  46. package/resources/conversions.d.ts.map +1 -1
  47. package/resources/conversions.js +25 -1
  48. package/resources/conversions.js.map +1 -1
  49. package/resources/conversions.mjs +25 -1
  50. package/resources/conversions.mjs.map +1 -1
  51. package/resources/counterparties.d.mts +1042 -0
  52. package/resources/counterparties.d.mts.map +1 -0
  53. package/resources/counterparties.d.ts +1042 -0
  54. package/resources/counterparties.d.ts.map +1 -0
  55. package/resources/counterparties.js +45 -0
  56. package/resources/counterparties.js.map +1 -0
  57. package/resources/counterparties.mjs +41 -0
  58. package/resources/counterparties.mjs.map +1 -0
  59. package/resources/deposits.d.mts +48 -186
  60. package/resources/deposits.d.mts.map +1 -1
  61. package/resources/deposits.d.ts +48 -186
  62. package/resources/deposits.d.ts.map +1 -1
  63. package/resources/events.d.mts +3 -3
  64. package/resources/events.d.mts.map +1 -1
  65. package/resources/events.d.ts +3 -3
  66. package/resources/events.d.ts.map +1 -1
  67. package/resources/index.d.mts +5 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +5 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +5 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +2 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/payouts.d.mts +133 -335
  76. package/resources/payouts.d.mts.map +1 -1
  77. package/resources/payouts.d.ts +133 -335
  78. package/resources/payouts.d.ts.map +1 -1
  79. package/resources/payouts.js +25 -0
  80. package/resources/payouts.js.map +1 -1
  81. package/resources/payouts.mjs +25 -0
  82. package/resources/payouts.mjs.map +1 -1
  83. package/resources/quotes/indicative.d.mts +7 -11
  84. package/resources/quotes/indicative.d.mts.map +1 -1
  85. package/resources/quotes/indicative.d.ts +7 -11
  86. package/resources/quotes/indicative.d.ts.map +1 -1
  87. package/resources/quotes/quotes.d.mts +4 -8
  88. package/resources/quotes/quotes.d.mts.map +1 -1
  89. package/resources/quotes/quotes.d.ts +4 -8
  90. package/resources/quotes/quotes.d.ts.map +1 -1
  91. package/resources/quotes/quotes.js.map +1 -1
  92. package/resources/quotes/quotes.mjs.map +1 -1
  93. package/resources/returns.d.mts +84 -39
  94. package/resources/returns.d.mts.map +1 -1
  95. package/resources/returns.d.ts +84 -39
  96. package/resources/returns.d.ts.map +1 -1
  97. package/resources/returns.js +22 -0
  98. package/resources/returns.js.map +1 -1
  99. package/resources/returns.mjs +22 -0
  100. package/resources/returns.mjs.map +1 -1
  101. package/resources/scopes.d.mts +4 -1
  102. package/resources/scopes.d.mts.map +1 -1
  103. package/resources/scopes.d.ts +4 -1
  104. package/resources/scopes.d.ts.map +1 -1
  105. package/resources/simulations/account-programs.d.mts +215 -0
  106. package/resources/simulations/account-programs.d.mts.map +1 -0
  107. package/resources/simulations/account-programs.d.ts +215 -0
  108. package/resources/simulations/account-programs.d.ts.map +1 -0
  109. package/resources/simulations/account-programs.js +96 -0
  110. package/resources/simulations/account-programs.js.map +1 -0
  111. package/resources/simulations/account-programs.mjs +92 -0
  112. package/resources/simulations/account-programs.mjs.map +1 -0
  113. package/resources/simulations/accounts.d.mts +209 -0
  114. package/resources/simulations/accounts.d.mts.map +1 -0
  115. package/resources/simulations/accounts.d.ts +209 -0
  116. package/resources/simulations/accounts.d.ts.map +1 -0
  117. package/resources/simulations/accounts.js +90 -0
  118. package/resources/simulations/accounts.js.map +1 -0
  119. package/resources/simulations/accounts.mjs +86 -0
  120. package/resources/simulations/accounts.mjs.map +1 -0
  121. package/resources/simulations/conversions.d.mts +54 -0
  122. package/resources/simulations/conversions.d.mts.map +1 -0
  123. package/resources/simulations/conversions.d.ts +54 -0
  124. package/resources/simulations/conversions.d.ts.map +1 -0
  125. package/resources/simulations/conversions.js +39 -0
  126. package/resources/simulations/conversions.js.map +1 -0
  127. package/resources/simulations/conversions.mjs +35 -0
  128. package/resources/simulations/conversions.mjs.map +1 -0
  129. package/resources/simulations/deposits.d.mts +202 -0
  130. package/resources/simulations/deposits.d.mts.map +1 -0
  131. package/resources/simulations/deposits.d.ts +202 -0
  132. package/resources/simulations/deposits.d.ts.map +1 -0
  133. package/resources/simulations/deposits.js +25 -0
  134. package/resources/simulations/deposits.js.map +1 -0
  135. package/resources/simulations/deposits.mjs +21 -0
  136. package/resources/simulations/deposits.mjs.map +1 -0
  137. package/resources/simulations/index.d.mts +7 -0
  138. package/resources/simulations/index.d.mts.map +1 -0
  139. package/resources/simulations/index.d.ts +7 -0
  140. package/resources/simulations/index.d.ts.map +1 -0
  141. package/resources/simulations/index.js +17 -0
  142. package/resources/simulations/index.js.map +1 -0
  143. package/resources/simulations/index.mjs +8 -0
  144. package/resources/simulations/index.mjs.map +1 -0
  145. package/resources/simulations/payouts.d.mts +62 -0
  146. package/resources/simulations/payouts.d.mts.map +1 -0
  147. package/resources/simulations/payouts.d.ts +62 -0
  148. package/resources/simulations/payouts.d.ts.map +1 -0
  149. package/resources/simulations/payouts.js +39 -0
  150. package/resources/simulations/payouts.js.map +1 -0
  151. package/resources/simulations/payouts.mjs +35 -0
  152. package/resources/simulations/payouts.mjs.map +1 -0
  153. package/resources/simulations/simulations.d.mts +26 -0
  154. package/resources/simulations/simulations.d.mts.map +1 -0
  155. package/resources/simulations/simulations.d.ts +26 -0
  156. package/resources/simulations/simulations.d.ts.map +1 -0
  157. package/resources/simulations/simulations.js +33 -0
  158. package/resources/simulations/simulations.js.map +1 -0
  159. package/resources/simulations/simulations.mjs +28 -0
  160. package/resources/simulations/simulations.mjs.map +1 -0
  161. package/resources/simulations.d.mts +2 -0
  162. package/resources/simulations.d.mts.map +1 -0
  163. package/resources/simulations.d.ts +2 -0
  164. package/resources/simulations.d.ts.map +1 -0
  165. package/resources/simulations.js +6 -0
  166. package/resources/simulations.js.map +1 -0
  167. package/resources/simulations.mjs +3 -0
  168. package/resources/simulations.mjs.map +1 -0
  169. package/resources/transactions.d.mts +342 -162
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +342 -162
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/webhook-subscriptions.d.mts +61 -11
  174. package/resources/webhook-subscriptions.d.mts.map +1 -1
  175. package/resources/webhook-subscriptions.d.ts +61 -11
  176. package/resources/webhook-subscriptions.d.ts.map +1 -1
  177. package/resources/webhook-subscriptions.js +49 -0
  178. package/resources/webhook-subscriptions.js.map +1 -1
  179. package/resources/webhook-subscriptions.mjs +49 -0
  180. package/resources/webhook-subscriptions.mjs.map +1 -1
  181. package/resources/webhooks.d.mts +976 -978
  182. package/resources/webhooks.d.mts.map +1 -1
  183. package/resources/webhooks.d.ts +976 -978
  184. package/resources/webhooks.d.ts.map +1 -1
  185. package/src/client.ts +48 -8
  186. package/src/resources/account-holders.ts +1701 -1282
  187. package/src/resources/account-programs.ts +30 -19
  188. package/src/resources/accounts.ts +265 -50
  189. package/src/resources/api-keys.ts +3 -0
  190. package/src/resources/api-versions.ts +3 -0
  191. package/src/resources/conversions.ts +36 -93
  192. package/src/resources/counterparties.ts +3127 -0
  193. package/src/resources/deposits.ts +66 -269
  194. package/src/resources/events.ts +18 -12
  195. package/src/resources/index.ts +21 -4
  196. package/src/resources/payouts.ts +204 -439
  197. package/src/resources/quotes/indicative.ts +7 -12
  198. package/src/resources/quotes/quotes.ts +4 -9
  199. package/src/resources/returns.ts +144 -40
  200. package/src/resources/scopes.ts +7 -1
  201. package/src/resources/simulations/account-programs.ts +282 -0
  202. package/src/resources/simulations/accounts.ts +265 -0
  203. package/src/resources/simulations/conversions.ts +70 -0
  204. package/src/resources/simulations/deposits.ts +522 -0
  205. package/src/resources/simulations/index.ts +33 -0
  206. package/src/resources/simulations/payouts.ts +80 -0
  207. package/src/resources/simulations/simulations.ts +92 -0
  208. package/src/resources/simulations.ts +3 -0
  209. package/src/resources/transactions.ts +954 -206
  210. package/src/resources/webhook-subscriptions.ts +102 -36
  211. package/src/resources/webhooks.ts +1283 -1153
  212. package/src/version.ts +1 -1
  213. package/version.d.mts +1 -1
  214. package/version.d.ts +1 -1
  215. package/version.js +1 -1
  216. package/version.mjs +1 -1
@@ -18,7 +18,7 @@ export class Webhooks extends APIResource {
18
18
  }
19
19
  }
20
20
 
21
- export interface PayoutCreatedWebhookEvent {
21
+ export interface PayoutInitiatedWebhookEvent {
22
22
  /**
23
23
  * Unique identifier for the event. Stable across retries.
24
24
  */
@@ -37,15 +37,15 @@ export interface PayoutCreatedWebhookEvent {
37
37
  /**
38
38
  * Full resource snapshot at the time of the event.
39
39
  */
40
- payload: PayoutCreatedWebhookEvent.Payload;
40
+ payload: PayoutInitiatedWebhookEvent.Payload;
41
41
 
42
42
  /**
43
43
  * Event type in resource.action format.
44
44
  */
45
- type: 'payout.created';
45
+ type: 'payout.initiated';
46
46
  }
47
47
 
48
- export namespace PayoutCreatedWebhookEvent {
48
+ export namespace PayoutInitiatedWebhookEvent {
49
49
  /**
50
50
  * Full resource snapshot at the time of the event.
51
51
  */
@@ -55,34 +55,35 @@ export namespace PayoutCreatedWebhookEvent {
55
55
  */
56
56
  id: string;
57
57
 
58
+ /**
59
+ * ID of the account that was debited.
60
+ */
61
+ account_id: string;
62
+
58
63
  /**
59
64
  * Amount as a string decimal (e.g. "100.50").
60
65
  */
61
66
  amount: string;
62
67
 
63
68
  /**
64
- * ISO 8601 UTC timestamp when the payout was created.
69
+ * ID of the counterparty that receives the money.
65
70
  */
66
- created_at: string;
71
+ counterparty_id: string;
67
72
 
68
73
  /**
69
- * Currency code (ISO 4217 currency code or crypto currency code).
74
+ * Currency code (ISO 4217 or crypto).
70
75
  */
71
76
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
72
77
 
73
78
  /**
74
- * Bank account or crypto wallet the payout was sent to.
79
+ * Failure details when status is failed, otherwise null.
75
80
  */
76
- destination:
77
- | Payload.IbanFinancialAddress
78
- | Payload.SortCodeFinancialAddress
79
- | Payload.AbaFinancialAddress
80
- | Payload.CryptoWalletFinancialAddress;
81
+ failure: Payload.Failure | null;
81
82
 
82
83
  /**
83
- * Failure details when status is failed, otherwise null.
84
+ * ISO 8601 UTC timestamp when the payout was initiated.
84
85
  */
85
- failure: Payload.Failure | null;
86
+ initiated_at: string;
86
87
 
87
88
  /**
88
89
  * Key-value pairs stored with the payout.
@@ -90,19 +91,48 @@ export namespace PayoutCreatedWebhookEvent {
90
91
  metadata: { [key: string]: string };
91
92
 
92
93
  /**
93
- * Payment reference.
94
+ * Payment scheme or blockchain used for the payout, or null when unknown.
94
95
  */
95
- reference: string;
96
+ rail:
97
+ | 'sepa'
98
+ | 'sepa_instant'
99
+ | 'faster_payments'
100
+ | 'swift'
101
+ | 'internal'
102
+ | 'target'
103
+ | 'ach'
104
+ | 'fedwire'
105
+ | 'bitcoin'
106
+ | 'bitcoin_testnet4'
107
+ | 'ethereum'
108
+ | 'ethereum_sepolia'
109
+ | 'solana'
110
+ | 'solana_devnet'
111
+ | 'polygon'
112
+ | 'polygon_amoy'
113
+ | null;
96
114
 
97
115
  /**
98
- * ID of the account that was debited.
116
+ * ISO 8601 UTC timestamp when the payout was sent.
99
117
  */
100
- source_account_id: string;
118
+ sent_at: string | null;
101
119
 
102
120
  /**
103
121
  * Current status of the payout.
104
122
  */
105
- status: 'pending' | 'paid' | 'failed' | 'returned';
123
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
124
+
125
+ /**
126
+ * Reference used to track the payment across the payment network, such as the UETR
127
+ * for SWIFT payments.
128
+ */
129
+ tracking_reference: string | null;
130
+
131
+ /**
132
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
133
+ * rails support this field.
134
+ */
135
+ tx_hash: string | null;
106
136
 
107
137
  /**
108
138
  * Resource type discriminator.
@@ -110,103 +140,13 @@ export namespace PayoutCreatedWebhookEvent {
110
140
  type: 'payout';
111
141
 
112
142
  /**
113
- * ISO 8601 UTC timestamp when the payout was last updated.
143
+ * Unstructured remittance information attached to the transfer. Not all rails
144
+ * support this field.
114
145
  */
115
- updated_at: string;
146
+ unstructured_remittance_information: string | null;
116
147
  }
117
148
 
118
149
  export namespace Payload {
119
- export interface IbanFinancialAddress {
120
- /**
121
- * Name of the account holder.
122
- */
123
- account_holder_name: string;
124
-
125
- /**
126
- * Bank Identifier Code, or null if not provided.
127
- */
128
- bic: string | null;
129
-
130
- /**
131
- * International Bank Account Number.
132
- */
133
- iban: string;
134
-
135
- /**
136
- * Discriminator for IBAN financial address.
137
- */
138
- type: 'iban';
139
- }
140
-
141
- export interface SortCodeFinancialAddress {
142
- /**
143
- * Name of the account holder.
144
- */
145
- account_holder_name: string;
146
-
147
- /**
148
- * UK account number (8 digits).
149
- */
150
- account_number: string;
151
-
152
- /**
153
- * UK sort code (6 digits).
154
- */
155
- sort_code: string;
156
-
157
- /**
158
- * Discriminator for UK sort code financial address.
159
- */
160
- type: 'sort_code';
161
- }
162
-
163
- export interface AbaFinancialAddress {
164
- /**
165
- * Name of the account holder.
166
- */
167
- account_holder_name: string;
168
-
169
- /**
170
- * Bank account number.
171
- */
172
- account_number: string;
173
-
174
- /**
175
- * ABA routing number (9 digits).
176
- */
177
- routing_number: string;
178
-
179
- /**
180
- * Discriminator for ABA wire financial address.
181
- */
182
- type: 'aba';
183
- }
184
-
185
- export interface CryptoWalletFinancialAddress {
186
- /**
187
- * Wallet address on the specified blockchain.
188
- */
189
- address: string;
190
-
191
- /**
192
- * Blockchain network for the crypto wallet.
193
- */
194
- blockchain:
195
- | 'bitcoin'
196
- | 'ethereum'
197
- | 'solana'
198
- | 'polygon'
199
- | 'bitcoin_testnet4'
200
- | 'ethereum_sepolia'
201
- | 'solana_devnet'
202
- | 'polygon_amoy';
203
-
204
- /**
205
- * Discriminator for crypto wallet financial address.
206
- */
207
- type: 'crypto_wallet';
208
- }
209
-
210
150
  /**
211
151
  * Failure details when status is failed, otherwise null.
212
152
  */
@@ -219,6 +159,7 @@ export namespace PayoutCreatedWebhookEvent {
219
159
  | 'account_blocked'
220
160
  | 'insufficient_funds'
221
161
  | 'invalid_account_format'
162
+ | 'invalid_routing_number'
222
163
  | 'invalid_instruction'
223
164
  | 'invalid_amount'
224
165
  | 'invalid_time'
@@ -243,7 +184,7 @@ export namespace PayoutCreatedWebhookEvent {
243
184
  }
244
185
  }
245
186
 
246
- export interface PayoutInitiatedWebhookEvent {
187
+ export interface PayoutSubmittedWebhookEvent {
247
188
  /**
248
189
  * Unique identifier for the event. Stable across retries.
249
190
  */
@@ -262,15 +203,15 @@ export interface PayoutInitiatedWebhookEvent {
262
203
  /**
263
204
  * Full resource snapshot at the time of the event.
264
205
  */
265
- payload: PayoutInitiatedWebhookEvent.Payload;
206
+ payload: PayoutSubmittedWebhookEvent.Payload;
266
207
 
267
208
  /**
268
209
  * Event type in resource.action format.
269
210
  */
270
- type: 'payout.initiated';
211
+ type: 'payout.submitted';
271
212
  }
272
213
 
273
- export namespace PayoutInitiatedWebhookEvent {
214
+ export namespace PayoutSubmittedWebhookEvent {
274
215
  /**
275
216
  * Full resource snapshot at the time of the event.
276
217
  */
@@ -280,34 +221,35 @@ export namespace PayoutInitiatedWebhookEvent {
280
221
  */
281
222
  id: string;
282
223
 
224
+ /**
225
+ * ID of the account that was debited.
226
+ */
227
+ account_id: string;
228
+
283
229
  /**
284
230
  * Amount as a string decimal (e.g. "100.50").
285
231
  */
286
232
  amount: string;
287
233
 
288
234
  /**
289
- * ISO 8601 UTC timestamp when the payout was created.
235
+ * ID of the counterparty that receives the money.
290
236
  */
291
- created_at: string;
237
+ counterparty_id: string;
292
238
 
293
239
  /**
294
- * Currency code (ISO 4217 currency code or crypto currency code).
240
+ * Currency code (ISO 4217 or crypto).
295
241
  */
296
242
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
297
243
 
298
244
  /**
299
- * Bank account or crypto wallet the payout was sent to.
245
+ * Failure details when status is failed, otherwise null.
300
246
  */
301
- destination:
302
- | Payload.IbanFinancialAddress
303
- | Payload.SortCodeFinancialAddress
304
- | Payload.AbaFinancialAddress
305
- | Payload.CryptoWalletFinancialAddress;
247
+ failure: Payload.Failure | null;
306
248
 
307
249
  /**
308
- * Failure details when status is failed, otherwise null.
250
+ * ISO 8601 UTC timestamp when the payout was initiated.
309
251
  */
310
- failure: Payload.Failure | null;
252
+ initiated_at: string;
311
253
 
312
254
  /**
313
255
  * Key-value pairs stored with the payout.
@@ -315,19 +257,48 @@ export namespace PayoutInitiatedWebhookEvent {
315
257
  metadata: { [key: string]: string };
316
258
 
317
259
  /**
318
- * Payment reference.
260
+ * Payment scheme or blockchain used for the payout, or null when unknown.
319
261
  */
320
- reference: string;
262
+ rail:
263
+ | 'sepa'
264
+ | 'sepa_instant'
265
+ | 'faster_payments'
266
+ | 'swift'
267
+ | 'internal'
268
+ | 'target'
269
+ | 'ach'
270
+ | 'fedwire'
271
+ | 'bitcoin'
272
+ | 'bitcoin_testnet4'
273
+ | 'ethereum'
274
+ | 'ethereum_sepolia'
275
+ | 'solana'
276
+ | 'solana_devnet'
277
+ | 'polygon'
278
+ | 'polygon_amoy'
279
+ | null;
321
280
 
322
281
  /**
323
- * ID of the account that was debited.
282
+ * ISO 8601 UTC timestamp when the payout was sent.
324
283
  */
325
- source_account_id: string;
284
+ sent_at: string | null;
326
285
 
327
286
  /**
328
287
  * Current status of the payout.
329
288
  */
330
- status: 'pending' | 'paid' | 'failed' | 'returned';
289
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
290
+
291
+ /**
292
+ * Reference used to track the payment across the payment network, such as the UETR
293
+ * for SWIFT payments.
294
+ */
295
+ tracking_reference: string | null;
296
+
297
+ /**
298
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
299
+ * rails support this field.
300
+ */
301
+ tx_hash: string | null;
331
302
 
332
303
  /**
333
304
  * Resource type discriminator.
@@ -335,103 +306,13 @@ export namespace PayoutInitiatedWebhookEvent {
335
306
  type: 'payout';
336
307
 
337
308
  /**
338
- * ISO 8601 UTC timestamp when the payout was last updated.
309
+ * Unstructured remittance information attached to the transfer. Not all rails
310
+ * support this field.
339
311
  */
340
- updated_at: string;
312
+ unstructured_remittance_information: string | null;
341
313
  }
342
314
 
343
315
  export namespace Payload {
344
- export interface IbanFinancialAddress {
345
- /**
346
- * Name of the account holder.
347
- */
348
- account_holder_name: string;
349
-
350
- /**
351
- * Bank Identifier Code, or null if not provided.
352
- */
353
- bic: string | null;
354
-
355
- /**
356
- * International Bank Account Number.
357
- */
358
- iban: string;
359
-
360
- /**
361
- * Discriminator for IBAN financial address.
362
- */
363
- type: 'iban';
364
- }
365
-
366
- export interface SortCodeFinancialAddress {
367
- /**
368
- * Name of the account holder.
369
- */
370
- account_holder_name: string;
371
-
372
- /**
373
- * UK account number (8 digits).
374
- */
375
- account_number: string;
376
-
377
- /**
378
- * UK sort code (6 digits).
379
- */
380
- sort_code: string;
381
-
382
- /**
383
- * Discriminator for UK sort code financial address.
384
- */
385
- type: 'sort_code';
386
- }
387
-
388
- export interface AbaFinancialAddress {
389
- /**
390
- * Name of the account holder.
391
- */
392
- account_holder_name: string;
393
-
394
- /**
395
- * Bank account number.
396
- */
397
- account_number: string;
398
-
399
- /**
400
- * ABA routing number (9 digits).
401
- */
402
- routing_number: string;
403
-
404
- /**
405
- * Discriminator for ABA wire financial address.
406
- */
407
- type: 'aba';
408
- }
409
-
410
- export interface CryptoWalletFinancialAddress {
411
- /**
412
- * Wallet address on the specified blockchain.
413
- */
414
- address: string;
415
-
416
- /**
417
- * Blockchain network for the crypto wallet.
418
- */
419
- blockchain:
420
- | 'bitcoin'
421
- | 'ethereum'
422
- | 'solana'
423
- | 'polygon'
424
- | 'bitcoin_testnet4'
425
- | 'ethereum_sepolia'
426
- | 'solana_devnet'
427
- | 'polygon_amoy';
428
-
429
- /**
430
- * Discriminator for crypto wallet financial address.
431
- */
432
- type: 'crypto_wallet';
433
- }
434
-
435
316
  /**
436
317
  * Failure details when status is failed, otherwise null.
437
318
  */
@@ -444,6 +325,7 @@ export namespace PayoutInitiatedWebhookEvent {
444
325
  | 'account_blocked'
445
326
  | 'insufficient_funds'
446
327
  | 'invalid_account_format'
328
+ | 'invalid_routing_number'
447
329
  | 'invalid_instruction'
448
330
  | 'invalid_amount'
449
331
  | 'invalid_time'
@@ -468,7 +350,7 @@ export namespace PayoutInitiatedWebhookEvent {
468
350
  }
469
351
  }
470
352
 
471
- export interface PayoutPaidWebhookEvent {
353
+ export interface PayoutSentWebhookEvent {
472
354
  /**
473
355
  * Unique identifier for the event. Stable across retries.
474
356
  */
@@ -487,15 +369,15 @@ export interface PayoutPaidWebhookEvent {
487
369
  /**
488
370
  * Full resource snapshot at the time of the event.
489
371
  */
490
- payload: PayoutPaidWebhookEvent.Payload;
372
+ payload: PayoutSentWebhookEvent.Payload;
491
373
 
492
374
  /**
493
375
  * Event type in resource.action format.
494
376
  */
495
- type: 'payout.paid';
377
+ type: 'payout.sent';
496
378
  }
497
379
 
498
- export namespace PayoutPaidWebhookEvent {
380
+ export namespace PayoutSentWebhookEvent {
499
381
  /**
500
382
  * Full resource snapshot at the time of the event.
501
383
  */
@@ -505,34 +387,35 @@ export namespace PayoutPaidWebhookEvent {
505
387
  */
506
388
  id: string;
507
389
 
390
+ /**
391
+ * ID of the account that was debited.
392
+ */
393
+ account_id: string;
394
+
508
395
  /**
509
396
  * Amount as a string decimal (e.g. "100.50").
510
397
  */
511
398
  amount: string;
512
399
 
513
400
  /**
514
- * ISO 8601 UTC timestamp when the payout was created.
401
+ * ID of the counterparty that receives the money.
515
402
  */
516
- created_at: string;
403
+ counterparty_id: string;
517
404
 
518
405
  /**
519
- * Currency code (ISO 4217 currency code or crypto currency code).
406
+ * Currency code (ISO 4217 or crypto).
520
407
  */
521
408
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
522
409
 
523
410
  /**
524
- * Bank account or crypto wallet the payout was sent to.
411
+ * Failure details when status is failed, otherwise null.
525
412
  */
526
- destination:
527
- | Payload.IbanFinancialAddress
528
- | Payload.SortCodeFinancialAddress
529
- | Payload.AbaFinancialAddress
530
- | Payload.CryptoWalletFinancialAddress;
413
+ failure: Payload.Failure | null;
531
414
 
532
415
  /**
533
- * Failure details when status is failed, otherwise null.
416
+ * ISO 8601 UTC timestamp when the payout was initiated.
534
417
  */
535
- failure: Payload.Failure | null;
418
+ initiated_at: string;
536
419
 
537
420
  /**
538
421
  * Key-value pairs stored with the payout.
@@ -540,19 +423,48 @@ export namespace PayoutPaidWebhookEvent {
540
423
  metadata: { [key: string]: string };
541
424
 
542
425
  /**
543
- * Payment reference.
426
+ * Payment scheme or blockchain used for the payout, or null when unknown.
544
427
  */
545
- reference: string;
428
+ rail:
429
+ | 'sepa'
430
+ | 'sepa_instant'
431
+ | 'faster_payments'
432
+ | 'swift'
433
+ | 'internal'
434
+ | 'target'
435
+ | 'ach'
436
+ | 'fedwire'
437
+ | 'bitcoin'
438
+ | 'bitcoin_testnet4'
439
+ | 'ethereum'
440
+ | 'ethereum_sepolia'
441
+ | 'solana'
442
+ | 'solana_devnet'
443
+ | 'polygon'
444
+ | 'polygon_amoy'
445
+ | null;
546
446
 
547
447
  /**
548
- * ID of the account that was debited.
448
+ * ISO 8601 UTC timestamp when the payout was sent.
549
449
  */
550
- source_account_id: string;
450
+ sent_at: string | null;
551
451
 
552
452
  /**
553
453
  * Current status of the payout.
554
454
  */
555
- status: 'pending' | 'paid' | 'failed' | 'returned';
455
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
456
+
457
+ /**
458
+ * Reference used to track the payment across the payment network, such as the UETR
459
+ * for SWIFT payments.
460
+ */
461
+ tracking_reference: string | null;
462
+
463
+ /**
464
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
465
+ * rails support this field.
466
+ */
467
+ tx_hash: string | null;
556
468
 
557
469
  /**
558
470
  * Resource type discriminator.
@@ -560,103 +472,13 @@ export namespace PayoutPaidWebhookEvent {
560
472
  type: 'payout';
561
473
 
562
474
  /**
563
- * ISO 8601 UTC timestamp when the payout was last updated.
475
+ * Unstructured remittance information attached to the transfer. Not all rails
476
+ * support this field.
564
477
  */
565
- updated_at: string;
478
+ unstructured_remittance_information: string | null;
566
479
  }
567
480
 
568
481
  export namespace Payload {
569
- export interface IbanFinancialAddress {
570
- /**
571
- * Name of the account holder.
572
- */
573
- account_holder_name: string;
574
-
575
- /**
576
- * Bank Identifier Code, or null if not provided.
577
- */
578
- bic: string | null;
579
-
580
- /**
581
- * International Bank Account Number.
582
- */
583
- iban: string;
584
-
585
- /**
586
- * Discriminator for IBAN financial address.
587
- */
588
- type: 'iban';
589
- }
590
-
591
- export interface SortCodeFinancialAddress {
592
- /**
593
- * Name of the account holder.
594
- */
595
- account_holder_name: string;
596
-
597
- /**
598
- * UK account number (8 digits).
599
- */
600
- account_number: string;
601
-
602
- /**
603
- * UK sort code (6 digits).
604
- */
605
- sort_code: string;
606
-
607
- /**
608
- * Discriminator for UK sort code financial address.
609
- */
610
- type: 'sort_code';
611
- }
612
-
613
- export interface AbaFinancialAddress {
614
- /**
615
- * Name of the account holder.
616
- */
617
- account_holder_name: string;
618
-
619
- /**
620
- * Bank account number.
621
- */
622
- account_number: string;
623
-
624
- /**
625
- * ABA routing number (9 digits).
626
- */
627
- routing_number: string;
628
-
629
- /**
630
- * Discriminator for ABA wire financial address.
631
- */
632
- type: 'aba';
633
- }
634
-
635
- export interface CryptoWalletFinancialAddress {
636
- /**
637
- * Wallet address on the specified blockchain.
638
- */
639
- address: string;
640
-
641
- /**
642
- * Blockchain network for the crypto wallet.
643
- */
644
- blockchain:
645
- | 'bitcoin'
646
- | 'ethereum'
647
- | 'solana'
648
- | 'polygon'
649
- | 'bitcoin_testnet4'
650
- | 'ethereum_sepolia'
651
- | 'solana_devnet'
652
- | 'polygon_amoy';
653
-
654
- /**
655
- * Discriminator for crypto wallet financial address.
656
- */
657
- type: 'crypto_wallet';
658
- }
659
-
660
482
  /**
661
483
  * Failure details when status is failed, otherwise null.
662
484
  */
@@ -669,6 +491,7 @@ export namespace PayoutPaidWebhookEvent {
669
491
  | 'account_blocked'
670
492
  | 'insufficient_funds'
671
493
  | 'invalid_account_format'
494
+ | 'invalid_routing_number'
672
495
  | 'invalid_instruction'
673
496
  | 'invalid_amount'
674
497
  | 'invalid_time'
@@ -731,28 +554,24 @@ export namespace PayoutFailedWebhookEvent {
731
554
  id: string;
732
555
 
733
556
  /**
734
- * Amount as a string decimal (e.g. "100.50").
557
+ * ID of the account that was debited.
735
558
  */
736
- amount: string;
559
+ account_id: string;
737
560
 
738
561
  /**
739
- * ISO 8601 UTC timestamp when the payout was created.
562
+ * Amount as a string decimal (e.g. "100.50").
740
563
  */
741
- created_at: string;
564
+ amount: string;
742
565
 
743
566
  /**
744
- * Currency code (ISO 4217 currency code or crypto currency code).
567
+ * ID of the counterparty that receives the money.
745
568
  */
746
- currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
569
+ counterparty_id: string;
747
570
 
748
571
  /**
749
- * Bank account or crypto wallet the payout was sent to.
572
+ * Currency code (ISO 4217 or crypto).
750
573
  */
751
- destination:
752
- | Payload.IbanFinancialAddress
753
- | Payload.SortCodeFinancialAddress
754
- | Payload.AbaFinancialAddress
755
- | Payload.CryptoWalletFinancialAddress;
574
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
756
575
 
757
576
  /**
758
577
  * Failure details when status is failed, otherwise null.
@@ -760,24 +579,58 @@ export namespace PayoutFailedWebhookEvent {
760
579
  failure: Payload.Failure | null;
761
580
 
762
581
  /**
763
- * Key-value pairs stored with the payout.
764
- */
765
- metadata: { [key: string]: string };
766
-
767
- /**
768
- * Payment reference.
582
+ * ISO 8601 UTC timestamp when the payout was initiated.
769
583
  */
770
- reference: string;
584
+ initiated_at: string;
771
585
 
772
586
  /**
773
- * ID of the account that was debited.
587
+ * Key-value pairs stored with the payout.
774
588
  */
775
- source_account_id: string;
589
+ metadata: { [key: string]: string };
776
590
 
777
591
  /**
778
- * Current status of the payout.
592
+ * Payment scheme or blockchain used for the payout, or null when unknown.
779
593
  */
780
- status: 'pending' | 'paid' | 'failed' | 'returned';
594
+ rail:
595
+ | 'sepa'
596
+ | 'sepa_instant'
597
+ | 'faster_payments'
598
+ | 'swift'
599
+ | 'internal'
600
+ | 'target'
601
+ | 'ach'
602
+ | 'fedwire'
603
+ | 'bitcoin'
604
+ | 'bitcoin_testnet4'
605
+ | 'ethereum'
606
+ | 'ethereum_sepolia'
607
+ | 'solana'
608
+ | 'solana_devnet'
609
+ | 'polygon'
610
+ | 'polygon_amoy'
611
+ | null;
612
+
613
+ /**
614
+ * ISO 8601 UTC timestamp when the payout was sent.
615
+ */
616
+ sent_at: string | null;
617
+
618
+ /**
619
+ * Current status of the payout.
620
+ */
621
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
622
+
623
+ /**
624
+ * Reference used to track the payment across the payment network, such as the UETR
625
+ * for SWIFT payments.
626
+ */
627
+ tracking_reference: string | null;
628
+
629
+ /**
630
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
631
+ * rails support this field.
632
+ */
633
+ tx_hash: string | null;
781
634
 
782
635
  /**
783
636
  * Resource type discriminator.
@@ -785,103 +638,179 @@ export namespace PayoutFailedWebhookEvent {
785
638
  type: 'payout';
786
639
 
787
640
  /**
788
- * ISO 8601 UTC timestamp when the payout was last updated.
641
+ * Unstructured remittance information attached to the transfer. Not all rails
642
+ * support this field.
789
643
  */
790
- updated_at: string;
644
+ unstructured_remittance_information: string | null;
791
645
  }
792
646
 
793
647
  export namespace Payload {
794
- export interface IbanFinancialAddress {
795
- /**
796
- * Name of the account holder.
797
- */
798
- account_holder_name: string;
799
-
648
+ /**
649
+ * Failure details when status is failed, otherwise null.
650
+ */
651
+ export interface Failure {
800
652
  /**
801
- * Bank Identifier Code, or null if not provided.
653
+ * Failure code.
802
654
  */
803
- bic: string | null;
655
+ code:
656
+ | 'account_closed'
657
+ | 'account_blocked'
658
+ | 'insufficient_funds'
659
+ | 'invalid_account_format'
660
+ | 'invalid_routing_number'
661
+ | 'invalid_instruction'
662
+ | 'invalid_amount'
663
+ | 'invalid_time'
664
+ | 'duplicate_transaction'
665
+ | 'payee_verification_failed'
666
+ | 'system_error'
667
+ | 'provider_system_error'
668
+ | 'rejected_by_correspondent_bank'
669
+ | 'blocked_by_review'
670
+ | 'unknown';
804
671
 
805
672
  /**
806
- * International Bank Account Number.
673
+ * Human-readable description of the failure.
807
674
  */
808
- iban: string;
675
+ message: string;
809
676
 
810
677
  /**
811
- * Discriminator for IBAN financial address.
678
+ * Whether the payout can be retried.
812
679
  */
813
- type: 'iban';
680
+ retry: boolean;
814
681
  }
682
+ }
683
+ }
815
684
 
816
- export interface SortCodeFinancialAddress {
817
- /**
818
- * Name of the account holder.
819
- */
820
- account_holder_name: string;
685
+ export interface PayoutReturnedWebhookEvent {
686
+ /**
687
+ * Unique identifier for the event. Stable across retries.
688
+ */
689
+ id: string;
821
690
 
822
- /**
823
- * UK account number (8 digits).
824
- */
825
- account_number: string;
691
+ /**
692
+ * API version the payload was rendered at. Stable across retries and redeliveries.
693
+ */
694
+ api_version: string;
826
695
 
827
- /**
828
- * UK sort code (6 digits).
829
- */
830
- sort_code: string;
696
+ /**
697
+ * ISO 8601 UTC timestamp when the event was created.
698
+ */
699
+ date: string;
831
700
 
832
- /**
833
- * Discriminator for UK sort code financial address.
834
- */
835
- type: 'sort_code';
836
- }
701
+ /**
702
+ * Full resource snapshot at the time of the event.
703
+ */
704
+ payload: PayoutReturnedWebhookEvent.Payload;
837
705
 
838
- export interface AbaFinancialAddress {
839
- /**
840
- * Name of the account holder.
841
- */
842
- account_holder_name: string;
706
+ /**
707
+ * Event type in resource.action format.
708
+ */
709
+ type: 'payout.returned';
710
+ }
843
711
 
844
- /**
845
- * Bank account number.
846
- */
847
- account_number: string;
712
+ export namespace PayoutReturnedWebhookEvent {
713
+ /**
714
+ * Full resource snapshot at the time of the event.
715
+ */
716
+ export interface Payload {
717
+ /**
718
+ * Unique identifier of the payout.
719
+ */
720
+ id: string;
848
721
 
849
- /**
850
- * ABA routing number (9 digits).
851
- */
852
- routing_number: string;
722
+ /**
723
+ * ID of the account that was debited.
724
+ */
725
+ account_id: string;
853
726
 
854
- /**
855
- * Discriminator for ABA wire financial address.
856
- */
857
- type: 'aba';
858
- }
727
+ /**
728
+ * Amount as a string decimal (e.g. "100.50").
729
+ */
730
+ amount: string;
859
731
 
860
- export interface CryptoWalletFinancialAddress {
861
- /**
862
- * Wallet address on the specified blockchain.
863
- */
864
- address: string;
732
+ /**
733
+ * ID of the counterparty that receives the money.
734
+ */
735
+ counterparty_id: string;
865
736
 
866
- /**
867
- * Blockchain network for the crypto wallet.
868
- */
869
- blockchain:
870
- | 'bitcoin'
871
- | 'ethereum'
872
- | 'solana'
873
- | 'polygon'
874
- | 'bitcoin_testnet4'
875
- | 'ethereum_sepolia'
876
- | 'solana_devnet'
877
- | 'polygon_amoy';
737
+ /**
738
+ * Currency code (ISO 4217 or crypto).
739
+ */
740
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
878
741
 
879
- /**
880
- * Discriminator for crypto wallet financial address.
881
- */
882
- type: 'crypto_wallet';
883
- }
742
+ /**
743
+ * Failure details when status is failed, otherwise null.
744
+ */
745
+ failure: Payload.Failure | null;
746
+
747
+ /**
748
+ * ISO 8601 UTC timestamp when the payout was initiated.
749
+ */
750
+ initiated_at: string;
751
+
752
+ /**
753
+ * Key-value pairs stored with the payout.
754
+ */
755
+ metadata: { [key: string]: string };
756
+
757
+ /**
758
+ * Payment scheme or blockchain used for the payout, or null when unknown.
759
+ */
760
+ rail:
761
+ | 'sepa'
762
+ | 'sepa_instant'
763
+ | 'faster_payments'
764
+ | 'swift'
765
+ | 'internal'
766
+ | 'target'
767
+ | 'ach'
768
+ | 'fedwire'
769
+ | 'bitcoin'
770
+ | 'bitcoin_testnet4'
771
+ | 'ethereum'
772
+ | 'ethereum_sepolia'
773
+ | 'solana'
774
+ | 'solana_devnet'
775
+ | 'polygon'
776
+ | 'polygon_amoy'
777
+ | null;
884
778
 
779
+ /**
780
+ * ISO 8601 UTC timestamp when the payout was sent.
781
+ */
782
+ sent_at: string | null;
783
+
784
+ /**
785
+ * Current status of the payout.
786
+ */
787
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
788
+
789
+ /**
790
+ * Reference used to track the payment across the payment network, such as the UETR
791
+ * for SWIFT payments.
792
+ */
793
+ tracking_reference: string | null;
794
+
795
+ /**
796
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
797
+ * rails support this field.
798
+ */
799
+ tx_hash: string | null;
800
+
801
+ /**
802
+ * Resource type discriminator.
803
+ */
804
+ type: 'payout';
805
+
806
+ /**
807
+ * Unstructured remittance information attached to the transfer. Not all rails
808
+ * support this field.
809
+ */
810
+ unstructured_remittance_information: string | null;
811
+ }
812
+
813
+ export namespace Payload {
885
814
  /**
886
815
  * Failure details when status is failed, otherwise null.
887
816
  */
@@ -894,6 +823,7 @@ export namespace PayoutFailedWebhookEvent {
894
823
  | 'account_blocked'
895
824
  | 'insufficient_funds'
896
825
  | 'invalid_account_format'
826
+ | 'invalid_routing_number'
897
827
  | 'invalid_instruction'
898
828
  | 'invalid_amount'
899
829
  | 'invalid_time'
@@ -961,12 +891,151 @@ export namespace ReturnInitiatedWebhookEvent {
961
891
  amount: string;
962
892
 
963
893
  /**
964
- * ISO 8601 UTC timestamp when the return was created.
894
+ * Currency code (ISO 4217 or crypto).
965
895
  */
966
- created_at: string;
896
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
897
+
898
+ /**
899
+ * ID of the parent deposit.
900
+ */
901
+ deposit_id: string;
902
+
903
+ /**
904
+ * Failure details when status is failed, otherwise null.
905
+ */
906
+ failure: Payload.Failure | null;
907
+
908
+ /**
909
+ * ISO 8601 UTC timestamp when the return was initiated.
910
+ */
911
+ initiated_at: string;
912
+
913
+ /**
914
+ * Payment scheme or blockchain used for the return, or null when unknown.
915
+ */
916
+ rail:
917
+ | 'sepa'
918
+ | 'sepa_instant'
919
+ | 'faster_payments'
920
+ | 'swift'
921
+ | 'internal'
922
+ | 'target'
923
+ | 'ach'
924
+ | 'fedwire'
925
+ | 'bitcoin'
926
+ | 'bitcoin_testnet4'
927
+ | 'ethereum'
928
+ | 'ethereum_sepolia'
929
+ | 'solana'
930
+ | 'solana_devnet'
931
+ | 'polygon'
932
+ | 'polygon_amoy'
933
+ | null;
934
+
935
+ /**
936
+ * ISO 8601 UTC timestamp when the return was sent.
937
+ */
938
+ sent_at: string | null;
939
+
940
+ /**
941
+ * Current status of the return.
942
+ */
943
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
944
+
945
+ /**
946
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
947
+ * rails support this field.
948
+ */
949
+ tx_hash: string | null;
950
+
951
+ /**
952
+ * Resource type discriminator.
953
+ */
954
+ type: 'return';
955
+ }
967
956
 
957
+ export namespace Payload {
968
958
  /**
969
- * Currency code (ISO 4217 currency code or crypto currency code).
959
+ * Failure details when status is failed, otherwise null.
960
+ */
961
+ export interface Failure {
962
+ /**
963
+ * Failure code.
964
+ */
965
+ code:
966
+ | 'account_closed'
967
+ | 'account_blocked'
968
+ | 'insufficient_funds'
969
+ | 'invalid_account_format'
970
+ | 'invalid_routing_number'
971
+ | 'invalid_instruction'
972
+ | 'invalid_amount'
973
+ | 'invalid_time'
974
+ | 'duplicate_transaction'
975
+ | 'payee_verification_failed'
976
+ | 'system_error'
977
+ | 'provider_system_error'
978
+ | 'rejected_by_correspondent_bank'
979
+ | 'blocked_by_review'
980
+ | 'unknown';
981
+
982
+ /**
983
+ * Human-readable description of the failure.
984
+ */
985
+ message: string;
986
+
987
+ /**
988
+ * Whether the return can be retried.
989
+ */
990
+ retry: boolean;
991
+ }
992
+ }
993
+ }
994
+
995
+ export interface ReturnSubmittedWebhookEvent {
996
+ /**
997
+ * Unique identifier for the event. Stable across retries.
998
+ */
999
+ id: string;
1000
+
1001
+ /**
1002
+ * API version the payload was rendered at. Stable across retries and redeliveries.
1003
+ */
1004
+ api_version: string;
1005
+
1006
+ /**
1007
+ * ISO 8601 UTC timestamp when the event was created.
1008
+ */
1009
+ date: string;
1010
+
1011
+ /**
1012
+ * Full resource snapshot at the time of the event.
1013
+ */
1014
+ payload: ReturnSubmittedWebhookEvent.Payload;
1015
+
1016
+ /**
1017
+ * Event type in resource.action format.
1018
+ */
1019
+ type: 'return.submitted';
1020
+ }
1021
+
1022
+ export namespace ReturnSubmittedWebhookEvent {
1023
+ /**
1024
+ * Full resource snapshot at the time of the event.
1025
+ */
1026
+ export interface Payload {
1027
+ /**
1028
+ * Unique identifier of the return.
1029
+ */
1030
+ id: string;
1031
+
1032
+ /**
1033
+ * Amount as a string decimal (e.g. "100.50").
1034
+ */
1035
+ amount: string;
1036
+
1037
+ /**
1038
+ * Currency code (ISO 4217 or crypto).
970
1039
  */
971
1040
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
972
1041
 
@@ -976,24 +1045,57 @@ export namespace ReturnInitiatedWebhookEvent {
976
1045
  deposit_id: string;
977
1046
 
978
1047
  /**
979
- * Failure details when status is failed, otherwise null.
1048
+ * Failure details when status is failed, otherwise null.
1049
+ */
1050
+ failure: Payload.Failure | null;
1051
+
1052
+ /**
1053
+ * ISO 8601 UTC timestamp when the return was initiated.
1054
+ */
1055
+ initiated_at: string;
1056
+
1057
+ /**
1058
+ * Payment scheme or blockchain used for the return, or null when unknown.
1059
+ */
1060
+ rail:
1061
+ | 'sepa'
1062
+ | 'sepa_instant'
1063
+ | 'faster_payments'
1064
+ | 'swift'
1065
+ | 'internal'
1066
+ | 'target'
1067
+ | 'ach'
1068
+ | 'fedwire'
1069
+ | 'bitcoin'
1070
+ | 'bitcoin_testnet4'
1071
+ | 'ethereum'
1072
+ | 'ethereum_sepolia'
1073
+ | 'solana'
1074
+ | 'solana_devnet'
1075
+ | 'polygon'
1076
+ | 'polygon_amoy'
1077
+ | null;
1078
+
1079
+ /**
1080
+ * ISO 8601 UTC timestamp when the return was sent.
980
1081
  */
981
- failure: Payload.Failure | null;
1082
+ sent_at: string | null;
982
1083
 
983
1084
  /**
984
1085
  * Current status of the return.
985
1086
  */
986
- status: 'pending' | 'paid' | 'failed' | 'returned';
1087
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
987
1088
 
988
1089
  /**
989
- * Type of the resource.
1090
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1091
+ * rails support this field.
990
1092
  */
991
- type: 'return';
1093
+ tx_hash: string | null;
992
1094
 
993
1095
  /**
994
- * ISO 8601 UTC timestamp when the return was last updated.
1096
+ * Resource type discriminator.
995
1097
  */
996
- updated_at: string;
1098
+ type: 'return';
997
1099
  }
998
1100
 
999
1101
  export namespace Payload {
@@ -1009,6 +1111,7 @@ export namespace ReturnInitiatedWebhookEvent {
1009
1111
  | 'account_blocked'
1010
1112
  | 'insufficient_funds'
1011
1113
  | 'invalid_account_format'
1114
+ | 'invalid_routing_number'
1012
1115
  | 'invalid_instruction'
1013
1116
  | 'invalid_amount'
1014
1117
  | 'invalid_time'
@@ -1033,7 +1136,7 @@ export namespace ReturnInitiatedWebhookEvent {
1033
1136
  }
1034
1137
  }
1035
1138
 
1036
- export interface ReturnPaidWebhookEvent {
1139
+ export interface ReturnSentWebhookEvent {
1037
1140
  /**
1038
1141
  * Unique identifier for the event. Stable across retries.
1039
1142
  */
@@ -1052,15 +1155,15 @@ export interface ReturnPaidWebhookEvent {
1052
1155
  /**
1053
1156
  * Full resource snapshot at the time of the event.
1054
1157
  */
1055
- payload: ReturnPaidWebhookEvent.Payload;
1158
+ payload: ReturnSentWebhookEvent.Payload;
1056
1159
 
1057
1160
  /**
1058
1161
  * Event type in resource.action format.
1059
1162
  */
1060
- type: 'return.paid';
1163
+ type: 'return.sent';
1061
1164
  }
1062
1165
 
1063
- export namespace ReturnPaidWebhookEvent {
1166
+ export namespace ReturnSentWebhookEvent {
1064
1167
  /**
1065
1168
  * Full resource snapshot at the time of the event.
1066
1169
  */
@@ -1076,12 +1179,7 @@ export namespace ReturnPaidWebhookEvent {
1076
1179
  amount: string;
1077
1180
 
1078
1181
  /**
1079
- * ISO 8601 UTC timestamp when the return was created.
1080
- */
1081
- created_at: string;
1082
-
1083
- /**
1084
- * Currency code (ISO 4217 currency code or crypto currency code).
1182
+ * Currency code (ISO 4217 or crypto).
1085
1183
  */
1086
1184
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1087
1185
 
@@ -1095,20 +1193,53 @@ export namespace ReturnPaidWebhookEvent {
1095
1193
  */
1096
1194
  failure: Payload.Failure | null;
1097
1195
 
1196
+ /**
1197
+ * ISO 8601 UTC timestamp when the return was initiated.
1198
+ */
1199
+ initiated_at: string;
1200
+
1201
+ /**
1202
+ * Payment scheme or blockchain used for the return, or null when unknown.
1203
+ */
1204
+ rail:
1205
+ | 'sepa'
1206
+ | 'sepa_instant'
1207
+ | 'faster_payments'
1208
+ | 'swift'
1209
+ | 'internal'
1210
+ | 'target'
1211
+ | 'ach'
1212
+ | 'fedwire'
1213
+ | 'bitcoin'
1214
+ | 'bitcoin_testnet4'
1215
+ | 'ethereum'
1216
+ | 'ethereum_sepolia'
1217
+ | 'solana'
1218
+ | 'solana_devnet'
1219
+ | 'polygon'
1220
+ | 'polygon_amoy'
1221
+ | null;
1222
+
1223
+ /**
1224
+ * ISO 8601 UTC timestamp when the return was sent.
1225
+ */
1226
+ sent_at: string | null;
1227
+
1098
1228
  /**
1099
1229
  * Current status of the return.
1100
1230
  */
1101
- status: 'pending' | 'paid' | 'failed' | 'returned';
1231
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1102
1232
 
1103
1233
  /**
1104
- * Type of the resource.
1234
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1235
+ * rails support this field.
1105
1236
  */
1106
- type: 'return';
1237
+ tx_hash: string | null;
1107
1238
 
1108
1239
  /**
1109
- * ISO 8601 UTC timestamp when the return was last updated.
1240
+ * Resource type discriminator.
1110
1241
  */
1111
- updated_at: string;
1242
+ type: 'return';
1112
1243
  }
1113
1244
 
1114
1245
  export namespace Payload {
@@ -1124,6 +1255,7 @@ export namespace ReturnPaidWebhookEvent {
1124
1255
  | 'account_blocked'
1125
1256
  | 'insufficient_funds'
1126
1257
  | 'invalid_account_format'
1258
+ | 'invalid_routing_number'
1127
1259
  | 'invalid_instruction'
1128
1260
  | 'invalid_amount'
1129
1261
  | 'invalid_time'
@@ -1191,12 +1323,7 @@ export namespace ReturnFailedWebhookEvent {
1191
1323
  amount: string;
1192
1324
 
1193
1325
  /**
1194
- * ISO 8601 UTC timestamp when the return was created.
1195
- */
1196
- created_at: string;
1197
-
1198
- /**
1199
- * Currency code (ISO 4217 currency code or crypto currency code).
1326
+ * Currency code (ISO 4217 or crypto).
1200
1327
  */
1201
1328
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1202
1329
 
@@ -1210,20 +1337,53 @@ export namespace ReturnFailedWebhookEvent {
1210
1337
  */
1211
1338
  failure: Payload.Failure | null;
1212
1339
 
1340
+ /**
1341
+ * ISO 8601 UTC timestamp when the return was initiated.
1342
+ */
1343
+ initiated_at: string;
1344
+
1345
+ /**
1346
+ * Payment scheme or blockchain used for the return, or null when unknown.
1347
+ */
1348
+ rail:
1349
+ | 'sepa'
1350
+ | 'sepa_instant'
1351
+ | 'faster_payments'
1352
+ | 'swift'
1353
+ | 'internal'
1354
+ | 'target'
1355
+ | 'ach'
1356
+ | 'fedwire'
1357
+ | 'bitcoin'
1358
+ | 'bitcoin_testnet4'
1359
+ | 'ethereum'
1360
+ | 'ethereum_sepolia'
1361
+ | 'solana'
1362
+ | 'solana_devnet'
1363
+ | 'polygon'
1364
+ | 'polygon_amoy'
1365
+ | null;
1366
+
1367
+ /**
1368
+ * ISO 8601 UTC timestamp when the return was sent.
1369
+ */
1370
+ sent_at: string | null;
1371
+
1213
1372
  /**
1214
1373
  * Current status of the return.
1215
1374
  */
1216
- status: 'pending' | 'paid' | 'failed' | 'returned';
1375
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1217
1376
 
1218
1377
  /**
1219
- * Type of the resource.
1378
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1379
+ * rails support this field.
1220
1380
  */
1221
- type: 'return';
1381
+ tx_hash: string | null;
1222
1382
 
1223
1383
  /**
1224
- * ISO 8601 UTC timestamp when the return was last updated.
1384
+ * Resource type discriminator.
1225
1385
  */
1226
- updated_at: string;
1386
+ type: 'return';
1227
1387
  }
1228
1388
 
1229
1389
  export namespace Payload {
@@ -1239,6 +1399,7 @@ export namespace ReturnFailedWebhookEvent {
1239
1399
  | 'account_blocked'
1240
1400
  | 'insufficient_funds'
1241
1401
  | 'invalid_account_format'
1402
+ | 'invalid_routing_number'
1242
1403
  | 'invalid_instruction'
1243
1404
  | 'invalid_amount'
1244
1405
  | 'invalid_time'
@@ -1306,12 +1467,7 @@ export namespace ReturnReturnedWebhookEvent {
1306
1467
  amount: string;
1307
1468
 
1308
1469
  /**
1309
- * ISO 8601 UTC timestamp when the return was created.
1310
- */
1311
- created_at: string;
1312
-
1313
- /**
1314
- * Currency code (ISO 4217 currency code or crypto currency code).
1470
+ * Currency code (ISO 4217 or crypto).
1315
1471
  */
1316
1472
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1317
1473
 
@@ -1325,20 +1481,53 @@ export namespace ReturnReturnedWebhookEvent {
1325
1481
  */
1326
1482
  failure: Payload.Failure | null;
1327
1483
 
1484
+ /**
1485
+ * ISO 8601 UTC timestamp when the return was initiated.
1486
+ */
1487
+ initiated_at: string;
1488
+
1489
+ /**
1490
+ * Payment scheme or blockchain used for the return, or null when unknown.
1491
+ */
1492
+ rail:
1493
+ | 'sepa'
1494
+ | 'sepa_instant'
1495
+ | 'faster_payments'
1496
+ | 'swift'
1497
+ | 'internal'
1498
+ | 'target'
1499
+ | 'ach'
1500
+ | 'fedwire'
1501
+ | 'bitcoin'
1502
+ | 'bitcoin_testnet4'
1503
+ | 'ethereum'
1504
+ | 'ethereum_sepolia'
1505
+ | 'solana'
1506
+ | 'solana_devnet'
1507
+ | 'polygon'
1508
+ | 'polygon_amoy'
1509
+ | null;
1510
+
1511
+ /**
1512
+ * ISO 8601 UTC timestamp when the return was sent.
1513
+ */
1514
+ sent_at: string | null;
1515
+
1328
1516
  /**
1329
1517
  * Current status of the return.
1330
1518
  */
1331
- status: 'pending' | 'paid' | 'failed' | 'returned';
1519
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
1332
1520
 
1333
1521
  /**
1334
- * Type of the resource.
1522
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
1523
+ * rails support this field.
1335
1524
  */
1336
- type: 'return';
1525
+ tx_hash: string | null;
1337
1526
 
1338
1527
  /**
1339
- * ISO 8601 UTC timestamp when the return was last updated.
1528
+ * Resource type discriminator.
1340
1529
  */
1341
- updated_at: string;
1530
+ type: 'return';
1342
1531
  }
1343
1532
 
1344
1533
  export namespace Payload {
@@ -1354,6 +1543,7 @@ export namespace ReturnReturnedWebhookEvent {
1354
1543
  | 'account_blocked'
1355
1544
  | 'insufficient_funds'
1356
1545
  | 'invalid_account_format'
1546
+ | 'invalid_routing_number'
1357
1547
  | 'invalid_instruction'
1358
1548
  | 'invalid_amount'
1359
1549
  | 'invalid_time'
@@ -1378,7 +1568,7 @@ export namespace ReturnReturnedWebhookEvent {
1378
1568
  }
1379
1569
  }
1380
1570
 
1381
- export interface DepositReceivedWebhookEvent {
1571
+ export interface DepositSettledWebhookEvent {
1382
1572
  /**
1383
1573
  * Unique identifier for the event. Stable across retries.
1384
1574
  */
@@ -1397,15 +1587,15 @@ export interface DepositReceivedWebhookEvent {
1397
1587
  /**
1398
1588
  * Full resource snapshot at the time of the event.
1399
1589
  */
1400
- payload: DepositReceivedWebhookEvent.Payload;
1590
+ payload: DepositSettledWebhookEvent.Payload;
1401
1591
 
1402
1592
  /**
1403
1593
  * Event type in resource.action format.
1404
1594
  */
1405
- type: 'deposit.received';
1595
+ type: 'deposit.settled';
1406
1596
  }
1407
1597
 
1408
- export namespace DepositReceivedWebhookEvent {
1598
+ export namespace DepositSettledWebhookEvent {
1409
1599
  /**
1410
1600
  * Full resource snapshot at the time of the event.
1411
1601
  */
@@ -1416,55 +1606,45 @@ export namespace DepositReceivedWebhookEvent {
1416
1606
  id: string;
1417
1607
 
1418
1608
  /**
1419
- * Amount as a string decimal (e.g. "100.50").
1609
+ * ID of the account that was credited with the deposit.
1420
1610
  */
1421
- amount: string;
1611
+ account_id: string;
1422
1612
 
1423
1613
  /**
1424
- * Reference visible on the bank statement, or null when not applicable.
1614
+ * Amount as a string decimal (e.g. "100.50").
1425
1615
  */
1426
- bank_statement_reference: string | null;
1616
+ amount: string;
1427
1617
 
1428
1618
  /**
1429
- * ISO 8601 UTC timestamp when the deposit was created.
1619
+ * ID of the counterparty that sent the money, or null when not known.
1430
1620
  */
1431
- created_at: string;
1621
+ counterparty_id: string | null;
1432
1622
 
1433
1623
  /**
1434
- * Supported fiat or crypto currency code for the deposit amount.
1624
+ * Currency code (ISO 4217 or crypto).
1435
1625
  */
1436
1626
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1437
1627
 
1438
1628
  /**
1439
- * ID of the merchant account that received the deposit.
1440
- */
1441
- destination_account_id: string;
1442
-
1443
- /**
1444
- * Payment rail or blockchain used for the deposit, or null when unknown.
1629
+ * Payment scheme or blockchain used for the deposit, or null when unknown.
1445
1630
  */
1446
1631
  rail:
1632
+ | 'sepa'
1447
1633
  | 'sepa_instant'
1448
1634
  | 'faster_payments'
1449
- | 'sepa'
1450
- | 'elixir'
1451
- | 'express_elixir'
1452
- | 'sek_account_to_account'
1453
- | 'sumclearing'
1454
- | 'straksclearing'
1455
1635
  | 'swift'
1456
1636
  | 'internal'
1457
1637
  | 'target'
1458
1638
  | 'ach'
1459
1639
  | 'fedwire'
1460
- | 'btc'
1461
- | 'btc_testnet4'
1462
- | 'eth'
1463
- | 'eth_sepolia'
1464
- | 'sol'
1465
- | 'sol_devnet'
1466
- | 'matic'
1467
- | 'matic_amoy'
1640
+ | 'bitcoin'
1641
+ | 'bitcoin_testnet4'
1642
+ | 'ethereum'
1643
+ | 'ethereum_sepolia'
1644
+ | 'solana'
1645
+ | 'solana_devnet'
1646
+ | 'polygon'
1647
+ | 'polygon_amoy'
1468
1648
  | null;
1469
1649
 
1470
1650
  /**
@@ -1473,17 +1653,24 @@ export namespace DepositReceivedWebhookEvent {
1473
1653
  returns: Array<string>;
1474
1654
 
1475
1655
  /**
1476
- * Counterparty bank account or crypto wallet that sent the funds.
1656
+ * ISO 8601 UTC timestamp when the deposit was settled.
1477
1657
  */
1478
- source: Payload.Iban | Payload.UkSortCode | Payload.Aba | Payload.Wallet;
1658
+ settled_at: string;
1479
1659
 
1480
1660
  /**
1481
1661
  * Current status of the deposit.
1482
1662
  */
1483
- status: 'received' | 'in_return' | 'returned' | 'return_failed' | 'return_returned';
1663
+ status: 'settled';
1664
+
1665
+ /**
1666
+ * Reference used to track the payment across the payment network, such as the UETR
1667
+ * for SWIFT payments.
1668
+ */
1669
+ tracking_reference: string | null;
1484
1670
 
1485
1671
  /**
1486
- * Transaction hash for crypto deposits, or null when not known.
1672
+ * Transaction hash for crypto deposits, or null when not known. Only blockchain
1673
+ * rails support this field.
1487
1674
  */
1488
1675
  tx_hash: string | null;
1489
1676
 
@@ -1493,102 +1680,10 @@ export namespace DepositReceivedWebhookEvent {
1493
1680
  type: 'deposit';
1494
1681
 
1495
1682
  /**
1496
- * ISO 8601 UTC timestamp when the deposit was last updated.
1683
+ * Unstructured remittance information attached to the transfer. Not all rails
1684
+ * support this field.
1497
1685
  */
1498
- updated_at: string;
1499
- }
1500
-
1501
- export namespace Payload {
1502
- export interface Iban {
1503
- /**
1504
- * Name of the account holder.
1505
- */
1506
- account_holder_name: string;
1507
-
1508
- /**
1509
- * Bank Identifier Code, or null if not provided.
1510
- */
1511
- bic: string | null;
1512
-
1513
- /**
1514
- * International Bank Account Number.
1515
- */
1516
- iban: string;
1517
-
1518
- /**
1519
- * Discriminator for IBAN source.
1520
- */
1521
- type: 'iban';
1522
- }
1523
-
1524
- export interface UkSortCode {
1525
- /**
1526
- * Name of the account holder.
1527
- */
1528
- account_holder_name: string;
1529
-
1530
- /**
1531
- * UK account number (8 digits).
1532
- */
1533
- account_number: string;
1534
-
1535
- /**
1536
- * UK sort code (6 digits).
1537
- */
1538
- sort_code: string;
1539
-
1540
- /**
1541
- * Discriminator for UK sort code source.
1542
- */
1543
- type: 'sort_code';
1544
- }
1545
-
1546
- export interface Aba {
1547
- /**
1548
- * Name of the account holder.
1549
- */
1550
- account_holder_name: string;
1551
-
1552
- /**
1553
- * Bank account number.
1554
- */
1555
- account_number: string;
1556
-
1557
- /**
1558
- * ABA routing number (9 digits).
1559
- */
1560
- routing_number: string;
1561
-
1562
- /**
1563
- * Discriminator for ABA wire source.
1564
- */
1565
- type: 'aba';
1566
- }
1567
-
1568
- export interface Wallet {
1569
- /**
1570
- * Wallet address on the specified blockchain.
1571
- */
1572
- address: string;
1573
-
1574
- /**
1575
- * Blockchain network for the crypto wallet.
1576
- */
1577
- blockchain:
1578
- | 'bitcoin'
1579
- | 'ethereum'
1580
- | 'solana'
1581
- | 'polygon'
1582
- | 'bitcoin_testnet4'
1583
- | 'ethereum_sepolia'
1584
- | 'solana_devnet'
1585
- | 'polygon_amoy';
1586
-
1587
- /**
1588
- * Discriminator for crypto wallet source.
1589
- */
1590
- type: 'crypto_wallet';
1591
- }
1686
+ unstructured_remittance_information: string | null;
1592
1687
  }
1593
1688
  }
1594
1689
 
@@ -1639,36 +1734,21 @@ export namespace ConversionCreatedWebhookEvent {
1639
1734
  */
1640
1735
  created_at: string;
1641
1736
 
1642
- /**
1643
- * Failure details when status is failed, otherwise null.
1644
- */
1645
- failure: Payload.Failure | null;
1646
-
1647
1737
  /**
1648
1738
  * Key-value pairs stored with the conversion.
1649
1739
  */
1650
1740
  metadata: { [key: string]: string };
1651
1741
 
1652
- /**
1653
- * ID of the associated quote, or null.
1654
- */
1655
- quote_id: string | null;
1656
-
1657
1742
  /**
1658
1743
  * ID of the source account, or null.
1659
1744
  */
1660
1745
  source_account_id: string | null;
1661
1746
 
1662
1747
  /**
1663
- * Source amount as a string decimal.
1748
+ * Amount as a string decimal (e.g. "100.50").
1664
1749
  */
1665
1750
  source_amount: string;
1666
1751
 
1667
- /**
1668
- * Source currency code.
1669
- */
1670
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1671
-
1672
1752
  /**
1673
1753
  * Current status of the conversion.
1674
1754
  */
@@ -1680,9 +1760,9 @@ export namespace ConversionCreatedWebhookEvent {
1680
1760
  target_account_id: string | null;
1681
1761
 
1682
1762
  /**
1683
- * Target currency code.
1763
+ * Amount as a string decimal (e.g. "100.50").
1684
1764
  */
1685
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1765
+ target_amount: string;
1686
1766
 
1687
1767
  /**
1688
1768
  * Resource type discriminator.
@@ -1694,18 +1774,6 @@ export namespace ConversionCreatedWebhookEvent {
1694
1774
  */
1695
1775
  updated_at: string;
1696
1776
  }
1697
-
1698
- export namespace Payload {
1699
- /**
1700
- * Failure details when status is failed, otherwise null.
1701
- */
1702
- export interface Failure {
1703
- /**
1704
- * Human-readable description of the failure.
1705
- */
1706
- message: string;
1707
- }
1708
- }
1709
1777
  }
1710
1778
 
1711
1779
  export interface ConversionCompletedWebhookEvent {
@@ -1755,36 +1823,21 @@ export namespace ConversionCompletedWebhookEvent {
1755
1823
  */
1756
1824
  created_at: string;
1757
1825
 
1758
- /**
1759
- * Failure details when status is failed, otherwise null.
1760
- */
1761
- failure: Payload.Failure | null;
1762
-
1763
1826
  /**
1764
1827
  * Key-value pairs stored with the conversion.
1765
1828
  */
1766
1829
  metadata: { [key: string]: string };
1767
1830
 
1768
- /**
1769
- * ID of the associated quote, or null.
1770
- */
1771
- quote_id: string | null;
1772
-
1773
1831
  /**
1774
1832
  * ID of the source account, or null.
1775
1833
  */
1776
1834
  source_account_id: string | null;
1777
1835
 
1778
1836
  /**
1779
- * Source amount as a string decimal.
1837
+ * Amount as a string decimal (e.g. "100.50").
1780
1838
  */
1781
1839
  source_amount: string;
1782
1840
 
1783
- /**
1784
- * Source currency code.
1785
- */
1786
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1787
-
1788
1841
  /**
1789
1842
  * Current status of the conversion.
1790
1843
  */
@@ -1796,9 +1849,9 @@ export namespace ConversionCompletedWebhookEvent {
1796
1849
  target_account_id: string | null;
1797
1850
 
1798
1851
  /**
1799
- * Target currency code.
1852
+ * Amount as a string decimal (e.g. "100.50").
1800
1853
  */
1801
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1854
+ target_amount: string;
1802
1855
 
1803
1856
  /**
1804
1857
  * Resource type discriminator.
@@ -1810,18 +1863,6 @@ export namespace ConversionCompletedWebhookEvent {
1810
1863
  */
1811
1864
  updated_at: string;
1812
1865
  }
1813
-
1814
- export namespace Payload {
1815
- /**
1816
- * Failure details when status is failed, otherwise null.
1817
- */
1818
- export interface Failure {
1819
- /**
1820
- * Human-readable description of the failure.
1821
- */
1822
- message: string;
1823
- }
1824
- }
1825
1866
  }
1826
1867
 
1827
1868
  export interface ConversionFailedWebhookEvent {
@@ -1871,36 +1912,21 @@ export namespace ConversionFailedWebhookEvent {
1871
1912
  */
1872
1913
  created_at: string;
1873
1914
 
1874
- /**
1875
- * Failure details when status is failed, otherwise null.
1876
- */
1877
- failure: Payload.Failure | null;
1878
-
1879
1915
  /**
1880
1916
  * Key-value pairs stored with the conversion.
1881
1917
  */
1882
1918
  metadata: { [key: string]: string };
1883
1919
 
1884
- /**
1885
- * ID of the associated quote, or null.
1886
- */
1887
- quote_id: string | null;
1888
-
1889
1920
  /**
1890
1921
  * ID of the source account, or null.
1891
1922
  */
1892
1923
  source_account_id: string | null;
1893
1924
 
1894
1925
  /**
1895
- * Source amount as a string decimal.
1926
+ * Amount as a string decimal (e.g. "100.50").
1896
1927
  */
1897
1928
  source_amount: string;
1898
1929
 
1899
- /**
1900
- * Source currency code.
1901
- */
1902
- source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1903
-
1904
1930
  /**
1905
1931
  * Current status of the conversion.
1906
1932
  */
@@ -1912,9 +1938,9 @@ export namespace ConversionFailedWebhookEvent {
1912
1938
  target_account_id: string | null;
1913
1939
 
1914
1940
  /**
1915
- * Target currency code.
1941
+ * Amount as a string decimal (e.g. "100.50").
1916
1942
  */
1917
- target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
1943
+ target_amount: string;
1918
1944
 
1919
1945
  /**
1920
1946
  * Resource type discriminator.
@@ -1926,18 +1952,6 @@ export namespace ConversionFailedWebhookEvent {
1926
1952
  */
1927
1953
  updated_at: string;
1928
1954
  }
1929
-
1930
- export namespace Payload {
1931
- /**
1932
- * Failure details when status is failed, otherwise null.
1933
- */
1934
- export interface Failure {
1935
- /**
1936
- * Human-readable description of the failure.
1937
- */
1938
- message: string;
1939
- }
1940
- }
1941
1955
  }
1942
1956
 
1943
1957
  export interface AccountHolderActiveWebhookEvent {
@@ -1978,12 +1992,15 @@ export namespace AccountHolderActiveWebhookEvent {
1978
1992
  id: string;
1979
1993
 
1980
1994
  /**
1981
- * Beneficiary details used to create this account holder.
1995
+ * Beneficiary details used to create this account holder. Which shape is returned
1996
+ * follows `country_of_citizenship`: **US individual** when it is `US`, **Non-US
1997
+ * individual** for any other country, **Business** when `holder_type` is
1998
+ * `business`.
1982
1999
  */
1983
2000
  beneficiary_data:
1984
- | Payload.UsBeneficiaryDataResponse
1985
- | Payload.NonUsBeneficiaryDataResponse
1986
- | Payload.BusinessBeneficiaryDataResponse;
2001
+ | Payload.V1UsBeneficiaryDataResponse
2002
+ | Payload.V1NonUsBeneficiaryDataResponse
2003
+ | Payload.V1BusinessBeneficiaryDataResponse;
1987
2004
 
1988
2005
  /**
1989
2006
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -2007,7 +2024,7 @@ export namespace AccountHolderActiveWebhookEvent {
2007
2024
  }
2008
2025
 
2009
2026
  export namespace Payload {
2010
- export interface UsBeneficiaryDataResponse {
2027
+ export interface V1UsBeneficiaryDataResponse {
2011
2028
  /**
2012
2029
  * ISO 3166-1 alpha-2 country code of citizenship.
2013
2030
  */
@@ -2023,8 +2040,8 @@ export namespace AccountHolderActiveWebhookEvent {
2023
2040
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
2024
2041
  */
2025
2042
  identification:
2026
- | UsBeneficiaryDataResponse.SsnIdentification
2027
- | UsBeneficiaryDataResponse.ItinIdentification;
2043
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
2044
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
2028
2045
 
2029
2046
  /**
2030
2047
  * Full legal name of the account holder.
@@ -2032,68 +2049,70 @@ export namespace AccountHolderActiveWebhookEvent {
2032
2049
  legal_name: string;
2033
2050
 
2034
2051
  /**
2035
- * Residential address of the account holder.
2052
+ * Residential address of the account holder. **US address** requires
2053
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
2054
+ * other country and allows `state` to be null.
2036
2055
  */
2037
2056
  residential_address:
2038
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
2039
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2057
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
2058
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2040
2059
  }
2041
2060
 
2042
- export namespace UsBeneficiaryDataResponse {
2043
- export interface SsnIdentification {
2061
+ export namespace V1UsBeneficiaryDataResponse {
2062
+ export interface V1SsnIdentification {
2044
2063
  type: 'ssn';
2045
2064
 
2046
2065
  value: string;
2047
2066
  }
2048
2067
 
2049
- export interface ItinIdentification {
2068
+ export interface V1ItinIdentification {
2050
2069
  type: 'itin';
2051
2070
 
2052
2071
  value: string;
2053
2072
  }
2054
2073
 
2055
- export interface UsResidentialAddressResponse {
2074
+ export interface V1UsResidentialAddress {
2056
2075
  /**
2057
- * City name.
2076
+ * City or locality.
2058
2077
  */
2059
2078
  city: string;
2060
2079
 
2061
2080
  /**
2062
2081
  * ISO 3166-1 alpha-2 country code.
2063
2082
  */
2064
- country: 'US';
2083
+ country_code: 'US';
2065
2084
 
2066
2085
  /**
2067
- * Postal or ZIP code.
2086
+ * Primary street address.
2068
2087
  */
2069
- postal_code: string;
2088
+ line_1: string;
2070
2089
 
2071
2090
  /**
2072
- * Two-letter state code.
2091
+ * Secondary street address, or null if not recorded.
2073
2092
  */
2074
- state: string;
2093
+ line_2: string | null;
2075
2094
 
2076
2095
  /**
2077
- * Primary street address.
2096
+ * Postal or ZIP code.
2078
2097
  */
2079
- street_line_1: string;
2098
+ postal_code: string;
2080
2099
 
2081
2100
  /**
2082
- * Secondary street address (apartment, suite, etc.).
2101
+ * State, province, or region.
2083
2102
  */
2084
- street_line_2: string | null;
2103
+ state: string;
2085
2104
  }
2086
2105
 
2087
- export interface NonUsResidentialAddressResponse {
2106
+ export interface V1NonUsResidentialAddress {
2088
2107
  /**
2089
- * City name.
2108
+ * City or locality.
2090
2109
  */
2091
2110
  city: string;
2092
2111
 
2093
2112
  /**
2094
2113
  * ISO 3166-1 alpha-2 country code.
2095
2114
  */
2096
- country:
2115
+ country_code:
2097
2116
  | 'AF'
2098
2117
  | 'AL'
2099
2118
  | 'DZ'
@@ -2345,23 +2364,28 @@ export namespace AccountHolderActiveWebhookEvent {
2345
2364
  | 'XK';
2346
2365
 
2347
2366
  /**
2348
- * Postal or ZIP code.
2367
+ * Primary street address.
2349
2368
  */
2350
- postal_code: string;
2369
+ line_1: string;
2351
2370
 
2352
2371
  /**
2353
- * Primary street address.
2372
+ * Secondary street address, or null if not recorded.
2354
2373
  */
2355
- street_line_1: string;
2374
+ line_2: string | null;
2356
2375
 
2357
2376
  /**
2358
- * Secondary street address (apartment, suite, etc.).
2377
+ * Postal or ZIP code.
2378
+ */
2379
+ postal_code: string;
2380
+
2381
+ /**
2382
+ * State, province, or region, or null if not recorded.
2359
2383
  */
2360
- street_line_2: string | null;
2384
+ state: string | null;
2361
2385
  }
2362
2386
  }
2363
2387
 
2364
- export interface NonUsBeneficiaryDataResponse {
2388
+ export interface V1NonUsBeneficiaryDataResponse {
2365
2389
  /**
2366
2390
  * ISO 3166-1 alpha-2 country code of citizenship.
2367
2391
  */
@@ -2624,7 +2648,7 @@ export namespace AccountHolderActiveWebhookEvent {
2624
2648
  /**
2625
2649
  * Government-issued identification with type: "id" (generic government-issued ID).
2626
2650
  */
2627
- identification: NonUsBeneficiaryDataResponse.Identification;
2651
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
2628
2652
 
2629
2653
  /**
2630
2654
  * Full legal name of the account holder.
@@ -2632,14 +2656,16 @@ export namespace AccountHolderActiveWebhookEvent {
2632
2656
  legal_name: string;
2633
2657
 
2634
2658
  /**
2635
- * Residential address of the account holder.
2659
+ * Residential address of the account holder. **US address** requires
2660
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
2661
+ * other country and allows `state` to be null.
2636
2662
  */
2637
2663
  residential_address:
2638
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
2639
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
2664
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
2665
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
2640
2666
  }
2641
2667
 
2642
- export namespace NonUsBeneficiaryDataResponse {
2668
+ export namespace V1NonUsBeneficiaryDataResponse {
2643
2669
  /**
2644
2670
  * Government-issued identification with type: "id" (generic government-issued ID).
2645
2671
  */
@@ -2649,48 +2675,48 @@ export namespace AccountHolderActiveWebhookEvent {
2649
2675
  value: string;
2650
2676
  }
2651
2677
 
2652
- export interface UsResidentialAddressResponse {
2678
+ export interface V1UsResidentialAddress {
2653
2679
  /**
2654
- * City name.
2680
+ * City or locality.
2655
2681
  */
2656
2682
  city: string;
2657
2683
 
2658
2684
  /**
2659
2685
  * ISO 3166-1 alpha-2 country code.
2660
2686
  */
2661
- country: 'US';
2687
+ country_code: 'US';
2662
2688
 
2663
2689
  /**
2664
- * Postal or ZIP code.
2690
+ * Primary street address.
2665
2691
  */
2666
- postal_code: string;
2692
+ line_1: string;
2667
2693
 
2668
2694
  /**
2669
- * Two-letter state code.
2695
+ * Secondary street address, or null if not recorded.
2670
2696
  */
2671
- state: string;
2697
+ line_2: string | null;
2672
2698
 
2673
2699
  /**
2674
- * Primary street address.
2700
+ * Postal or ZIP code.
2675
2701
  */
2676
- street_line_1: string;
2702
+ postal_code: string;
2677
2703
 
2678
2704
  /**
2679
- * Secondary street address (apartment, suite, etc.).
2705
+ * State, province, or region.
2680
2706
  */
2681
- street_line_2: string | null;
2707
+ state: string;
2682
2708
  }
2683
2709
 
2684
- export interface NonUsResidentialAddressResponse {
2710
+ export interface V1NonUsResidentialAddress {
2685
2711
  /**
2686
- * City name.
2712
+ * City or locality.
2687
2713
  */
2688
2714
  city: string;
2689
2715
 
2690
2716
  /**
2691
2717
  * ISO 3166-1 alpha-2 country code.
2692
2718
  */
2693
- country:
2719
+ country_code:
2694
2720
  | 'AF'
2695
2721
  | 'AL'
2696
2722
  | 'DZ'
@@ -2942,38 +2968,44 @@ export namespace AccountHolderActiveWebhookEvent {
2942
2968
  | 'XK';
2943
2969
 
2944
2970
  /**
2945
- * Postal or ZIP code.
2971
+ * Primary street address.
2946
2972
  */
2947
- postal_code: string;
2973
+ line_1: string;
2948
2974
 
2949
2975
  /**
2950
- * Primary street address.
2976
+ * Secondary street address, or null if not recorded.
2977
+ */
2978
+ line_2: string | null;
2979
+
2980
+ /**
2981
+ * Postal or ZIP code.
2951
2982
  */
2952
- street_line_1: string;
2983
+ postal_code: string;
2953
2984
 
2954
2985
  /**
2955
- * Secondary street address (apartment, suite, etc.).
2986
+ * State, province, or region, or null if not recorded.
2956
2987
  */
2957
- street_line_2: string | null;
2988
+ state: string | null;
2958
2989
  }
2959
2990
  }
2960
2991
 
2961
- export interface BusinessBeneficiaryDataResponse {
2992
+ export interface V1BusinessBeneficiaryDataResponse {
2962
2993
  /**
2963
2994
  * Beneficial owners of the business. At least one required.
2964
2995
  */
2965
2996
  beneficial_owners: Array<
2966
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
2967
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
2997
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
2998
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
2968
2999
  >;
2969
3000
 
2970
3001
  /**
2971
3002
  * Individual with primary responsibility for controlling, managing, or directing
2972
- * the business.
3003
+ * the business. Follows the same US / non-US split as `beneficiary_data`, based on
3004
+ * the control person's own `country_of_citizenship`.
2973
3005
  */
2974
3006
  control_person:
2975
- | BusinessBeneficiaryDataResponse.UnionMember0
2976
- | BusinessBeneficiaryDataResponse.UnionMember1;
3007
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
3008
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
2977
3009
 
2978
3010
  /**
2979
3011
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -3241,26 +3273,30 @@ export namespace AccountHolderActiveWebhookEvent {
3241
3273
  legal_business_name: string;
3242
3274
 
3243
3275
  /**
3244
- * Physical operating address of the business.
3276
+ * Physical operating address of the business. **US address** requires
3277
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3278
+ * other country and allows `state` to be null.
3245
3279
  */
3246
3280
  physical_address:
3247
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3248
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3281
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
3282
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3249
3283
 
3250
3284
  /**
3251
- * Registered legal address of the business.
3285
+ * Registered legal address of the business. **US address** requires
3286
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3287
+ * other country and allows `state` to be null.
3252
3288
  */
3253
3289
  registered_address:
3254
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
3255
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3290
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
3291
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
3256
3292
 
3257
3293
  /**
3258
3294
  * Business registration number: type "ein" (Employer Identification Number, format
3259
3295
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
3260
3296
  */
3261
3297
  registration_number:
3262
- | BusinessBeneficiaryDataResponse.EinIdentification
3263
- | BusinessBeneficiaryDataResponse.SsnIdentification;
3298
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
3299
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
3264
3300
 
3265
3301
  /**
3266
3302
  * State or subdivision where the business is incorporated.
@@ -3273,8 +3309,8 @@ export namespace AccountHolderActiveWebhookEvent {
3273
3309
  year_of_incorporation: number;
3274
3310
  }
3275
3311
 
3276
- export namespace BusinessBeneficiaryDataResponse {
3277
- export interface UsBeneficiaryDataResponse {
3312
+ export namespace V1BusinessBeneficiaryDataResponse {
3313
+ export interface V1UsBeneficiaryDataResponse {
3278
3314
  /**
3279
3315
  * ISO 3166-1 alpha-2 country code of citizenship.
3280
3316
  */
@@ -3290,8 +3326,8 @@ export namespace AccountHolderActiveWebhookEvent {
3290
3326
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
3291
3327
  */
3292
3328
  identification:
3293
- | UsBeneficiaryDataResponse.SsnIdentification
3294
- | UsBeneficiaryDataResponse.ItinIdentification;
3329
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
3330
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
3295
3331
 
3296
3332
  /**
3297
3333
  * Full legal name of the account holder.
@@ -3299,68 +3335,70 @@ export namespace AccountHolderActiveWebhookEvent {
3299
3335
  legal_name: string;
3300
3336
 
3301
3337
  /**
3302
- * Residential address of the account holder.
3338
+ * Residential address of the account holder. **US address** requires
3339
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3340
+ * other country and allows `state` to be null.
3303
3341
  */
3304
3342
  residential_address:
3305
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
3306
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3343
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
3344
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3307
3345
  }
3308
3346
 
3309
- export namespace UsBeneficiaryDataResponse {
3310
- export interface SsnIdentification {
3347
+ export namespace V1UsBeneficiaryDataResponse {
3348
+ export interface V1SsnIdentification {
3311
3349
  type: 'ssn';
3312
3350
 
3313
3351
  value: string;
3314
3352
  }
3315
3353
 
3316
- export interface ItinIdentification {
3354
+ export interface V1ItinIdentification {
3317
3355
  type: 'itin';
3318
3356
 
3319
3357
  value: string;
3320
3358
  }
3321
3359
 
3322
- export interface UsResidentialAddressResponse {
3360
+ export interface V1UsResidentialAddress {
3323
3361
  /**
3324
- * City name.
3362
+ * City or locality.
3325
3363
  */
3326
3364
  city: string;
3327
3365
 
3328
3366
  /**
3329
3367
  * ISO 3166-1 alpha-2 country code.
3330
3368
  */
3331
- country: 'US';
3369
+ country_code: 'US';
3332
3370
 
3333
3371
  /**
3334
- * Postal or ZIP code.
3372
+ * Primary street address.
3335
3373
  */
3336
- postal_code: string;
3374
+ line_1: string;
3337
3375
 
3338
3376
  /**
3339
- * Two-letter state code.
3377
+ * Secondary street address, or null if not recorded.
3340
3378
  */
3341
- state: string;
3379
+ line_2: string | null;
3342
3380
 
3343
3381
  /**
3344
- * Primary street address.
3382
+ * Postal or ZIP code.
3345
3383
  */
3346
- street_line_1: string;
3384
+ postal_code: string;
3347
3385
 
3348
3386
  /**
3349
- * Secondary street address (apartment, suite, etc.).
3387
+ * State, province, or region.
3350
3388
  */
3351
- street_line_2: string | null;
3389
+ state: string;
3352
3390
  }
3353
3391
 
3354
- export interface NonUsResidentialAddressResponse {
3392
+ export interface V1NonUsResidentialAddress {
3355
3393
  /**
3356
- * City name.
3394
+ * City or locality.
3357
3395
  */
3358
3396
  city: string;
3359
3397
 
3360
3398
  /**
3361
3399
  * ISO 3166-1 alpha-2 country code.
3362
3400
  */
3363
- country:
3401
+ country_code:
3364
3402
  | 'AF'
3365
3403
  | 'AL'
3366
3404
  | 'DZ'
@@ -3612,23 +3650,28 @@ export namespace AccountHolderActiveWebhookEvent {
3612
3650
  | 'XK';
3613
3651
 
3614
3652
  /**
3615
- * Postal or ZIP code.
3653
+ * Primary street address.
3616
3654
  */
3617
- postal_code: string;
3655
+ line_1: string;
3618
3656
 
3619
3657
  /**
3620
- * Primary street address.
3658
+ * Secondary street address, or null if not recorded.
3659
+ */
3660
+ line_2: string | null;
3661
+
3662
+ /**
3663
+ * Postal or ZIP code.
3621
3664
  */
3622
- street_line_1: string;
3665
+ postal_code: string;
3623
3666
 
3624
3667
  /**
3625
- * Secondary street address (apartment, suite, etc.).
3668
+ * State, province, or region, or null if not recorded.
3626
3669
  */
3627
- street_line_2: string | null;
3670
+ state: string | null;
3628
3671
  }
3629
3672
  }
3630
3673
 
3631
- export interface NonUsBeneficiaryDataResponse {
3674
+ export interface V1NonUsBeneficiaryDataResponse {
3632
3675
  /**
3633
3676
  * ISO 3166-1 alpha-2 country code of citizenship.
3634
3677
  */
@@ -3891,7 +3934,7 @@ export namespace AccountHolderActiveWebhookEvent {
3891
3934
  /**
3892
3935
  * Government-issued identification with type: "id" (generic government-issued ID).
3893
3936
  */
3894
- identification: NonUsBeneficiaryDataResponse.Identification;
3937
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
3895
3938
 
3896
3939
  /**
3897
3940
  * Full legal name of the account holder.
@@ -3899,14 +3942,16 @@ export namespace AccountHolderActiveWebhookEvent {
3899
3942
  legal_name: string;
3900
3943
 
3901
3944
  /**
3902
- * Residential address of the account holder.
3945
+ * Residential address of the account holder. **US address** requires
3946
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
3947
+ * other country and allows `state` to be null.
3903
3948
  */
3904
3949
  residential_address:
3905
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
3906
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
3950
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
3951
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
3907
3952
  }
3908
3953
 
3909
- export namespace NonUsBeneficiaryDataResponse {
3954
+ export namespace V1NonUsBeneficiaryDataResponse {
3910
3955
  /**
3911
3956
  * Government-issued identification with type: "id" (generic government-issued ID).
3912
3957
  */
@@ -3916,48 +3961,48 @@ export namespace AccountHolderActiveWebhookEvent {
3916
3961
  value: string;
3917
3962
  }
3918
3963
 
3919
- export interface UsResidentialAddressResponse {
3964
+ export interface V1UsResidentialAddress {
3920
3965
  /**
3921
- * City name.
3966
+ * City or locality.
3922
3967
  */
3923
3968
  city: string;
3924
3969
 
3925
3970
  /**
3926
3971
  * ISO 3166-1 alpha-2 country code.
3927
3972
  */
3928
- country: 'US';
3973
+ country_code: 'US';
3929
3974
 
3930
3975
  /**
3931
- * Postal or ZIP code.
3976
+ * Primary street address.
3932
3977
  */
3933
- postal_code: string;
3978
+ line_1: string;
3934
3979
 
3935
3980
  /**
3936
- * Two-letter state code.
3981
+ * Secondary street address, or null if not recorded.
3937
3982
  */
3938
- state: string;
3983
+ line_2: string | null;
3939
3984
 
3940
3985
  /**
3941
- * Primary street address.
3986
+ * Postal or ZIP code.
3942
3987
  */
3943
- street_line_1: string;
3988
+ postal_code: string;
3944
3989
 
3945
3990
  /**
3946
- * Secondary street address (apartment, suite, etc.).
3991
+ * State, province, or region.
3947
3992
  */
3948
- street_line_2: string | null;
3993
+ state: string;
3949
3994
  }
3950
3995
 
3951
- export interface NonUsResidentialAddressResponse {
3996
+ export interface V1NonUsResidentialAddress {
3952
3997
  /**
3953
- * City name.
3998
+ * City or locality.
3954
3999
  */
3955
4000
  city: string;
3956
4001
 
3957
4002
  /**
3958
4003
  * ISO 3166-1 alpha-2 country code.
3959
4004
  */
3960
- country:
4005
+ country_code:
3961
4006
  | 'AF'
3962
4007
  | 'AL'
3963
4008
  | 'DZ'
@@ -4209,19 +4254,24 @@ export namespace AccountHolderActiveWebhookEvent {
4209
4254
  | 'XK';
4210
4255
 
4211
4256
  /**
4212
- * Postal or ZIP code.
4257
+ * Primary street address.
4213
4258
  */
4214
- postal_code: string;
4259
+ line_1: string;
4215
4260
 
4216
4261
  /**
4217
- * Primary street address.
4262
+ * Secondary street address, or null if not recorded.
4263
+ */
4264
+ line_2: string | null;
4265
+
4266
+ /**
4267
+ * Postal or ZIP code.
4218
4268
  */
4219
- street_line_1: string;
4269
+ postal_code: string;
4220
4270
 
4221
4271
  /**
4222
- * Secondary street address (apartment, suite, etc.).
4272
+ * State, province, or region, or null if not recorded.
4223
4273
  */
4224
- street_line_2: string | null;
4274
+ state: string | null;
4225
4275
  }
4226
4276
  }
4227
4277
 
@@ -4240,7 +4290,7 @@ export namespace AccountHolderActiveWebhookEvent {
4240
4290
  * Government-issued identification with type: "ssn" (Social Security Number,
4241
4291
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
4242
4292
  */
4243
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
4293
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
4244
4294
 
4245
4295
  /**
4246
4296
  * Full legal name of the account holder.
@@ -4248,11 +4298,11 @@ export namespace AccountHolderActiveWebhookEvent {
4248
4298
  legal_name: string;
4249
4299
 
4250
4300
  /**
4251
- * Residential address of the account holder.
4301
+ * Residential address of the account holder. **US address** requires
4302
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
4303
+ * other country and allows `state` to be null.
4252
4304
  */
4253
- residential_address:
4254
- | UnionMember0.UsResidentialAddressResponse
4255
- | UnionMember0.NonUsResidentialAddressResponse;
4305
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
4256
4306
 
4257
4307
  /**
4258
4308
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4262,60 +4312,60 @@ export namespace AccountHolderActiveWebhookEvent {
4262
4312
  }
4263
4313
 
4264
4314
  export namespace UnionMember0 {
4265
- export interface SsnIdentification {
4315
+ export interface V1SsnIdentification {
4266
4316
  type: 'ssn';
4267
4317
 
4268
4318
  value: string;
4269
4319
  }
4270
4320
 
4271
- export interface ItinIdentification {
4321
+ export interface V1ItinIdentification {
4272
4322
  type: 'itin';
4273
4323
 
4274
4324
  value: string;
4275
4325
  }
4276
4326
 
4277
- export interface UsResidentialAddressResponse {
4327
+ export interface V1UsResidentialAddress {
4278
4328
  /**
4279
- * City name.
4329
+ * City or locality.
4280
4330
  */
4281
4331
  city: string;
4282
4332
 
4283
4333
  /**
4284
4334
  * ISO 3166-1 alpha-2 country code.
4285
4335
  */
4286
- country: 'US';
4336
+ country_code: 'US';
4287
4337
 
4288
4338
  /**
4289
- * Postal or ZIP code.
4339
+ * Primary street address.
4290
4340
  */
4291
- postal_code: string;
4341
+ line_1: string;
4292
4342
 
4293
4343
  /**
4294
- * Two-letter state code.
4344
+ * Secondary street address, or null if not recorded.
4295
4345
  */
4296
- state: string;
4346
+ line_2: string | null;
4297
4347
 
4298
4348
  /**
4299
- * Primary street address.
4349
+ * Postal or ZIP code.
4300
4350
  */
4301
- street_line_1: string;
4351
+ postal_code: string;
4302
4352
 
4303
4353
  /**
4304
- * Secondary street address (apartment, suite, etc.).
4354
+ * State, province, or region.
4305
4355
  */
4306
- street_line_2: string | null;
4356
+ state: string;
4307
4357
  }
4308
4358
 
4309
- export interface NonUsResidentialAddressResponse {
4359
+ export interface V1NonUsResidentialAddress {
4310
4360
  /**
4311
- * City name.
4361
+ * City or locality.
4312
4362
  */
4313
4363
  city: string;
4314
4364
 
4315
4365
  /**
4316
4366
  * ISO 3166-1 alpha-2 country code.
4317
4367
  */
4318
- country:
4368
+ country_code:
4319
4369
  | 'AF'
4320
4370
  | 'AL'
4321
4371
  | 'DZ'
@@ -4567,19 +4617,24 @@ export namespace AccountHolderActiveWebhookEvent {
4567
4617
  | 'XK';
4568
4618
 
4569
4619
  /**
4570
- * Postal or ZIP code.
4620
+ * Primary street address.
4571
4621
  */
4572
- postal_code: string;
4622
+ line_1: string;
4573
4623
 
4574
4624
  /**
4575
- * Primary street address.
4625
+ * Secondary street address, or null if not recorded.
4626
+ */
4627
+ line_2: string | null;
4628
+
4629
+ /**
4630
+ * Postal or ZIP code.
4576
4631
  */
4577
- street_line_1: string;
4632
+ postal_code: string;
4578
4633
 
4579
4634
  /**
4580
- * Secondary street address (apartment, suite, etc.).
4635
+ * State, province, or region, or null if not recorded.
4581
4636
  */
4582
- street_line_2: string | null;
4637
+ state: string | null;
4583
4638
  }
4584
4639
  }
4585
4640
 
@@ -4854,11 +4909,11 @@ export namespace AccountHolderActiveWebhookEvent {
4854
4909
  legal_name: string;
4855
4910
 
4856
4911
  /**
4857
- * Residential address of the account holder.
4912
+ * Residential address of the account holder. **US address** requires
4913
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
4914
+ * other country and allows `state` to be null.
4858
4915
  */
4859
- residential_address:
4860
- | UnionMember1.UsResidentialAddressResponse
4861
- | UnionMember1.NonUsResidentialAddressResponse;
4916
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
4862
4917
 
4863
4918
  /**
4864
4919
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -4877,48 +4932,48 @@ export namespace AccountHolderActiveWebhookEvent {
4877
4932
  value: string;
4878
4933
  }
4879
4934
 
4880
- export interface UsResidentialAddressResponse {
4935
+ export interface V1UsResidentialAddress {
4881
4936
  /**
4882
- * City name.
4937
+ * City or locality.
4883
4938
  */
4884
4939
  city: string;
4885
4940
 
4886
4941
  /**
4887
4942
  * ISO 3166-1 alpha-2 country code.
4888
4943
  */
4889
- country: 'US';
4944
+ country_code: 'US';
4890
4945
 
4891
4946
  /**
4892
- * Postal or ZIP code.
4947
+ * Primary street address.
4893
4948
  */
4894
- postal_code: string;
4949
+ line_1: string;
4895
4950
 
4896
4951
  /**
4897
- * Two-letter state code.
4952
+ * Secondary street address, or null if not recorded.
4898
4953
  */
4899
- state: string;
4954
+ line_2: string | null;
4900
4955
 
4901
4956
  /**
4902
- * Primary street address.
4957
+ * Postal or ZIP code.
4903
4958
  */
4904
- street_line_1: string;
4959
+ postal_code: string;
4905
4960
 
4906
4961
  /**
4907
- * Secondary street address (apartment, suite, etc.).
4962
+ * State, province, or region.
4908
4963
  */
4909
- street_line_2: string | null;
4964
+ state: string;
4910
4965
  }
4911
4966
 
4912
- export interface NonUsResidentialAddressResponse {
4967
+ export interface V1NonUsResidentialAddress {
4913
4968
  /**
4914
- * City name.
4969
+ * City or locality.
4915
4970
  */
4916
4971
  city: string;
4917
4972
 
4918
4973
  /**
4919
4974
  * ISO 3166-1 alpha-2 country code.
4920
4975
  */
4921
- country:
4976
+ country_code:
4922
4977
  | 'AF'
4923
4978
  | 'AL'
4924
4979
  | 'DZ'
@@ -5170,64 +5225,69 @@ export namespace AccountHolderActiveWebhookEvent {
5170
5225
  | 'XK';
5171
5226
 
5172
5227
  /**
5173
- * Postal or ZIP code.
5228
+ * Primary street address.
5174
5229
  */
5175
- postal_code: string;
5230
+ line_1: string;
5176
5231
 
5177
5232
  /**
5178
- * Primary street address.
5233
+ * Secondary street address, or null if not recorded.
5234
+ */
5235
+ line_2: string | null;
5236
+
5237
+ /**
5238
+ * Postal or ZIP code.
5179
5239
  */
5180
- street_line_1: string;
5240
+ postal_code: string;
5181
5241
 
5182
5242
  /**
5183
- * Secondary street address (apartment, suite, etc.).
5243
+ * State, province, or region, or null if not recorded.
5184
5244
  */
5185
- street_line_2: string | null;
5245
+ state: string | null;
5186
5246
  }
5187
5247
  }
5188
5248
 
5189
- export interface UsResidentialAddressResponse {
5249
+ export interface V1UsResidentialAddress {
5190
5250
  /**
5191
- * City name.
5251
+ * City or locality.
5192
5252
  */
5193
5253
  city: string;
5194
5254
 
5195
5255
  /**
5196
5256
  * ISO 3166-1 alpha-2 country code.
5197
5257
  */
5198
- country: 'US';
5258
+ country_code: 'US';
5199
5259
 
5200
5260
  /**
5201
- * Postal or ZIP code.
5261
+ * Primary street address.
5202
5262
  */
5203
- postal_code: string;
5263
+ line_1: string;
5204
5264
 
5205
5265
  /**
5206
- * Two-letter state code.
5266
+ * Secondary street address, or null if not recorded.
5207
5267
  */
5208
- state: string;
5268
+ line_2: string | null;
5209
5269
 
5210
5270
  /**
5211
- * Primary street address.
5271
+ * Postal or ZIP code.
5212
5272
  */
5213
- street_line_1: string;
5273
+ postal_code: string;
5214
5274
 
5215
5275
  /**
5216
- * Secondary street address (apartment, suite, etc.).
5276
+ * State, province, or region.
5217
5277
  */
5218
- street_line_2: string | null;
5278
+ state: string;
5219
5279
  }
5220
5280
 
5221
- export interface NonUsResidentialAddressResponse {
5281
+ export interface V1NonUsResidentialAddress {
5222
5282
  /**
5223
- * City name.
5283
+ * City or locality.
5224
5284
  */
5225
5285
  city: string;
5226
5286
 
5227
5287
  /**
5228
5288
  * ISO 3166-1 alpha-2 country code.
5229
5289
  */
5230
- country:
5290
+ country_code:
5231
5291
  | 'AF'
5232
5292
  | 'AL'
5233
5293
  | 'DZ'
@@ -5479,63 +5539,68 @@ export namespace AccountHolderActiveWebhookEvent {
5479
5539
  | 'XK';
5480
5540
 
5481
5541
  /**
5482
- * Postal or ZIP code.
5542
+ * Primary street address.
5483
5543
  */
5484
- postal_code: string;
5544
+ line_1: string;
5485
5545
 
5486
5546
  /**
5487
- * Primary street address.
5547
+ * Secondary street address, or null if not recorded.
5488
5548
  */
5489
- street_line_1: string;
5549
+ line_2: string | null;
5490
5550
 
5491
5551
  /**
5492
- * Secondary street address (apartment, suite, etc.).
5552
+ * Postal or ZIP code.
5553
+ */
5554
+ postal_code: string;
5555
+
5556
+ /**
5557
+ * State, province, or region, or null if not recorded.
5493
5558
  */
5494
- street_line_2: string | null;
5559
+ state: string | null;
5495
5560
  }
5496
5561
 
5497
- export interface UsResidentialAddressResponse {
5562
+ export interface V1UsResidentialAddress {
5498
5563
  /**
5499
- * City name.
5564
+ * City or locality.
5500
5565
  */
5501
5566
  city: string;
5502
5567
 
5503
5568
  /**
5504
5569
  * ISO 3166-1 alpha-2 country code.
5505
5570
  */
5506
- country: 'US';
5571
+ country_code: 'US';
5507
5572
 
5508
5573
  /**
5509
- * Postal or ZIP code.
5574
+ * Primary street address.
5510
5575
  */
5511
- postal_code: string;
5576
+ line_1: string;
5512
5577
 
5513
5578
  /**
5514
- * Two-letter state code.
5579
+ * Secondary street address, or null if not recorded.
5515
5580
  */
5516
- state: string;
5581
+ line_2: string | null;
5517
5582
 
5518
5583
  /**
5519
- * Primary street address.
5584
+ * Postal or ZIP code.
5520
5585
  */
5521
- street_line_1: string;
5586
+ postal_code: string;
5522
5587
 
5523
5588
  /**
5524
- * Secondary street address (apartment, suite, etc.).
5589
+ * State, province, or region.
5525
5590
  */
5526
- street_line_2: string | null;
5591
+ state: string;
5527
5592
  }
5528
5593
 
5529
- export interface NonUsResidentialAddressResponse {
5594
+ export interface V1NonUsResidentialAddress {
5530
5595
  /**
5531
- * City name.
5596
+ * City or locality.
5532
5597
  */
5533
5598
  city: string;
5534
5599
 
5535
5600
  /**
5536
5601
  * ISO 3166-1 alpha-2 country code.
5537
5602
  */
5538
- country:
5603
+ country_code:
5539
5604
  | 'AF'
5540
5605
  | 'AL'
5541
5606
  | 'DZ'
@@ -5787,28 +5852,33 @@ export namespace AccountHolderActiveWebhookEvent {
5787
5852
  | 'XK';
5788
5853
 
5789
5854
  /**
5790
- * Postal or ZIP code.
5855
+ * Primary street address.
5791
5856
  */
5792
- postal_code: string;
5857
+ line_1: string;
5793
5858
 
5794
5859
  /**
5795
- * Primary street address.
5860
+ * Secondary street address, or null if not recorded.
5861
+ */
5862
+ line_2: string | null;
5863
+
5864
+ /**
5865
+ * Postal or ZIP code.
5796
5866
  */
5797
- street_line_1: string;
5867
+ postal_code: string;
5798
5868
 
5799
5869
  /**
5800
- * Secondary street address (apartment, suite, etc.).
5870
+ * State, province, or region, or null if not recorded.
5801
5871
  */
5802
- street_line_2: string | null;
5872
+ state: string | null;
5803
5873
  }
5804
5874
 
5805
- export interface EinIdentification {
5875
+ export interface V1EinIdentification {
5806
5876
  type: 'ein';
5807
5877
 
5808
5878
  value: string;
5809
5879
  }
5810
5880
 
5811
- export interface SsnIdentification {
5881
+ export interface V1SsnIdentification {
5812
5882
  type: 'ssn';
5813
5883
 
5814
5884
  value: string;
@@ -5855,12 +5925,15 @@ export namespace AccountHolderClosedWebhookEvent {
5855
5925
  id: string;
5856
5926
 
5857
5927
  /**
5858
- * Beneficiary details used to create this account holder.
5928
+ * Beneficiary details used to create this account holder. Which shape is returned
5929
+ * follows `country_of_citizenship`: **US individual** when it is `US`, **Non-US
5930
+ * individual** for any other country, **Business** when `holder_type` is
5931
+ * `business`.
5859
5932
  */
5860
5933
  beneficiary_data:
5861
- | Payload.UsBeneficiaryDataResponse
5862
- | Payload.NonUsBeneficiaryDataResponse
5863
- | Payload.BusinessBeneficiaryDataResponse;
5934
+ | Payload.V1UsBeneficiaryDataResponse
5935
+ | Payload.V1NonUsBeneficiaryDataResponse
5936
+ | Payload.V1BusinessBeneficiaryDataResponse;
5864
5937
 
5865
5938
  /**
5866
5939
  * ISO 8601 UTC timestamp when the account holder was created.
@@ -5884,7 +5957,7 @@ export namespace AccountHolderClosedWebhookEvent {
5884
5957
  }
5885
5958
 
5886
5959
  export namespace Payload {
5887
- export interface UsBeneficiaryDataResponse {
5960
+ export interface V1UsBeneficiaryDataResponse {
5888
5961
  /**
5889
5962
  * ISO 3166-1 alpha-2 country code of citizenship.
5890
5963
  */
@@ -5900,8 +5973,8 @@ export namespace AccountHolderClosedWebhookEvent {
5900
5973
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
5901
5974
  */
5902
5975
  identification:
5903
- | UsBeneficiaryDataResponse.SsnIdentification
5904
- | UsBeneficiaryDataResponse.ItinIdentification;
5976
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
5977
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
5905
5978
 
5906
5979
  /**
5907
5980
  * Full legal name of the account holder.
@@ -5909,68 +5982,70 @@ export namespace AccountHolderClosedWebhookEvent {
5909
5982
  legal_name: string;
5910
5983
 
5911
5984
  /**
5912
- * Residential address of the account holder.
5985
+ * Residential address of the account holder. **US address** requires
5986
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
5987
+ * other country and allows `state` to be null.
5913
5988
  */
5914
5989
  residential_address:
5915
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
5916
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
5990
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
5991
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
5917
5992
  }
5918
5993
 
5919
- export namespace UsBeneficiaryDataResponse {
5920
- export interface SsnIdentification {
5994
+ export namespace V1UsBeneficiaryDataResponse {
5995
+ export interface V1SsnIdentification {
5921
5996
  type: 'ssn';
5922
5997
 
5923
5998
  value: string;
5924
5999
  }
5925
6000
 
5926
- export interface ItinIdentification {
6001
+ export interface V1ItinIdentification {
5927
6002
  type: 'itin';
5928
6003
 
5929
6004
  value: string;
5930
6005
  }
5931
6006
 
5932
- export interface UsResidentialAddressResponse {
6007
+ export interface V1UsResidentialAddress {
5933
6008
  /**
5934
- * City name.
6009
+ * City or locality.
5935
6010
  */
5936
6011
  city: string;
5937
6012
 
5938
6013
  /**
5939
6014
  * ISO 3166-1 alpha-2 country code.
5940
6015
  */
5941
- country: 'US';
6016
+ country_code: 'US';
5942
6017
 
5943
6018
  /**
5944
- * Postal or ZIP code.
6019
+ * Primary street address.
5945
6020
  */
5946
- postal_code: string;
6021
+ line_1: string;
5947
6022
 
5948
6023
  /**
5949
- * Two-letter state code.
6024
+ * Secondary street address, or null if not recorded.
5950
6025
  */
5951
- state: string;
6026
+ line_2: string | null;
5952
6027
 
5953
6028
  /**
5954
- * Primary street address.
6029
+ * Postal or ZIP code.
5955
6030
  */
5956
- street_line_1: string;
6031
+ postal_code: string;
5957
6032
 
5958
6033
  /**
5959
- * Secondary street address (apartment, suite, etc.).
6034
+ * State, province, or region.
5960
6035
  */
5961
- street_line_2: string | null;
6036
+ state: string;
5962
6037
  }
5963
6038
 
5964
- export interface NonUsResidentialAddressResponse {
6039
+ export interface V1NonUsResidentialAddress {
5965
6040
  /**
5966
- * City name.
6041
+ * City or locality.
5967
6042
  */
5968
6043
  city: string;
5969
6044
 
5970
6045
  /**
5971
6046
  * ISO 3166-1 alpha-2 country code.
5972
6047
  */
5973
- country:
6048
+ country_code:
5974
6049
  | 'AF'
5975
6050
  | 'AL'
5976
6051
  | 'DZ'
@@ -6222,23 +6297,28 @@ export namespace AccountHolderClosedWebhookEvent {
6222
6297
  | 'XK';
6223
6298
 
6224
6299
  /**
6225
- * Postal or ZIP code.
6300
+ * Primary street address.
6226
6301
  */
6227
- postal_code: string;
6302
+ line_1: string;
6228
6303
 
6229
6304
  /**
6230
- * Primary street address.
6305
+ * Secondary street address, or null if not recorded.
6306
+ */
6307
+ line_2: string | null;
6308
+
6309
+ /**
6310
+ * Postal or ZIP code.
6231
6311
  */
6232
- street_line_1: string;
6312
+ postal_code: string;
6233
6313
 
6234
6314
  /**
6235
- * Secondary street address (apartment, suite, etc.).
6315
+ * State, province, or region, or null if not recorded.
6236
6316
  */
6237
- street_line_2: string | null;
6317
+ state: string | null;
6238
6318
  }
6239
6319
  }
6240
6320
 
6241
- export interface NonUsBeneficiaryDataResponse {
6321
+ export interface V1NonUsBeneficiaryDataResponse {
6242
6322
  /**
6243
6323
  * ISO 3166-1 alpha-2 country code of citizenship.
6244
6324
  */
@@ -6501,7 +6581,7 @@ export namespace AccountHolderClosedWebhookEvent {
6501
6581
  /**
6502
6582
  * Government-issued identification with type: "id" (generic government-issued ID).
6503
6583
  */
6504
- identification: NonUsBeneficiaryDataResponse.Identification;
6584
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
6505
6585
 
6506
6586
  /**
6507
6587
  * Full legal name of the account holder.
@@ -6509,14 +6589,16 @@ export namespace AccountHolderClosedWebhookEvent {
6509
6589
  legal_name: string;
6510
6590
 
6511
6591
  /**
6512
- * Residential address of the account holder.
6592
+ * Residential address of the account holder. **US address** requires
6593
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
6594
+ * other country and allows `state` to be null.
6513
6595
  */
6514
6596
  residential_address:
6515
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
6516
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
6597
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
6598
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
6517
6599
  }
6518
6600
 
6519
- export namespace NonUsBeneficiaryDataResponse {
6601
+ export namespace V1NonUsBeneficiaryDataResponse {
6520
6602
  /**
6521
6603
  * Government-issued identification with type: "id" (generic government-issued ID).
6522
6604
  */
@@ -6526,48 +6608,48 @@ export namespace AccountHolderClosedWebhookEvent {
6526
6608
  value: string;
6527
6609
  }
6528
6610
 
6529
- export interface UsResidentialAddressResponse {
6611
+ export interface V1UsResidentialAddress {
6530
6612
  /**
6531
- * City name.
6613
+ * City or locality.
6532
6614
  */
6533
6615
  city: string;
6534
6616
 
6535
6617
  /**
6536
6618
  * ISO 3166-1 alpha-2 country code.
6537
6619
  */
6538
- country: 'US';
6620
+ country_code: 'US';
6539
6621
 
6540
6622
  /**
6541
- * Postal or ZIP code.
6623
+ * Primary street address.
6542
6624
  */
6543
- postal_code: string;
6625
+ line_1: string;
6544
6626
 
6545
6627
  /**
6546
- * Two-letter state code.
6628
+ * Secondary street address, or null if not recorded.
6547
6629
  */
6548
- state: string;
6630
+ line_2: string | null;
6549
6631
 
6550
6632
  /**
6551
- * Primary street address.
6633
+ * Postal or ZIP code.
6552
6634
  */
6553
- street_line_1: string;
6635
+ postal_code: string;
6554
6636
 
6555
6637
  /**
6556
- * Secondary street address (apartment, suite, etc.).
6638
+ * State, province, or region.
6557
6639
  */
6558
- street_line_2: string | null;
6640
+ state: string;
6559
6641
  }
6560
6642
 
6561
- export interface NonUsResidentialAddressResponse {
6643
+ export interface V1NonUsResidentialAddress {
6562
6644
  /**
6563
- * City name.
6645
+ * City or locality.
6564
6646
  */
6565
6647
  city: string;
6566
6648
 
6567
6649
  /**
6568
6650
  * ISO 3166-1 alpha-2 country code.
6569
6651
  */
6570
- country:
6652
+ country_code:
6571
6653
  | 'AF'
6572
6654
  | 'AL'
6573
6655
  | 'DZ'
@@ -6819,38 +6901,44 @@ export namespace AccountHolderClosedWebhookEvent {
6819
6901
  | 'XK';
6820
6902
 
6821
6903
  /**
6822
- * Postal or ZIP code.
6904
+ * Primary street address.
6823
6905
  */
6824
- postal_code: string;
6906
+ line_1: string;
6825
6907
 
6826
6908
  /**
6827
- * Primary street address.
6909
+ * Secondary street address, or null if not recorded.
6910
+ */
6911
+ line_2: string | null;
6912
+
6913
+ /**
6914
+ * Postal or ZIP code.
6828
6915
  */
6829
- street_line_1: string;
6916
+ postal_code: string;
6830
6917
 
6831
6918
  /**
6832
- * Secondary street address (apartment, suite, etc.).
6919
+ * State, province, or region, or null if not recorded.
6833
6920
  */
6834
- street_line_2: string | null;
6921
+ state: string | null;
6835
6922
  }
6836
6923
  }
6837
6924
 
6838
- export interface BusinessBeneficiaryDataResponse {
6925
+ export interface V1BusinessBeneficiaryDataResponse {
6839
6926
  /**
6840
6927
  * Beneficial owners of the business. At least one required.
6841
6928
  */
6842
6929
  beneficial_owners: Array<
6843
- | BusinessBeneficiaryDataResponse.UsBeneficiaryDataResponse
6844
- | BusinessBeneficiaryDataResponse.NonUsBeneficiaryDataResponse
6930
+ | V1BusinessBeneficiaryDataResponse.V1UsBeneficiaryDataResponse
6931
+ | V1BusinessBeneficiaryDataResponse.V1NonUsBeneficiaryDataResponse
6845
6932
  >;
6846
6933
 
6847
6934
  /**
6848
6935
  * Individual with primary responsibility for controlling, managing, or directing
6849
- * the business.
6936
+ * the business. Follows the same US / non-US split as `beneficiary_data`, based on
6937
+ * the control person's own `country_of_citizenship`.
6850
6938
  */
6851
6939
  control_person:
6852
- | BusinessBeneficiaryDataResponse.UnionMember0
6853
- | BusinessBeneficiaryDataResponse.UnionMember1;
6940
+ | V1BusinessBeneficiaryDataResponse.UnionMember0
6941
+ | V1BusinessBeneficiaryDataResponse.UnionMember1;
6854
6942
 
6855
6943
  /**
6856
6944
  * ISO 3166-1 alpha-2 country code where the business is incorporated.
@@ -7118,26 +7206,30 @@ export namespace AccountHolderClosedWebhookEvent {
7118
7206
  legal_business_name: string;
7119
7207
 
7120
7208
  /**
7121
- * Physical operating address of the business.
7209
+ * Physical operating address of the business. **US address** requires
7210
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7211
+ * other country and allows `state` to be null.
7122
7212
  */
7123
7213
  physical_address:
7124
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7125
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7214
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
7215
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7126
7216
 
7127
7217
  /**
7128
- * Registered legal address of the business.
7218
+ * Registered legal address of the business. **US address** requires
7219
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7220
+ * other country and allows `state` to be null.
7129
7221
  */
7130
7222
  registered_address:
7131
- | BusinessBeneficiaryDataResponse.UsResidentialAddressResponse
7132
- | BusinessBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7223
+ | V1BusinessBeneficiaryDataResponse.V1UsResidentialAddress
7224
+ | V1BusinessBeneficiaryDataResponse.V1NonUsResidentialAddress;
7133
7225
 
7134
7226
  /**
7135
7227
  * Business registration number: type "ein" (Employer Identification Number, format
7136
7228
  * ##-#######) or "ssn" (Social Security Number, format ###-##-####).
7137
7229
  */
7138
7230
  registration_number:
7139
- | BusinessBeneficiaryDataResponse.EinIdentification
7140
- | BusinessBeneficiaryDataResponse.SsnIdentification;
7231
+ | V1BusinessBeneficiaryDataResponse.V1EinIdentification
7232
+ | V1BusinessBeneficiaryDataResponse.V1SsnIdentification;
7141
7233
 
7142
7234
  /**
7143
7235
  * State or subdivision where the business is incorporated.
@@ -7150,8 +7242,8 @@ export namespace AccountHolderClosedWebhookEvent {
7150
7242
  year_of_incorporation: number;
7151
7243
  }
7152
7244
 
7153
- export namespace BusinessBeneficiaryDataResponse {
7154
- export interface UsBeneficiaryDataResponse {
7245
+ export namespace V1BusinessBeneficiaryDataResponse {
7246
+ export interface V1UsBeneficiaryDataResponse {
7155
7247
  /**
7156
7248
  * ISO 3166-1 alpha-2 country code of citizenship.
7157
7249
  */
@@ -7167,8 +7259,8 @@ export namespace AccountHolderClosedWebhookEvent {
7167
7259
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
7168
7260
  */
7169
7261
  identification:
7170
- | UsBeneficiaryDataResponse.SsnIdentification
7171
- | UsBeneficiaryDataResponse.ItinIdentification;
7262
+ | V1UsBeneficiaryDataResponse.V1SsnIdentification
7263
+ | V1UsBeneficiaryDataResponse.V1ItinIdentification;
7172
7264
 
7173
7265
  /**
7174
7266
  * Full legal name of the account holder.
@@ -7176,68 +7268,70 @@ export namespace AccountHolderClosedWebhookEvent {
7176
7268
  legal_name: string;
7177
7269
 
7178
7270
  /**
7179
- * Residential address of the account holder.
7271
+ * Residential address of the account holder. **US address** requires
7272
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7273
+ * other country and allows `state` to be null.
7180
7274
  */
7181
7275
  residential_address:
7182
- | UsBeneficiaryDataResponse.UsResidentialAddressResponse
7183
- | UsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7276
+ | V1UsBeneficiaryDataResponse.V1UsResidentialAddress
7277
+ | V1UsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7184
7278
  }
7185
7279
 
7186
- export namespace UsBeneficiaryDataResponse {
7187
- export interface SsnIdentification {
7280
+ export namespace V1UsBeneficiaryDataResponse {
7281
+ export interface V1SsnIdentification {
7188
7282
  type: 'ssn';
7189
7283
 
7190
7284
  value: string;
7191
7285
  }
7192
7286
 
7193
- export interface ItinIdentification {
7287
+ export interface V1ItinIdentification {
7194
7288
  type: 'itin';
7195
7289
 
7196
7290
  value: string;
7197
7291
  }
7198
7292
 
7199
- export interface UsResidentialAddressResponse {
7293
+ export interface V1UsResidentialAddress {
7200
7294
  /**
7201
- * City name.
7295
+ * City or locality.
7202
7296
  */
7203
7297
  city: string;
7204
7298
 
7205
7299
  /**
7206
7300
  * ISO 3166-1 alpha-2 country code.
7207
7301
  */
7208
- country: 'US';
7302
+ country_code: 'US';
7209
7303
 
7210
7304
  /**
7211
- * Postal or ZIP code.
7305
+ * Primary street address.
7212
7306
  */
7213
- postal_code: string;
7307
+ line_1: string;
7214
7308
 
7215
7309
  /**
7216
- * Two-letter state code.
7310
+ * Secondary street address, or null if not recorded.
7217
7311
  */
7218
- state: string;
7312
+ line_2: string | null;
7219
7313
 
7220
7314
  /**
7221
- * Primary street address.
7315
+ * Postal or ZIP code.
7222
7316
  */
7223
- street_line_1: string;
7317
+ postal_code: string;
7224
7318
 
7225
7319
  /**
7226
- * Secondary street address (apartment, suite, etc.).
7320
+ * State, province, or region.
7227
7321
  */
7228
- street_line_2: string | null;
7322
+ state: string;
7229
7323
  }
7230
7324
 
7231
- export interface NonUsResidentialAddressResponse {
7325
+ export interface V1NonUsResidentialAddress {
7232
7326
  /**
7233
- * City name.
7327
+ * City or locality.
7234
7328
  */
7235
7329
  city: string;
7236
7330
 
7237
7331
  /**
7238
7332
  * ISO 3166-1 alpha-2 country code.
7239
7333
  */
7240
- country:
7334
+ country_code:
7241
7335
  | 'AF'
7242
7336
  | 'AL'
7243
7337
  | 'DZ'
@@ -7489,23 +7583,28 @@ export namespace AccountHolderClosedWebhookEvent {
7489
7583
  | 'XK';
7490
7584
 
7491
7585
  /**
7492
- * Postal or ZIP code.
7586
+ * Primary street address.
7493
7587
  */
7494
- postal_code: string;
7588
+ line_1: string;
7495
7589
 
7496
7590
  /**
7497
- * Primary street address.
7591
+ * Secondary street address, or null if not recorded.
7592
+ */
7593
+ line_2: string | null;
7594
+
7595
+ /**
7596
+ * Postal or ZIP code.
7498
7597
  */
7499
- street_line_1: string;
7598
+ postal_code: string;
7500
7599
 
7501
7600
  /**
7502
- * Secondary street address (apartment, suite, etc.).
7601
+ * State, province, or region, or null if not recorded.
7503
7602
  */
7504
- street_line_2: string | null;
7603
+ state: string | null;
7505
7604
  }
7506
7605
  }
7507
7606
 
7508
- export interface NonUsBeneficiaryDataResponse {
7607
+ export interface V1NonUsBeneficiaryDataResponse {
7509
7608
  /**
7510
7609
  * ISO 3166-1 alpha-2 country code of citizenship.
7511
7610
  */
@@ -7768,7 +7867,7 @@ export namespace AccountHolderClosedWebhookEvent {
7768
7867
  /**
7769
7868
  * Government-issued identification with type: "id" (generic government-issued ID).
7770
7869
  */
7771
- identification: NonUsBeneficiaryDataResponse.Identification;
7870
+ identification: V1NonUsBeneficiaryDataResponse.Identification;
7772
7871
 
7773
7872
  /**
7774
7873
  * Full legal name of the account holder.
@@ -7776,14 +7875,16 @@ export namespace AccountHolderClosedWebhookEvent {
7776
7875
  legal_name: string;
7777
7876
 
7778
7877
  /**
7779
- * Residential address of the account holder.
7878
+ * Residential address of the account holder. **US address** requires
7879
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
7880
+ * other country and allows `state` to be null.
7780
7881
  */
7781
7882
  residential_address:
7782
- | NonUsBeneficiaryDataResponse.UsResidentialAddressResponse
7783
- | NonUsBeneficiaryDataResponse.NonUsResidentialAddressResponse;
7883
+ | V1NonUsBeneficiaryDataResponse.V1UsResidentialAddress
7884
+ | V1NonUsBeneficiaryDataResponse.V1NonUsResidentialAddress;
7784
7885
  }
7785
7886
 
7786
- export namespace NonUsBeneficiaryDataResponse {
7887
+ export namespace V1NonUsBeneficiaryDataResponse {
7787
7888
  /**
7788
7889
  * Government-issued identification with type: "id" (generic government-issued ID).
7789
7890
  */
@@ -7793,48 +7894,48 @@ export namespace AccountHolderClosedWebhookEvent {
7793
7894
  value: string;
7794
7895
  }
7795
7896
 
7796
- export interface UsResidentialAddressResponse {
7897
+ export interface V1UsResidentialAddress {
7797
7898
  /**
7798
- * City name.
7899
+ * City or locality.
7799
7900
  */
7800
7901
  city: string;
7801
7902
 
7802
7903
  /**
7803
7904
  * ISO 3166-1 alpha-2 country code.
7804
7905
  */
7805
- country: 'US';
7906
+ country_code: 'US';
7806
7907
 
7807
7908
  /**
7808
- * Postal or ZIP code.
7909
+ * Primary street address.
7809
7910
  */
7810
- postal_code: string;
7911
+ line_1: string;
7811
7912
 
7812
7913
  /**
7813
- * Two-letter state code.
7914
+ * Secondary street address, or null if not recorded.
7814
7915
  */
7815
- state: string;
7916
+ line_2: string | null;
7816
7917
 
7817
7918
  /**
7818
- * Primary street address.
7919
+ * Postal or ZIP code.
7819
7920
  */
7820
- street_line_1: string;
7921
+ postal_code: string;
7821
7922
 
7822
7923
  /**
7823
- * Secondary street address (apartment, suite, etc.).
7924
+ * State, province, or region.
7824
7925
  */
7825
- street_line_2: string | null;
7926
+ state: string;
7826
7927
  }
7827
7928
 
7828
- export interface NonUsResidentialAddressResponse {
7929
+ export interface V1NonUsResidentialAddress {
7829
7930
  /**
7830
- * City name.
7931
+ * City or locality.
7831
7932
  */
7832
7933
  city: string;
7833
7934
 
7834
7935
  /**
7835
7936
  * ISO 3166-1 alpha-2 country code.
7836
7937
  */
7837
- country:
7938
+ country_code:
7838
7939
  | 'AF'
7839
7940
  | 'AL'
7840
7941
  | 'DZ'
@@ -8086,19 +8187,24 @@ export namespace AccountHolderClosedWebhookEvent {
8086
8187
  | 'XK';
8087
8188
 
8088
8189
  /**
8089
- * Postal or ZIP code.
8190
+ * Primary street address.
8090
8191
  */
8091
- postal_code: string;
8192
+ line_1: string;
8092
8193
 
8093
8194
  /**
8094
- * Primary street address.
8195
+ * Secondary street address, or null if not recorded.
8196
+ */
8197
+ line_2: string | null;
8198
+
8199
+ /**
8200
+ * Postal or ZIP code.
8095
8201
  */
8096
- street_line_1: string;
8202
+ postal_code: string;
8097
8203
 
8098
8204
  /**
8099
- * Secondary street address (apartment, suite, etc.).
8205
+ * State, province, or region, or null if not recorded.
8100
8206
  */
8101
- street_line_2: string | null;
8207
+ state: string | null;
8102
8208
  }
8103
8209
  }
8104
8210
 
@@ -8117,7 +8223,7 @@ export namespace AccountHolderClosedWebhookEvent {
8117
8223
  * Government-issued identification with type: "ssn" (Social Security Number,
8118
8224
  * format ###-##-####) or "itin" (Individual Taxpayer ID, format 9##-##-####).
8119
8225
  */
8120
- identification: UnionMember0.SsnIdentification | UnionMember0.ItinIdentification;
8226
+ identification: UnionMember0.V1SsnIdentification | UnionMember0.V1ItinIdentification;
8121
8227
 
8122
8228
  /**
8123
8229
  * Full legal name of the account holder.
@@ -8125,11 +8231,11 @@ export namespace AccountHolderClosedWebhookEvent {
8125
8231
  legal_name: string;
8126
8232
 
8127
8233
  /**
8128
- * Residential address of the account holder.
8234
+ * Residential address of the account holder. **US address** requires
8235
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
8236
+ * other country and allows `state` to be null.
8129
8237
  */
8130
- residential_address:
8131
- | UnionMember0.UsResidentialAddressResponse
8132
- | UnionMember0.NonUsResidentialAddressResponse;
8238
+ residential_address: UnionMember0.V1UsResidentialAddress | UnionMember0.V1NonUsResidentialAddress;
8133
8239
 
8134
8240
  /**
8135
8241
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8139,60 +8245,60 @@ export namespace AccountHolderClosedWebhookEvent {
8139
8245
  }
8140
8246
 
8141
8247
  export namespace UnionMember0 {
8142
- export interface SsnIdentification {
8248
+ export interface V1SsnIdentification {
8143
8249
  type: 'ssn';
8144
8250
 
8145
8251
  value: string;
8146
8252
  }
8147
8253
 
8148
- export interface ItinIdentification {
8254
+ export interface V1ItinIdentification {
8149
8255
  type: 'itin';
8150
8256
 
8151
8257
  value: string;
8152
8258
  }
8153
8259
 
8154
- export interface UsResidentialAddressResponse {
8260
+ export interface V1UsResidentialAddress {
8155
8261
  /**
8156
- * City name.
8262
+ * City or locality.
8157
8263
  */
8158
8264
  city: string;
8159
8265
 
8160
8266
  /**
8161
8267
  * ISO 3166-1 alpha-2 country code.
8162
8268
  */
8163
- country: 'US';
8269
+ country_code: 'US';
8164
8270
 
8165
8271
  /**
8166
- * Postal or ZIP code.
8272
+ * Primary street address.
8167
8273
  */
8168
- postal_code: string;
8274
+ line_1: string;
8169
8275
 
8170
8276
  /**
8171
- * Two-letter state code.
8277
+ * Secondary street address, or null if not recorded.
8172
8278
  */
8173
- state: string;
8279
+ line_2: string | null;
8174
8280
 
8175
8281
  /**
8176
- * Primary street address.
8282
+ * Postal or ZIP code.
8177
8283
  */
8178
- street_line_1: string;
8284
+ postal_code: string;
8179
8285
 
8180
8286
  /**
8181
- * Secondary street address (apartment, suite, etc.).
8287
+ * State, province, or region.
8182
8288
  */
8183
- street_line_2: string | null;
8289
+ state: string;
8184
8290
  }
8185
8291
 
8186
- export interface NonUsResidentialAddressResponse {
8292
+ export interface V1NonUsResidentialAddress {
8187
8293
  /**
8188
- * City name.
8294
+ * City or locality.
8189
8295
  */
8190
8296
  city: string;
8191
8297
 
8192
8298
  /**
8193
8299
  * ISO 3166-1 alpha-2 country code.
8194
8300
  */
8195
- country:
8301
+ country_code:
8196
8302
  | 'AF'
8197
8303
  | 'AL'
8198
8304
  | 'DZ'
@@ -8444,19 +8550,24 @@ export namespace AccountHolderClosedWebhookEvent {
8444
8550
  | 'XK';
8445
8551
 
8446
8552
  /**
8447
- * Postal or ZIP code.
8553
+ * Primary street address.
8448
8554
  */
8449
- postal_code: string;
8555
+ line_1: string;
8450
8556
 
8451
8557
  /**
8452
- * Primary street address.
8558
+ * Secondary street address, or null if not recorded.
8559
+ */
8560
+ line_2: string | null;
8561
+
8562
+ /**
8563
+ * Postal or ZIP code.
8453
8564
  */
8454
- street_line_1: string;
8565
+ postal_code: string;
8455
8566
 
8456
8567
  /**
8457
- * Secondary street address (apartment, suite, etc.).
8568
+ * State, province, or region, or null if not recorded.
8458
8569
  */
8459
- street_line_2: string | null;
8570
+ state: string | null;
8460
8571
  }
8461
8572
  }
8462
8573
 
@@ -8731,11 +8842,11 @@ export namespace AccountHolderClosedWebhookEvent {
8731
8842
  legal_name: string;
8732
8843
 
8733
8844
  /**
8734
- * Residential address of the account holder.
8845
+ * Residential address of the account holder. **US address** requires
8846
+ * `country_code: US` and a two-letter `state`. **Non-US address** accepts any
8847
+ * other country and allows `state` to be null.
8735
8848
  */
8736
- residential_address:
8737
- | UnionMember1.UsResidentialAddressResponse
8738
- | UnionMember1.NonUsResidentialAddressResponse;
8849
+ residential_address: UnionMember1.V1UsResidentialAddress | UnionMember1.V1NonUsResidentialAddress;
8739
8850
 
8740
8851
  /**
8741
8852
  * Role of the control person at the business (e.g., "CEO", "President", "Managing
@@ -8754,48 +8865,48 @@ export namespace AccountHolderClosedWebhookEvent {
8754
8865
  value: string;
8755
8866
  }
8756
8867
 
8757
- export interface UsResidentialAddressResponse {
8868
+ export interface V1UsResidentialAddress {
8758
8869
  /**
8759
- * City name.
8870
+ * City or locality.
8760
8871
  */
8761
8872
  city: string;
8762
8873
 
8763
8874
  /**
8764
8875
  * ISO 3166-1 alpha-2 country code.
8765
8876
  */
8766
- country: 'US';
8877
+ country_code: 'US';
8767
8878
 
8768
8879
  /**
8769
- * Postal or ZIP code.
8880
+ * Primary street address.
8770
8881
  */
8771
- postal_code: string;
8882
+ line_1: string;
8772
8883
 
8773
8884
  /**
8774
- * Two-letter state code.
8885
+ * Secondary street address, or null if not recorded.
8775
8886
  */
8776
- state: string;
8887
+ line_2: string | null;
8777
8888
 
8778
8889
  /**
8779
- * Primary street address.
8890
+ * Postal or ZIP code.
8780
8891
  */
8781
- street_line_1: string;
8892
+ postal_code: string;
8782
8893
 
8783
8894
  /**
8784
- * Secondary street address (apartment, suite, etc.).
8895
+ * State, province, or region.
8785
8896
  */
8786
- street_line_2: string | null;
8897
+ state: string;
8787
8898
  }
8788
8899
 
8789
- export interface NonUsResidentialAddressResponse {
8900
+ export interface V1NonUsResidentialAddress {
8790
8901
  /**
8791
- * City name.
8902
+ * City or locality.
8792
8903
  */
8793
8904
  city: string;
8794
8905
 
8795
8906
  /**
8796
8907
  * ISO 3166-1 alpha-2 country code.
8797
8908
  */
8798
- country:
8909
+ country_code:
8799
8910
  | 'AF'
8800
8911
  | 'AL'
8801
8912
  | 'DZ'
@@ -9047,64 +9158,69 @@ export namespace AccountHolderClosedWebhookEvent {
9047
9158
  | 'XK';
9048
9159
 
9049
9160
  /**
9050
- * Postal or ZIP code.
9161
+ * Primary street address.
9051
9162
  */
9052
- postal_code: string;
9163
+ line_1: string;
9053
9164
 
9054
9165
  /**
9055
- * Primary street address.
9166
+ * Secondary street address, or null if not recorded.
9167
+ */
9168
+ line_2: string | null;
9169
+
9170
+ /**
9171
+ * Postal or ZIP code.
9056
9172
  */
9057
- street_line_1: string;
9173
+ postal_code: string;
9058
9174
 
9059
9175
  /**
9060
- * Secondary street address (apartment, suite, etc.).
9176
+ * State, province, or region, or null if not recorded.
9061
9177
  */
9062
- street_line_2: string | null;
9178
+ state: string | null;
9063
9179
  }
9064
9180
  }
9065
9181
 
9066
- export interface UsResidentialAddressResponse {
9182
+ export interface V1UsResidentialAddress {
9067
9183
  /**
9068
- * City name.
9184
+ * City or locality.
9069
9185
  */
9070
9186
  city: string;
9071
9187
 
9072
9188
  /**
9073
9189
  * ISO 3166-1 alpha-2 country code.
9074
9190
  */
9075
- country: 'US';
9191
+ country_code: 'US';
9076
9192
 
9077
9193
  /**
9078
- * Postal or ZIP code.
9194
+ * Primary street address.
9079
9195
  */
9080
- postal_code: string;
9196
+ line_1: string;
9081
9197
 
9082
9198
  /**
9083
- * Two-letter state code.
9199
+ * Secondary street address, or null if not recorded.
9084
9200
  */
9085
- state: string;
9201
+ line_2: string | null;
9086
9202
 
9087
9203
  /**
9088
- * Primary street address.
9204
+ * Postal or ZIP code.
9089
9205
  */
9090
- street_line_1: string;
9206
+ postal_code: string;
9091
9207
 
9092
9208
  /**
9093
- * Secondary street address (apartment, suite, etc.).
9209
+ * State, province, or region.
9094
9210
  */
9095
- street_line_2: string | null;
9211
+ state: string;
9096
9212
  }
9097
9213
 
9098
- export interface NonUsResidentialAddressResponse {
9214
+ export interface V1NonUsResidentialAddress {
9099
9215
  /**
9100
- * City name.
9216
+ * City or locality.
9101
9217
  */
9102
9218
  city: string;
9103
9219
 
9104
9220
  /**
9105
9221
  * ISO 3166-1 alpha-2 country code.
9106
9222
  */
9107
- country:
9223
+ country_code:
9108
9224
  | 'AF'
9109
9225
  | 'AL'
9110
9226
  | 'DZ'
@@ -9356,63 +9472,68 @@ export namespace AccountHolderClosedWebhookEvent {
9356
9472
  | 'XK';
9357
9473
 
9358
9474
  /**
9359
- * Postal or ZIP code.
9475
+ * Primary street address.
9360
9476
  */
9361
- postal_code: string;
9477
+ line_1: string;
9362
9478
 
9363
9479
  /**
9364
- * Primary street address.
9480
+ * Secondary street address, or null if not recorded.
9481
+ */
9482
+ line_2: string | null;
9483
+
9484
+ /**
9485
+ * Postal or ZIP code.
9365
9486
  */
9366
- street_line_1: string;
9487
+ postal_code: string;
9367
9488
 
9368
9489
  /**
9369
- * Secondary street address (apartment, suite, etc.).
9490
+ * State, province, or region, or null if not recorded.
9370
9491
  */
9371
- street_line_2: string | null;
9492
+ state: string | null;
9372
9493
  }
9373
9494
 
9374
- export interface UsResidentialAddressResponse {
9495
+ export interface V1UsResidentialAddress {
9375
9496
  /**
9376
- * City name.
9497
+ * City or locality.
9377
9498
  */
9378
9499
  city: string;
9379
9500
 
9380
9501
  /**
9381
9502
  * ISO 3166-1 alpha-2 country code.
9382
9503
  */
9383
- country: 'US';
9504
+ country_code: 'US';
9384
9505
 
9385
9506
  /**
9386
- * Postal or ZIP code.
9507
+ * Primary street address.
9387
9508
  */
9388
- postal_code: string;
9509
+ line_1: string;
9389
9510
 
9390
9511
  /**
9391
- * Two-letter state code.
9512
+ * Secondary street address, or null if not recorded.
9392
9513
  */
9393
- state: string;
9514
+ line_2: string | null;
9394
9515
 
9395
9516
  /**
9396
- * Primary street address.
9517
+ * Postal or ZIP code.
9397
9518
  */
9398
- street_line_1: string;
9519
+ postal_code: string;
9399
9520
 
9400
9521
  /**
9401
- * Secondary street address (apartment, suite, etc.).
9522
+ * State, province, or region.
9402
9523
  */
9403
- street_line_2: string | null;
9524
+ state: string;
9404
9525
  }
9405
9526
 
9406
- export interface NonUsResidentialAddressResponse {
9527
+ export interface V1NonUsResidentialAddress {
9407
9528
  /**
9408
- * City name.
9529
+ * City or locality.
9409
9530
  */
9410
9531
  city: string;
9411
9532
 
9412
9533
  /**
9413
9534
  * ISO 3166-1 alpha-2 country code.
9414
9535
  */
9415
- country:
9536
+ country_code:
9416
9537
  | 'AF'
9417
9538
  | 'AL'
9418
9539
  | 'DZ'
@@ -9664,28 +9785,33 @@ export namespace AccountHolderClosedWebhookEvent {
9664
9785
  | 'XK';
9665
9786
 
9666
9787
  /**
9667
- * Postal or ZIP code.
9788
+ * Primary street address.
9668
9789
  */
9669
- postal_code: string;
9790
+ line_1: string;
9670
9791
 
9671
9792
  /**
9672
- * Primary street address.
9793
+ * Secondary street address, or null if not recorded.
9794
+ */
9795
+ line_2: string | null;
9796
+
9797
+ /**
9798
+ * Postal or ZIP code.
9673
9799
  */
9674
- street_line_1: string;
9800
+ postal_code: string;
9675
9801
 
9676
9802
  /**
9677
- * Secondary street address (apartment, suite, etc.).
9803
+ * State, province, or region, or null if not recorded.
9678
9804
  */
9679
- street_line_2: string | null;
9805
+ state: string | null;
9680
9806
  }
9681
9807
 
9682
- export interface EinIdentification {
9808
+ export interface V1EinIdentification {
9683
9809
  type: 'ein';
9684
9810
 
9685
9811
  value: string;
9686
9812
  }
9687
9813
 
9688
- export interface SsnIdentification {
9814
+ export interface V1SsnIdentification {
9689
9815
  type: 'ssn';
9690
9816
 
9691
9817
  value: string;
@@ -9755,15 +9881,17 @@ export namespace PingTestWebhookEvent {
9755
9881
  }
9756
9882
 
9757
9883
  export type UnwrapWebhookEvent =
9758
- | PayoutCreatedWebhookEvent
9759
9884
  | PayoutInitiatedWebhookEvent
9760
- | PayoutPaidWebhookEvent
9885
+ | PayoutSubmittedWebhookEvent
9886
+ | PayoutSentWebhookEvent
9761
9887
  | PayoutFailedWebhookEvent
9888
+ | PayoutReturnedWebhookEvent
9762
9889
  | ReturnInitiatedWebhookEvent
9763
- | ReturnPaidWebhookEvent
9890
+ | ReturnSubmittedWebhookEvent
9891
+ | ReturnSentWebhookEvent
9764
9892
  | ReturnFailedWebhookEvent
9765
9893
  | ReturnReturnedWebhookEvent
9766
- | DepositReceivedWebhookEvent
9894
+ | DepositSettledWebhookEvent
9767
9895
  | ConversionCreatedWebhookEvent
9768
9896
  | ConversionCompletedWebhookEvent
9769
9897
  | ConversionFailedWebhookEvent
@@ -9773,15 +9901,17 @@ export type UnwrapWebhookEvent =
9773
9901
 
9774
9902
  export declare namespace Webhooks {
9775
9903
  export {
9776
- type PayoutCreatedWebhookEvent as PayoutCreatedWebhookEvent,
9777
9904
  type PayoutInitiatedWebhookEvent as PayoutInitiatedWebhookEvent,
9778
- type PayoutPaidWebhookEvent as PayoutPaidWebhookEvent,
9905
+ type PayoutSubmittedWebhookEvent as PayoutSubmittedWebhookEvent,
9906
+ type PayoutSentWebhookEvent as PayoutSentWebhookEvent,
9779
9907
  type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent,
9908
+ type PayoutReturnedWebhookEvent as PayoutReturnedWebhookEvent,
9780
9909
  type ReturnInitiatedWebhookEvent as ReturnInitiatedWebhookEvent,
9781
- type ReturnPaidWebhookEvent as ReturnPaidWebhookEvent,
9910
+ type ReturnSubmittedWebhookEvent as ReturnSubmittedWebhookEvent,
9911
+ type ReturnSentWebhookEvent as ReturnSentWebhookEvent,
9782
9912
  type ReturnFailedWebhookEvent as ReturnFailedWebhookEvent,
9783
9913
  type ReturnReturnedWebhookEvent as ReturnReturnedWebhookEvent,
9784
- type DepositReceivedWebhookEvent as DepositReceivedWebhookEvent,
9914
+ type DepositSettledWebhookEvent as DepositSettledWebhookEvent,
9785
9915
  type ConversionCreatedWebhookEvent as ConversionCreatedWebhookEvent,
9786
9916
  type ConversionCompletedWebhookEvent as ConversionCompletedWebhookEvent,
9787
9917
  type ConversionFailedWebhookEvent as ConversionFailedWebhookEvent,