@getivy/node-sdk 2.6.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -2
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/bin/migration-config.json +1 -1
  10. package/client.d.mts +10 -4
  11. package/client.d.mts.map +1 -1
  12. package/client.d.ts +10 -4
  13. package/client.d.ts.map +1 -1
  14. package/client.js +21 -7
  15. package/client.js.map +1 -1
  16. package/client.mjs +21 -7
  17. package/client.mjs.map +1 -1
  18. package/core/api-promise.d.mts.map +1 -1
  19. package/core/api-promise.d.ts.map +1 -1
  20. package/core/api-promise.mjs.map +1 -1
  21. package/core/error.mjs.map +1 -1
  22. package/core/resource.d.mts.map +1 -1
  23. package/core/resource.d.ts.map +1 -1
  24. package/core/uploads.d.mts.map +1 -1
  25. package/core/uploads.d.ts.map +1 -1
  26. package/core/uploads.mjs.map +1 -1
  27. package/error.d.mts +1 -0
  28. package/error.d.mts.map +1 -1
  29. package/error.d.ts +1 -0
  30. package/error.d.ts.map +1 -1
  31. package/error.mjs +1 -0
  32. package/error.mjs.map +1 -1
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.mjs.map +1 -1
  36. package/internal/detect-platform.mjs.map +1 -1
  37. package/internal/headers.mjs.map +1 -1
  38. package/internal/parse.d.mts.map +1 -1
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.mjs.map +1 -1
  41. package/internal/request-options.d.mts.map +1 -1
  42. package/internal/request-options.d.ts.map +1 -1
  43. package/internal/shims.d.mts +6 -0
  44. package/internal/shims.d.mts.map +1 -1
  45. package/internal/shims.d.ts +6 -0
  46. package/internal/shims.d.ts.map +1 -1
  47. package/internal/to-file.d.mts.map +1 -1
  48. package/internal/to-file.d.ts.map +1 -1
  49. package/internal/to-file.mjs.map +1 -1
  50. package/internal/tslib.js +17 -17
  51. package/internal/types.d.mts +4 -4
  52. package/internal/types.d.mts.map +1 -1
  53. package/internal/types.d.ts +4 -4
  54. package/internal/types.d.ts.map +1 -1
  55. package/internal/uploads.d.mts.map +1 -1
  56. package/internal/uploads.d.ts.map +1 -1
  57. package/internal/uploads.mjs.map +1 -1
  58. package/internal/utils/base64.mjs.map +1 -1
  59. package/internal/utils/log.d.mts.map +1 -1
  60. package/internal/utils/log.d.ts.map +1 -1
  61. package/internal/utils/log.js +4 -1
  62. package/internal/utils/log.js.map +1 -1
  63. package/internal/utils/log.mjs +4 -1
  64. package/internal/utils/log.mjs.map +1 -1
  65. package/internal/utils/path.mjs.map +1 -1
  66. package/internal/utils/query.mjs.map +1 -1
  67. package/internal/utils/values.mjs.map +1 -1
  68. package/internal/utils.d.mts.map +1 -1
  69. package/internal/utils.d.ts.map +1 -1
  70. package/internal/utils.mjs.map +1 -1
  71. package/lib/request-signing.d.mts +6 -0
  72. package/lib/request-signing.d.mts.map +1 -0
  73. package/lib/request-signing.d.ts +6 -0
  74. package/lib/request-signing.d.ts.map +1 -0
  75. package/lib/request-signing.js +113 -0
  76. package/lib/request-signing.js.map +1 -0
  77. package/lib/request-signing.mjs +109 -0
  78. package/lib/request-signing.mjs.map +1 -0
  79. package/package.json +16 -4
  80. package/resource.d.mts +1 -0
  81. package/resource.d.mts.map +1 -1
  82. package/resource.d.ts +1 -0
  83. package/resource.d.ts.map +1 -1
  84. package/resource.mjs +1 -0
  85. package/resource.mjs.map +1 -1
  86. package/resources/balance.d.mts.map +1 -1
  87. package/resources/balance.d.ts.map +1 -1
  88. package/resources/balance.mjs.map +1 -1
  89. package/resources/banks.d.mts +12 -14
  90. package/resources/banks.d.mts.map +1 -1
  91. package/resources/banks.d.ts +12 -14
  92. package/resources/banks.d.ts.map +1 -1
  93. package/resources/banks.mjs.map +1 -1
  94. package/resources/beneficiary-payouts.d.mts +2 -2
  95. package/resources/beneficiary-payouts.d.mts.map +1 -1
  96. package/resources/beneficiary-payouts.d.ts +2 -2
  97. package/resources/beneficiary-payouts.d.ts.map +1 -1
  98. package/resources/beneficiary-payouts.mjs.map +1 -1
  99. package/resources/capabilities.d.mts +8 -1
  100. package/resources/capabilities.d.mts.map +1 -1
  101. package/resources/capabilities.d.ts +8 -1
  102. package/resources/capabilities.d.ts.map +1 -1
  103. package/resources/capabilities.js +7 -0
  104. package/resources/capabilities.js.map +1 -1
  105. package/resources/capabilities.mjs +7 -0
  106. package/resources/capabilities.mjs.map +1 -1
  107. package/resources/checkoutsession.d.mts +18 -10
  108. package/resources/checkoutsession.d.mts.map +1 -1
  109. package/resources/checkoutsession.d.ts +18 -10
  110. package/resources/checkoutsession.d.ts.map +1 -1
  111. package/resources/checkoutsession.js +3 -2
  112. package/resources/checkoutsession.js.map +1 -1
  113. package/resources/checkoutsession.mjs +3 -2
  114. package/resources/checkoutsession.mjs.map +1 -1
  115. package/resources/counterparties.d.mts +956 -0
  116. package/resources/counterparties.d.mts.map +1 -0
  117. package/resources/counterparties.d.ts +956 -0
  118. package/resources/counterparties.d.ts.map +1 -0
  119. package/resources/counterparties.js +41 -0
  120. package/resources/counterparties.js.map +1 -0
  121. package/resources/counterparties.mjs +37 -0
  122. package/resources/counterparties.mjs.map +1 -0
  123. package/resources/customers.d.mts +6 -6
  124. package/resources/customers.d.mts.map +1 -1
  125. package/resources/customers.d.ts +6 -6
  126. package/resources/customers.d.ts.map +1 -1
  127. package/resources/customers.mjs.map +1 -1
  128. package/resources/deposits.d.mts +21 -7
  129. package/resources/deposits.d.mts.map +1 -1
  130. package/resources/deposits.d.ts +21 -7
  131. package/resources/deposits.d.ts.map +1 -1
  132. package/resources/deposits.mjs.map +1 -1
  133. package/resources/index.d.mts +1 -1
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +1 -1
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js +3 -3
  138. package/resources/index.js.map +1 -1
  139. package/resources/index.mjs +1 -1
  140. package/resources/index.mjs.map +1 -1
  141. package/resources/orders.d.mts +102 -39
  142. package/resources/orders.d.mts.map +1 -1
  143. package/resources/orders.d.ts +102 -39
  144. package/resources/orders.d.ts.map +1 -1
  145. package/resources/orders.mjs.map +1 -1
  146. package/resources/payee.d.mts.map +1 -1
  147. package/resources/payee.d.ts.map +1 -1
  148. package/resources/payee.mjs.map +1 -1
  149. package/resources/payouts.d.mts +82 -21
  150. package/resources/payouts.d.mts.map +1 -1
  151. package/resources/payouts.d.ts +82 -21
  152. package/resources/payouts.d.ts.map +1 -1
  153. package/resources/payouts.mjs.map +1 -1
  154. package/resources/refunds.d.mts +1 -1
  155. package/resources/refunds.d.mts.map +1 -1
  156. package/resources/refunds.d.ts +1 -1
  157. package/resources/refunds.d.ts.map +1 -1
  158. package/resources/refunds.mjs.map +1 -1
  159. package/resources/returns.d.mts +2 -2
  160. package/resources/returns.d.mts.map +1 -1
  161. package/resources/returns.d.ts +2 -2
  162. package/resources/returns.d.ts.map +1 -1
  163. package/resources/returns.mjs.map +1 -1
  164. package/resources/subaccounts.d.mts +4 -4
  165. package/resources/subaccounts.d.mts.map +1 -1
  166. package/resources/subaccounts.d.ts +4 -4
  167. package/resources/subaccounts.d.ts.map +1 -1
  168. package/resources/subaccounts.mjs.map +1 -1
  169. package/resources/transactions.d.mts +3 -3
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +3 -3
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/transactions.mjs.map +1 -1
  174. package/resources/webhook/index.d.mts.map +1 -1
  175. package/resources/webhook/index.d.ts.map +1 -1
  176. package/resources/webhook/index.mjs.map +1 -1
  177. package/resources/webhook/subscription.d.mts +12 -12
  178. package/resources/webhook/subscription.d.mts.map +1 -1
  179. package/resources/webhook/subscription.d.ts +12 -12
  180. package/resources/webhook/subscription.d.ts.map +1 -1
  181. package/resources/webhook/subscription.mjs.map +1 -1
  182. package/resources/webhook/webhook.d.mts.map +1 -1
  183. package/resources/webhook/webhook.d.ts.map +1 -1
  184. package/resources/webhook/webhook.mjs.map +1 -1
  185. package/resources/webhook.d.mts.map +1 -1
  186. package/resources/webhook.d.ts.map +1 -1
  187. package/resources/webhook.mjs.map +1 -1
  188. package/resources.d.mts.map +1 -1
  189. package/resources.d.ts.map +1 -1
  190. package/resources.mjs.map +1 -1
  191. package/src/client.ts +51 -22
  192. package/src/internal/utils/log.ts +3 -0
  193. package/src/lib/request-signing.ts +139 -0
  194. package/src/resources/banks.ts +21 -11
  195. package/src/resources/beneficiary-payouts.ts +2 -2
  196. package/src/resources/capabilities.ts +8 -1
  197. package/src/resources/checkoutsession.ts +31 -10
  198. package/src/resources/counterparties.ts +3073 -0
  199. package/src/resources/customers.ts +3509 -3509
  200. package/src/resources/deposits.ts +52 -6
  201. package/src/resources/index.ts +13 -9
  202. package/src/resources/orders.ts +222 -36
  203. package/src/resources/payouts.ts +396 -17
  204. package/src/resources/refunds.ts +1 -1
  205. package/src/resources/returns.ts +2 -2
  206. package/src/resources/subaccounts.ts +4 -4
  207. package/src/resources/transactions.ts +5 -2
  208. package/src/resources/webhook/subscription.ts +37 -12
  209. package/src/version.ts +1 -1
  210. package/uploads.d.mts +1 -0
  211. package/uploads.d.mts.map +1 -1
  212. package/uploads.d.ts +1 -0
  213. package/uploads.d.ts.map +1 -1
  214. package/uploads.mjs +1 -0
  215. package/uploads.mjs.map +1 -1
  216. package/version.d.mts +1 -1
  217. package/version.d.mts.map +1 -1
  218. package/version.d.ts +1 -1
  219. package/version.d.ts.map +1 -1
  220. package/version.js +1 -1
  221. package/version.js.map +1 -1
  222. package/version.mjs +1 -1
  223. package/version.mjs.map +1 -1
  224. package/resources/fx.d.mts +0 -155
  225. package/resources/fx.d.mts.map +0 -1
  226. package/resources/fx.d.ts +0 -155
  227. package/resources/fx.d.ts.map +0 -1
  228. package/resources/fx.js +0 -28
  229. package/resources/fx.js.map +0 -1
  230. package/resources/fx.mjs +0 -24
  231. package/resources/fx.mjs.map +0 -1
  232. package/src/resources/fx.ts +0 -195
@@ -0,0 +1,3073 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Counterparties extends APIResource {
8
+ /**
9
+ * Create a counterparty owned by the merchant.
10
+ */
11
+ create(body: CounterpartyCreateParams, options?: RequestOptions): APIPromise<Counterparty> {
12
+ return this._client.post('/api/service/counterparty/create', { body, ...options });
13
+ }
14
+
15
+ /**
16
+ * Retrieve a counterparty by id.
17
+ */
18
+ retrieve(
19
+ body: CounterpartyRetrieveParams,
20
+ options?: RequestOptions,
21
+ ): APIPromise<CounterpartyRetrieveResponse> {
22
+ return this._client.post('/api/service/counterparty/retrieve', { body, ...options });
23
+ }
24
+
25
+ /**
26
+ * Update the mutable details of a counterparty owned by the merchant.
27
+ */
28
+ update(body: CounterpartyUpdateParams, options?: RequestOptions): APIPromise<CounterpartyUpdateResponse> {
29
+ return this._client.post('/api/service/counterparty/update', { body, ...options });
30
+ }
31
+
32
+ /**
33
+ * List counterparties owned by the merchant.
34
+ */
35
+ list(body: CounterpartyListParams, options?: RequestOptions): APIPromise<CounterpartyListResponse> {
36
+ return this._client.post('/api/service/counterparty/list', { body, ...options });
37
+ }
38
+
39
+ /**
40
+ * Activate a pending counterparty owned by the merchant. A fiat counterparty
41
+ * becomes active immediately; a crypto counterparty starts verification and stays
42
+ * pending until it concludes.
43
+ */
44
+ activate(
45
+ body: CounterpartyActivateParams,
46
+ options?: RequestOptions,
47
+ ): APIPromise<CounterpartyActivateResponse> {
48
+ return this._client.post('/api/service/counterparty/activate', { body, ...options });
49
+ }
50
+ }
51
+
52
+ export interface Counterparty {
53
+ /**
54
+ * The counterparty id
55
+ */
56
+ id: string;
57
+
58
+ /**
59
+ * Whether payments to and from the counterparty are blocked
60
+ */
61
+ blocked: boolean;
62
+
63
+ /**
64
+ * When the counterparty was created
65
+ */
66
+ createdAt: string;
67
+
68
+ /**
69
+ * The counterparty date of birth as YYYY-MM-DD
70
+ */
71
+ dateOfBirth: string | null;
72
+
73
+ /**
74
+ * Whether the counterparty is an individual, business, sole proprietor or
75
+ * non-profit
76
+ */
77
+ entityType: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
78
+
79
+ /**
80
+ * The counterparty financial address
81
+ */
82
+ financialAddress: Counterparty.FinancialAddress;
83
+
84
+ /**
85
+ * Whether the counterparty is owned by the merchant
86
+ */
87
+ isSelfOwned: boolean;
88
+
89
+ /**
90
+ * The counterparty metadata
91
+ */
92
+ metadata: { [key: string]: string };
93
+
94
+ /**
95
+ * The counterparty name
96
+ */
97
+ name: string | null;
98
+
99
+ /**
100
+ * The counterparty physical address
101
+ */
102
+ physicalAddress: Counterparty.PhysicalAddress | null;
103
+
104
+ /**
105
+ * The counterparty lifecycle status
106
+ */
107
+ status: 'pending' | 'active' | 'rejected';
108
+
109
+ /**
110
+ * When the counterparty was last updated
111
+ */
112
+ updatedAt: string;
113
+ }
114
+
115
+ export namespace Counterparty {
116
+ /**
117
+ * The counterparty financial address
118
+ */
119
+ export interface FinancialAddress {
120
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
121
+
122
+ aba?: FinancialAddress.Aba;
123
+
124
+ bankCode?: FinancialAddress.BankCode;
125
+
126
+ bban?: FinancialAddress.Bban;
127
+
128
+ bic?: FinancialAddress.Bic;
129
+
130
+ iban?: FinancialAddress.Iban;
131
+
132
+ sortCode?: FinancialAddress.SortCode;
133
+
134
+ wallet?: FinancialAddress.Wallet;
135
+ }
136
+
137
+ export namespace FinancialAddress {
138
+ export interface Aba {
139
+ accountHolderName: string;
140
+
141
+ accountNumber: string;
142
+
143
+ routingNumber: string;
144
+ }
145
+
146
+ export interface BankCode {
147
+ accountHolderName: string;
148
+
149
+ accountNumber: string;
150
+
151
+ code: string;
152
+ }
153
+
154
+ export interface Bban {
155
+ accountHolderName: string;
156
+
157
+ bban: string;
158
+
159
+ bic?: string;
160
+ }
161
+
162
+ export interface Bic {
163
+ accountHolderName: string;
164
+
165
+ accountNumber: string;
166
+
167
+ bic: string;
168
+
169
+ localBankCode?: string;
170
+ }
171
+
172
+ export interface Iban {
173
+ accountHolderName: string;
174
+
175
+ iban: string;
176
+
177
+ bic?: string;
178
+ }
179
+
180
+ export interface SortCode {
181
+ accountHolderName: string;
182
+
183
+ accountNumber: string;
184
+
185
+ sortCode: string;
186
+ }
187
+
188
+ export interface Wallet {
189
+ /**
190
+ * The blockchain wallet address
191
+ */
192
+ address: string;
193
+
194
+ /**
195
+ * The blockchain network
196
+ */
197
+ blockchain:
198
+ | 'BTC'
199
+ | 'BTC-TESTNET4'
200
+ | 'ETH'
201
+ | 'ETH-SEPOLIA'
202
+ | 'SOL'
203
+ | 'SOL-DEVNET'
204
+ | 'MATIC'
205
+ | 'MATIC-AMOY';
206
+ }
207
+ }
208
+
209
+ /**
210
+ * The counterparty physical address
211
+ */
212
+ export interface PhysicalAddress {
213
+ /**
214
+ * City or locality.
215
+ */
216
+ city: string;
217
+
218
+ /**
219
+ * ISO 3166-1 alpha-2 country code.
220
+ */
221
+ countryCode:
222
+ | 'AF'
223
+ | 'AL'
224
+ | 'DZ'
225
+ | 'AS'
226
+ | 'AD'
227
+ | 'AO'
228
+ | 'AI'
229
+ | 'AQ'
230
+ | 'AG'
231
+ | 'AR'
232
+ | 'AM'
233
+ | 'AW'
234
+ | 'AU'
235
+ | 'AT'
236
+ | 'AZ'
237
+ | 'BS'
238
+ | 'BH'
239
+ | 'BD'
240
+ | 'BB'
241
+ | 'BY'
242
+ | 'BE'
243
+ | 'BZ'
244
+ | 'BJ'
245
+ | 'BM'
246
+ | 'BT'
247
+ | 'BO'
248
+ | 'BA'
249
+ | 'BW'
250
+ | 'BV'
251
+ | 'BR'
252
+ | 'IO'
253
+ | 'BN'
254
+ | 'BG'
255
+ | 'BF'
256
+ | 'BI'
257
+ | 'KH'
258
+ | 'CM'
259
+ | 'CA'
260
+ | 'CV'
261
+ | 'KY'
262
+ | 'CF'
263
+ | 'TD'
264
+ | 'CL'
265
+ | 'CN'
266
+ | 'CX'
267
+ | 'CC'
268
+ | 'CO'
269
+ | 'KM'
270
+ | 'CG'
271
+ | 'CD'
272
+ | 'CK'
273
+ | 'CR'
274
+ | 'CI'
275
+ | 'HR'
276
+ | 'CU'
277
+ | 'CY'
278
+ | 'CZ'
279
+ | 'DK'
280
+ | 'DJ'
281
+ | 'DM'
282
+ | 'DO'
283
+ | 'EC'
284
+ | 'EG'
285
+ | 'SV'
286
+ | 'GQ'
287
+ | 'ER'
288
+ | 'EE'
289
+ | 'ET'
290
+ | 'FK'
291
+ | 'FO'
292
+ | 'FJ'
293
+ | 'FI'
294
+ | 'FR'
295
+ | 'GF'
296
+ | 'PF'
297
+ | 'TF'
298
+ | 'GA'
299
+ | 'GM'
300
+ | 'GE'
301
+ | 'DE'
302
+ | 'GH'
303
+ | 'GI'
304
+ | 'GR'
305
+ | 'GL'
306
+ | 'GD'
307
+ | 'GP'
308
+ | 'GU'
309
+ | 'GT'
310
+ | 'GN'
311
+ | 'GW'
312
+ | 'GY'
313
+ | 'HT'
314
+ | 'HM'
315
+ | 'VA'
316
+ | 'HN'
317
+ | 'HK'
318
+ | 'HU'
319
+ | 'IS'
320
+ | 'IN'
321
+ | 'ID'
322
+ | 'IR'
323
+ | 'IQ'
324
+ | 'IE'
325
+ | 'IL'
326
+ | 'IT'
327
+ | 'JM'
328
+ | 'JP'
329
+ | 'JO'
330
+ | 'KZ'
331
+ | 'KE'
332
+ | 'KI'
333
+ | 'KP'
334
+ | 'KR'
335
+ | 'KW'
336
+ | 'KG'
337
+ | 'LA'
338
+ | 'LV'
339
+ | 'LB'
340
+ | 'LS'
341
+ | 'LR'
342
+ | 'LY'
343
+ | 'LI'
344
+ | 'LT'
345
+ | 'LU'
346
+ | 'MO'
347
+ | 'MG'
348
+ | 'MW'
349
+ | 'MY'
350
+ | 'MV'
351
+ | 'ML'
352
+ | 'MT'
353
+ | 'MH'
354
+ | 'MQ'
355
+ | 'MR'
356
+ | 'MU'
357
+ | 'YT'
358
+ | 'MX'
359
+ | 'FM'
360
+ | 'MD'
361
+ | 'MC'
362
+ | 'MN'
363
+ | 'MS'
364
+ | 'MA'
365
+ | 'MZ'
366
+ | 'MM'
367
+ | 'NA'
368
+ | 'NR'
369
+ | 'NP'
370
+ | 'NL'
371
+ | 'NC'
372
+ | 'NZ'
373
+ | 'NI'
374
+ | 'NE'
375
+ | 'NG'
376
+ | 'NU'
377
+ | 'NF'
378
+ | 'MP'
379
+ | 'MK'
380
+ | 'NO'
381
+ | 'OM'
382
+ | 'PK'
383
+ | 'PW'
384
+ | 'PS'
385
+ | 'PA'
386
+ | 'PG'
387
+ | 'PY'
388
+ | 'PE'
389
+ | 'PH'
390
+ | 'PN'
391
+ | 'PL'
392
+ | 'PT'
393
+ | 'PR'
394
+ | 'QA'
395
+ | 'RE'
396
+ | 'RO'
397
+ | 'RU'
398
+ | 'RW'
399
+ | 'SH'
400
+ | 'KN'
401
+ | 'LC'
402
+ | 'PM'
403
+ | 'VC'
404
+ | 'WS'
405
+ | 'SM'
406
+ | 'ST'
407
+ | 'SA'
408
+ | 'SN'
409
+ | 'SC'
410
+ | 'SL'
411
+ | 'SG'
412
+ | 'SK'
413
+ | 'SI'
414
+ | 'SB'
415
+ | 'SO'
416
+ | 'ZA'
417
+ | 'GS'
418
+ | 'ES'
419
+ | 'LK'
420
+ | 'SD'
421
+ | 'SR'
422
+ | 'SJ'
423
+ | 'SZ'
424
+ | 'SE'
425
+ | 'CH'
426
+ | 'SY'
427
+ | 'TW'
428
+ | 'TJ'
429
+ | 'TZ'
430
+ | 'TH'
431
+ | 'TL'
432
+ | 'TG'
433
+ | 'TK'
434
+ | 'TO'
435
+ | 'TT'
436
+ | 'TN'
437
+ | 'TR'
438
+ | 'TM'
439
+ | 'TC'
440
+ | 'TV'
441
+ | 'UG'
442
+ | 'UA'
443
+ | 'AE'
444
+ | 'GB'
445
+ | 'US'
446
+ | 'UM'
447
+ | 'UY'
448
+ | 'UZ'
449
+ | 'VU'
450
+ | 'VE'
451
+ | 'VN'
452
+ | 'VG'
453
+ | 'VI'
454
+ | 'WF'
455
+ | 'EH'
456
+ | 'YE'
457
+ | 'ZM'
458
+ | 'ZW'
459
+ | 'AX'
460
+ | 'BQ'
461
+ | 'CW'
462
+ | 'GG'
463
+ | 'IM'
464
+ | 'JE'
465
+ | 'ME'
466
+ | 'BL'
467
+ | 'MF'
468
+ | 'RS'
469
+ | 'SX'
470
+ | 'SS'
471
+ | 'XK';
472
+
473
+ /**
474
+ * Primary street address line.
475
+ */
476
+ line1?: string;
477
+
478
+ /**
479
+ * Secondary street address line.
480
+ */
481
+ line2?: string;
482
+
483
+ /**
484
+ * Postal or ZIP code.
485
+ */
486
+ postalCode?: string;
487
+
488
+ /**
489
+ * State, province, or region.
490
+ */
491
+ state?: string;
492
+ }
493
+ }
494
+
495
+ export interface CounterpartyRetrieveResponse {
496
+ /**
497
+ * The counterparty id
498
+ */
499
+ id: string;
500
+
501
+ /**
502
+ * Whether payments to and from the counterparty are blocked
503
+ */
504
+ blocked: boolean;
505
+
506
+ /**
507
+ * When the counterparty was created
508
+ */
509
+ createdAt: string;
510
+
511
+ /**
512
+ * The counterparty date of birth as YYYY-MM-DD
513
+ */
514
+ dateOfBirth: string | null;
515
+
516
+ /**
517
+ * Whether the counterparty is an individual, business, sole proprietor or
518
+ * non-profit
519
+ */
520
+ entityType: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
521
+
522
+ /**
523
+ * The counterparty financial address
524
+ */
525
+ financialAddress: CounterpartyRetrieveResponse.FinancialAddress;
526
+
527
+ /**
528
+ * Whether the counterparty is owned by the merchant
529
+ */
530
+ isSelfOwned: boolean;
531
+
532
+ /**
533
+ * The counterparty metadata
534
+ */
535
+ metadata: { [key: string]: string };
536
+
537
+ /**
538
+ * The counterparty name
539
+ */
540
+ name: string | null;
541
+
542
+ /**
543
+ * The counterparty physical address
544
+ */
545
+ physicalAddress: CounterpartyRetrieveResponse.PhysicalAddress | null;
546
+
547
+ /**
548
+ * The counterparty lifecycle status
549
+ */
550
+ status: 'pending' | 'active' | 'rejected';
551
+
552
+ /**
553
+ * When the counterparty was last updated
554
+ */
555
+ updatedAt: string;
556
+ }
557
+
558
+ export namespace CounterpartyRetrieveResponse {
559
+ /**
560
+ * The counterparty financial address
561
+ */
562
+ export interface FinancialAddress {
563
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
564
+
565
+ aba?: FinancialAddress.Aba;
566
+
567
+ bankCode?: FinancialAddress.BankCode;
568
+
569
+ bban?: FinancialAddress.Bban;
570
+
571
+ bic?: FinancialAddress.Bic;
572
+
573
+ iban?: FinancialAddress.Iban;
574
+
575
+ sortCode?: FinancialAddress.SortCode;
576
+
577
+ wallet?: FinancialAddress.Wallet;
578
+ }
579
+
580
+ export namespace FinancialAddress {
581
+ export interface Aba {
582
+ accountHolderName: string;
583
+
584
+ accountNumber: string;
585
+
586
+ routingNumber: string;
587
+ }
588
+
589
+ export interface BankCode {
590
+ accountHolderName: string;
591
+
592
+ accountNumber: string;
593
+
594
+ code: string;
595
+ }
596
+
597
+ export interface Bban {
598
+ accountHolderName: string;
599
+
600
+ bban: string;
601
+
602
+ bic?: string;
603
+ }
604
+
605
+ export interface Bic {
606
+ accountHolderName: string;
607
+
608
+ accountNumber: string;
609
+
610
+ bic: string;
611
+
612
+ localBankCode?: string;
613
+ }
614
+
615
+ export interface Iban {
616
+ accountHolderName: string;
617
+
618
+ iban: string;
619
+
620
+ bic?: string;
621
+ }
622
+
623
+ export interface SortCode {
624
+ accountHolderName: string;
625
+
626
+ accountNumber: string;
627
+
628
+ sortCode: string;
629
+ }
630
+
631
+ export interface Wallet {
632
+ /**
633
+ * The blockchain wallet address
634
+ */
635
+ address: string;
636
+
637
+ /**
638
+ * The blockchain network
639
+ */
640
+ blockchain:
641
+ | 'BTC'
642
+ | 'BTC-TESTNET4'
643
+ | 'ETH'
644
+ | 'ETH-SEPOLIA'
645
+ | 'SOL'
646
+ | 'SOL-DEVNET'
647
+ | 'MATIC'
648
+ | 'MATIC-AMOY';
649
+ }
650
+ }
651
+
652
+ /**
653
+ * The counterparty physical address
654
+ */
655
+ export interface PhysicalAddress {
656
+ /**
657
+ * City or locality.
658
+ */
659
+ city: string;
660
+
661
+ /**
662
+ * ISO 3166-1 alpha-2 country code.
663
+ */
664
+ countryCode:
665
+ | 'AF'
666
+ | 'AL'
667
+ | 'DZ'
668
+ | 'AS'
669
+ | 'AD'
670
+ | 'AO'
671
+ | 'AI'
672
+ | 'AQ'
673
+ | 'AG'
674
+ | 'AR'
675
+ | 'AM'
676
+ | 'AW'
677
+ | 'AU'
678
+ | 'AT'
679
+ | 'AZ'
680
+ | 'BS'
681
+ | 'BH'
682
+ | 'BD'
683
+ | 'BB'
684
+ | 'BY'
685
+ | 'BE'
686
+ | 'BZ'
687
+ | 'BJ'
688
+ | 'BM'
689
+ | 'BT'
690
+ | 'BO'
691
+ | 'BA'
692
+ | 'BW'
693
+ | 'BV'
694
+ | 'BR'
695
+ | 'IO'
696
+ | 'BN'
697
+ | 'BG'
698
+ | 'BF'
699
+ | 'BI'
700
+ | 'KH'
701
+ | 'CM'
702
+ | 'CA'
703
+ | 'CV'
704
+ | 'KY'
705
+ | 'CF'
706
+ | 'TD'
707
+ | 'CL'
708
+ | 'CN'
709
+ | 'CX'
710
+ | 'CC'
711
+ | 'CO'
712
+ | 'KM'
713
+ | 'CG'
714
+ | 'CD'
715
+ | 'CK'
716
+ | 'CR'
717
+ | 'CI'
718
+ | 'HR'
719
+ | 'CU'
720
+ | 'CY'
721
+ | 'CZ'
722
+ | 'DK'
723
+ | 'DJ'
724
+ | 'DM'
725
+ | 'DO'
726
+ | 'EC'
727
+ | 'EG'
728
+ | 'SV'
729
+ | 'GQ'
730
+ | 'ER'
731
+ | 'EE'
732
+ | 'ET'
733
+ | 'FK'
734
+ | 'FO'
735
+ | 'FJ'
736
+ | 'FI'
737
+ | 'FR'
738
+ | 'GF'
739
+ | 'PF'
740
+ | 'TF'
741
+ | 'GA'
742
+ | 'GM'
743
+ | 'GE'
744
+ | 'DE'
745
+ | 'GH'
746
+ | 'GI'
747
+ | 'GR'
748
+ | 'GL'
749
+ | 'GD'
750
+ | 'GP'
751
+ | 'GU'
752
+ | 'GT'
753
+ | 'GN'
754
+ | 'GW'
755
+ | 'GY'
756
+ | 'HT'
757
+ | 'HM'
758
+ | 'VA'
759
+ | 'HN'
760
+ | 'HK'
761
+ | 'HU'
762
+ | 'IS'
763
+ | 'IN'
764
+ | 'ID'
765
+ | 'IR'
766
+ | 'IQ'
767
+ | 'IE'
768
+ | 'IL'
769
+ | 'IT'
770
+ | 'JM'
771
+ | 'JP'
772
+ | 'JO'
773
+ | 'KZ'
774
+ | 'KE'
775
+ | 'KI'
776
+ | 'KP'
777
+ | 'KR'
778
+ | 'KW'
779
+ | 'KG'
780
+ | 'LA'
781
+ | 'LV'
782
+ | 'LB'
783
+ | 'LS'
784
+ | 'LR'
785
+ | 'LY'
786
+ | 'LI'
787
+ | 'LT'
788
+ | 'LU'
789
+ | 'MO'
790
+ | 'MG'
791
+ | 'MW'
792
+ | 'MY'
793
+ | 'MV'
794
+ | 'ML'
795
+ | 'MT'
796
+ | 'MH'
797
+ | 'MQ'
798
+ | 'MR'
799
+ | 'MU'
800
+ | 'YT'
801
+ | 'MX'
802
+ | 'FM'
803
+ | 'MD'
804
+ | 'MC'
805
+ | 'MN'
806
+ | 'MS'
807
+ | 'MA'
808
+ | 'MZ'
809
+ | 'MM'
810
+ | 'NA'
811
+ | 'NR'
812
+ | 'NP'
813
+ | 'NL'
814
+ | 'NC'
815
+ | 'NZ'
816
+ | 'NI'
817
+ | 'NE'
818
+ | 'NG'
819
+ | 'NU'
820
+ | 'NF'
821
+ | 'MP'
822
+ | 'MK'
823
+ | 'NO'
824
+ | 'OM'
825
+ | 'PK'
826
+ | 'PW'
827
+ | 'PS'
828
+ | 'PA'
829
+ | 'PG'
830
+ | 'PY'
831
+ | 'PE'
832
+ | 'PH'
833
+ | 'PN'
834
+ | 'PL'
835
+ | 'PT'
836
+ | 'PR'
837
+ | 'QA'
838
+ | 'RE'
839
+ | 'RO'
840
+ | 'RU'
841
+ | 'RW'
842
+ | 'SH'
843
+ | 'KN'
844
+ | 'LC'
845
+ | 'PM'
846
+ | 'VC'
847
+ | 'WS'
848
+ | 'SM'
849
+ | 'ST'
850
+ | 'SA'
851
+ | 'SN'
852
+ | 'SC'
853
+ | 'SL'
854
+ | 'SG'
855
+ | 'SK'
856
+ | 'SI'
857
+ | 'SB'
858
+ | 'SO'
859
+ | 'ZA'
860
+ | 'GS'
861
+ | 'ES'
862
+ | 'LK'
863
+ | 'SD'
864
+ | 'SR'
865
+ | 'SJ'
866
+ | 'SZ'
867
+ | 'SE'
868
+ | 'CH'
869
+ | 'SY'
870
+ | 'TW'
871
+ | 'TJ'
872
+ | 'TZ'
873
+ | 'TH'
874
+ | 'TL'
875
+ | 'TG'
876
+ | 'TK'
877
+ | 'TO'
878
+ | 'TT'
879
+ | 'TN'
880
+ | 'TR'
881
+ | 'TM'
882
+ | 'TC'
883
+ | 'TV'
884
+ | 'UG'
885
+ | 'UA'
886
+ | 'AE'
887
+ | 'GB'
888
+ | 'US'
889
+ | 'UM'
890
+ | 'UY'
891
+ | 'UZ'
892
+ | 'VU'
893
+ | 'VE'
894
+ | 'VN'
895
+ | 'VG'
896
+ | 'VI'
897
+ | 'WF'
898
+ | 'EH'
899
+ | 'YE'
900
+ | 'ZM'
901
+ | 'ZW'
902
+ | 'AX'
903
+ | 'BQ'
904
+ | 'CW'
905
+ | 'GG'
906
+ | 'IM'
907
+ | 'JE'
908
+ | 'ME'
909
+ | 'BL'
910
+ | 'MF'
911
+ | 'RS'
912
+ | 'SX'
913
+ | 'SS'
914
+ | 'XK';
915
+
916
+ /**
917
+ * Primary street address line.
918
+ */
919
+ line1?: string;
920
+
921
+ /**
922
+ * Secondary street address line.
923
+ */
924
+ line2?: string;
925
+
926
+ /**
927
+ * Postal or ZIP code.
928
+ */
929
+ postalCode?: string;
930
+
931
+ /**
932
+ * State, province, or region.
933
+ */
934
+ state?: string;
935
+ }
936
+ }
937
+
938
+ export interface CounterpartyUpdateResponse {
939
+ /**
940
+ * The counterparty id
941
+ */
942
+ id: string;
943
+
944
+ /**
945
+ * Whether payments to and from the counterparty are blocked
946
+ */
947
+ blocked: boolean;
948
+
949
+ /**
950
+ * When the counterparty was created
951
+ */
952
+ createdAt: string;
953
+
954
+ /**
955
+ * The counterparty date of birth as YYYY-MM-DD
956
+ */
957
+ dateOfBirth: string | null;
958
+
959
+ /**
960
+ * Whether the counterparty is an individual, business, sole proprietor or
961
+ * non-profit
962
+ */
963
+ entityType: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
964
+
965
+ /**
966
+ * The counterparty financial address
967
+ */
968
+ financialAddress: CounterpartyUpdateResponse.FinancialAddress;
969
+
970
+ /**
971
+ * Whether the counterparty is owned by the merchant
972
+ */
973
+ isSelfOwned: boolean;
974
+
975
+ /**
976
+ * The counterparty metadata
977
+ */
978
+ metadata: { [key: string]: string };
979
+
980
+ /**
981
+ * The counterparty name
982
+ */
983
+ name: string | null;
984
+
985
+ /**
986
+ * The counterparty physical address
987
+ */
988
+ physicalAddress: CounterpartyUpdateResponse.PhysicalAddress | null;
989
+
990
+ /**
991
+ * The counterparty lifecycle status
992
+ */
993
+ status: 'pending' | 'active' | 'rejected';
994
+
995
+ /**
996
+ * When the counterparty was last updated
997
+ */
998
+ updatedAt: string;
999
+ }
1000
+
1001
+ export namespace CounterpartyUpdateResponse {
1002
+ /**
1003
+ * The counterparty financial address
1004
+ */
1005
+ export interface FinancialAddress {
1006
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
1007
+
1008
+ aba?: FinancialAddress.Aba;
1009
+
1010
+ bankCode?: FinancialAddress.BankCode;
1011
+
1012
+ bban?: FinancialAddress.Bban;
1013
+
1014
+ bic?: FinancialAddress.Bic;
1015
+
1016
+ iban?: FinancialAddress.Iban;
1017
+
1018
+ sortCode?: FinancialAddress.SortCode;
1019
+
1020
+ wallet?: FinancialAddress.Wallet;
1021
+ }
1022
+
1023
+ export namespace FinancialAddress {
1024
+ export interface Aba {
1025
+ accountHolderName: string;
1026
+
1027
+ accountNumber: string;
1028
+
1029
+ routingNumber: string;
1030
+ }
1031
+
1032
+ export interface BankCode {
1033
+ accountHolderName: string;
1034
+
1035
+ accountNumber: string;
1036
+
1037
+ code: string;
1038
+ }
1039
+
1040
+ export interface Bban {
1041
+ accountHolderName: string;
1042
+
1043
+ bban: string;
1044
+
1045
+ bic?: string;
1046
+ }
1047
+
1048
+ export interface Bic {
1049
+ accountHolderName: string;
1050
+
1051
+ accountNumber: string;
1052
+
1053
+ bic: string;
1054
+
1055
+ localBankCode?: string;
1056
+ }
1057
+
1058
+ export interface Iban {
1059
+ accountHolderName: string;
1060
+
1061
+ iban: string;
1062
+
1063
+ bic?: string;
1064
+ }
1065
+
1066
+ export interface SortCode {
1067
+ accountHolderName: string;
1068
+
1069
+ accountNumber: string;
1070
+
1071
+ sortCode: string;
1072
+ }
1073
+
1074
+ export interface Wallet {
1075
+ /**
1076
+ * The blockchain wallet address
1077
+ */
1078
+ address: string;
1079
+
1080
+ /**
1081
+ * The blockchain network
1082
+ */
1083
+ blockchain:
1084
+ | 'BTC'
1085
+ | 'BTC-TESTNET4'
1086
+ | 'ETH'
1087
+ | 'ETH-SEPOLIA'
1088
+ | 'SOL'
1089
+ | 'SOL-DEVNET'
1090
+ | 'MATIC'
1091
+ | 'MATIC-AMOY';
1092
+ }
1093
+ }
1094
+
1095
+ /**
1096
+ * The counterparty physical address
1097
+ */
1098
+ export interface PhysicalAddress {
1099
+ /**
1100
+ * City or locality.
1101
+ */
1102
+ city: string;
1103
+
1104
+ /**
1105
+ * ISO 3166-1 alpha-2 country code.
1106
+ */
1107
+ countryCode:
1108
+ | 'AF'
1109
+ | 'AL'
1110
+ | 'DZ'
1111
+ | 'AS'
1112
+ | 'AD'
1113
+ | 'AO'
1114
+ | 'AI'
1115
+ | 'AQ'
1116
+ | 'AG'
1117
+ | 'AR'
1118
+ | 'AM'
1119
+ | 'AW'
1120
+ | 'AU'
1121
+ | 'AT'
1122
+ | 'AZ'
1123
+ | 'BS'
1124
+ | 'BH'
1125
+ | 'BD'
1126
+ | 'BB'
1127
+ | 'BY'
1128
+ | 'BE'
1129
+ | 'BZ'
1130
+ | 'BJ'
1131
+ | 'BM'
1132
+ | 'BT'
1133
+ | 'BO'
1134
+ | 'BA'
1135
+ | 'BW'
1136
+ | 'BV'
1137
+ | 'BR'
1138
+ | 'IO'
1139
+ | 'BN'
1140
+ | 'BG'
1141
+ | 'BF'
1142
+ | 'BI'
1143
+ | 'KH'
1144
+ | 'CM'
1145
+ | 'CA'
1146
+ | 'CV'
1147
+ | 'KY'
1148
+ | 'CF'
1149
+ | 'TD'
1150
+ | 'CL'
1151
+ | 'CN'
1152
+ | 'CX'
1153
+ | 'CC'
1154
+ | 'CO'
1155
+ | 'KM'
1156
+ | 'CG'
1157
+ | 'CD'
1158
+ | 'CK'
1159
+ | 'CR'
1160
+ | 'CI'
1161
+ | 'HR'
1162
+ | 'CU'
1163
+ | 'CY'
1164
+ | 'CZ'
1165
+ | 'DK'
1166
+ | 'DJ'
1167
+ | 'DM'
1168
+ | 'DO'
1169
+ | 'EC'
1170
+ | 'EG'
1171
+ | 'SV'
1172
+ | 'GQ'
1173
+ | 'ER'
1174
+ | 'EE'
1175
+ | 'ET'
1176
+ | 'FK'
1177
+ | 'FO'
1178
+ | 'FJ'
1179
+ | 'FI'
1180
+ | 'FR'
1181
+ | 'GF'
1182
+ | 'PF'
1183
+ | 'TF'
1184
+ | 'GA'
1185
+ | 'GM'
1186
+ | 'GE'
1187
+ | 'DE'
1188
+ | 'GH'
1189
+ | 'GI'
1190
+ | 'GR'
1191
+ | 'GL'
1192
+ | 'GD'
1193
+ | 'GP'
1194
+ | 'GU'
1195
+ | 'GT'
1196
+ | 'GN'
1197
+ | 'GW'
1198
+ | 'GY'
1199
+ | 'HT'
1200
+ | 'HM'
1201
+ | 'VA'
1202
+ | 'HN'
1203
+ | 'HK'
1204
+ | 'HU'
1205
+ | 'IS'
1206
+ | 'IN'
1207
+ | 'ID'
1208
+ | 'IR'
1209
+ | 'IQ'
1210
+ | 'IE'
1211
+ | 'IL'
1212
+ | 'IT'
1213
+ | 'JM'
1214
+ | 'JP'
1215
+ | 'JO'
1216
+ | 'KZ'
1217
+ | 'KE'
1218
+ | 'KI'
1219
+ | 'KP'
1220
+ | 'KR'
1221
+ | 'KW'
1222
+ | 'KG'
1223
+ | 'LA'
1224
+ | 'LV'
1225
+ | 'LB'
1226
+ | 'LS'
1227
+ | 'LR'
1228
+ | 'LY'
1229
+ | 'LI'
1230
+ | 'LT'
1231
+ | 'LU'
1232
+ | 'MO'
1233
+ | 'MG'
1234
+ | 'MW'
1235
+ | 'MY'
1236
+ | 'MV'
1237
+ | 'ML'
1238
+ | 'MT'
1239
+ | 'MH'
1240
+ | 'MQ'
1241
+ | 'MR'
1242
+ | 'MU'
1243
+ | 'YT'
1244
+ | 'MX'
1245
+ | 'FM'
1246
+ | 'MD'
1247
+ | 'MC'
1248
+ | 'MN'
1249
+ | 'MS'
1250
+ | 'MA'
1251
+ | 'MZ'
1252
+ | 'MM'
1253
+ | 'NA'
1254
+ | 'NR'
1255
+ | 'NP'
1256
+ | 'NL'
1257
+ | 'NC'
1258
+ | 'NZ'
1259
+ | 'NI'
1260
+ | 'NE'
1261
+ | 'NG'
1262
+ | 'NU'
1263
+ | 'NF'
1264
+ | 'MP'
1265
+ | 'MK'
1266
+ | 'NO'
1267
+ | 'OM'
1268
+ | 'PK'
1269
+ | 'PW'
1270
+ | 'PS'
1271
+ | 'PA'
1272
+ | 'PG'
1273
+ | 'PY'
1274
+ | 'PE'
1275
+ | 'PH'
1276
+ | 'PN'
1277
+ | 'PL'
1278
+ | 'PT'
1279
+ | 'PR'
1280
+ | 'QA'
1281
+ | 'RE'
1282
+ | 'RO'
1283
+ | 'RU'
1284
+ | 'RW'
1285
+ | 'SH'
1286
+ | 'KN'
1287
+ | 'LC'
1288
+ | 'PM'
1289
+ | 'VC'
1290
+ | 'WS'
1291
+ | 'SM'
1292
+ | 'ST'
1293
+ | 'SA'
1294
+ | 'SN'
1295
+ | 'SC'
1296
+ | 'SL'
1297
+ | 'SG'
1298
+ | 'SK'
1299
+ | 'SI'
1300
+ | 'SB'
1301
+ | 'SO'
1302
+ | 'ZA'
1303
+ | 'GS'
1304
+ | 'ES'
1305
+ | 'LK'
1306
+ | 'SD'
1307
+ | 'SR'
1308
+ | 'SJ'
1309
+ | 'SZ'
1310
+ | 'SE'
1311
+ | 'CH'
1312
+ | 'SY'
1313
+ | 'TW'
1314
+ | 'TJ'
1315
+ | 'TZ'
1316
+ | 'TH'
1317
+ | 'TL'
1318
+ | 'TG'
1319
+ | 'TK'
1320
+ | 'TO'
1321
+ | 'TT'
1322
+ | 'TN'
1323
+ | 'TR'
1324
+ | 'TM'
1325
+ | 'TC'
1326
+ | 'TV'
1327
+ | 'UG'
1328
+ | 'UA'
1329
+ | 'AE'
1330
+ | 'GB'
1331
+ | 'US'
1332
+ | 'UM'
1333
+ | 'UY'
1334
+ | 'UZ'
1335
+ | 'VU'
1336
+ | 'VE'
1337
+ | 'VN'
1338
+ | 'VG'
1339
+ | 'VI'
1340
+ | 'WF'
1341
+ | 'EH'
1342
+ | 'YE'
1343
+ | 'ZM'
1344
+ | 'ZW'
1345
+ | 'AX'
1346
+ | 'BQ'
1347
+ | 'CW'
1348
+ | 'GG'
1349
+ | 'IM'
1350
+ | 'JE'
1351
+ | 'ME'
1352
+ | 'BL'
1353
+ | 'MF'
1354
+ | 'RS'
1355
+ | 'SX'
1356
+ | 'SS'
1357
+ | 'XK';
1358
+
1359
+ /**
1360
+ * Primary street address line.
1361
+ */
1362
+ line1?: string;
1363
+
1364
+ /**
1365
+ * Secondary street address line.
1366
+ */
1367
+ line2?: string;
1368
+
1369
+ /**
1370
+ * Postal or ZIP code.
1371
+ */
1372
+ postalCode?: string;
1373
+
1374
+ /**
1375
+ * State, province, or region.
1376
+ */
1377
+ state?: string;
1378
+ }
1379
+ }
1380
+
1381
+ export interface CounterpartyListResponse {
1382
+ /**
1383
+ * The list of counterparties
1384
+ */
1385
+ data: Array<CounterpartyListResponse.Data>;
1386
+
1387
+ /**
1388
+ * Pagination information
1389
+ */
1390
+ paging: CounterpartyListResponse.Paging;
1391
+ }
1392
+
1393
+ export namespace CounterpartyListResponse {
1394
+ export interface Data {
1395
+ /**
1396
+ * The counterparty id
1397
+ */
1398
+ id: string;
1399
+
1400
+ /**
1401
+ * Whether payments to and from the counterparty are blocked
1402
+ */
1403
+ blocked: boolean;
1404
+
1405
+ /**
1406
+ * When the counterparty was created
1407
+ */
1408
+ createdAt: string;
1409
+
1410
+ /**
1411
+ * The counterparty date of birth as YYYY-MM-DD
1412
+ */
1413
+ dateOfBirth: string | null;
1414
+
1415
+ /**
1416
+ * Whether the counterparty is an individual, business, sole proprietor or
1417
+ * non-profit
1418
+ */
1419
+ entityType: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
1420
+
1421
+ /**
1422
+ * The counterparty financial address
1423
+ */
1424
+ financialAddress: Data.FinancialAddress;
1425
+
1426
+ /**
1427
+ * Whether the counterparty is owned by the merchant
1428
+ */
1429
+ isSelfOwned: boolean;
1430
+
1431
+ /**
1432
+ * The counterparty metadata
1433
+ */
1434
+ metadata: { [key: string]: string };
1435
+
1436
+ /**
1437
+ * The counterparty name
1438
+ */
1439
+ name: string | null;
1440
+
1441
+ /**
1442
+ * The counterparty physical address
1443
+ */
1444
+ physicalAddress: Data.PhysicalAddress | null;
1445
+
1446
+ /**
1447
+ * The counterparty lifecycle status
1448
+ */
1449
+ status: 'pending' | 'active' | 'rejected';
1450
+
1451
+ /**
1452
+ * When the counterparty was last updated
1453
+ */
1454
+ updatedAt: string;
1455
+ }
1456
+
1457
+ export namespace Data {
1458
+ /**
1459
+ * The counterparty financial address
1460
+ */
1461
+ export interface FinancialAddress {
1462
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
1463
+
1464
+ aba?: FinancialAddress.Aba;
1465
+
1466
+ bankCode?: FinancialAddress.BankCode;
1467
+
1468
+ bban?: FinancialAddress.Bban;
1469
+
1470
+ bic?: FinancialAddress.Bic;
1471
+
1472
+ iban?: FinancialAddress.Iban;
1473
+
1474
+ sortCode?: FinancialAddress.SortCode;
1475
+
1476
+ wallet?: FinancialAddress.Wallet;
1477
+ }
1478
+
1479
+ export namespace FinancialAddress {
1480
+ export interface Aba {
1481
+ accountHolderName: string;
1482
+
1483
+ accountNumber: string;
1484
+
1485
+ routingNumber: string;
1486
+ }
1487
+
1488
+ export interface BankCode {
1489
+ accountHolderName: string;
1490
+
1491
+ accountNumber: string;
1492
+
1493
+ code: string;
1494
+ }
1495
+
1496
+ export interface Bban {
1497
+ accountHolderName: string;
1498
+
1499
+ bban: string;
1500
+
1501
+ bic?: string;
1502
+ }
1503
+
1504
+ export interface Bic {
1505
+ accountHolderName: string;
1506
+
1507
+ accountNumber: string;
1508
+
1509
+ bic: string;
1510
+
1511
+ localBankCode?: string;
1512
+ }
1513
+
1514
+ export interface Iban {
1515
+ accountHolderName: string;
1516
+
1517
+ iban: string;
1518
+
1519
+ bic?: string;
1520
+ }
1521
+
1522
+ export interface SortCode {
1523
+ accountHolderName: string;
1524
+
1525
+ accountNumber: string;
1526
+
1527
+ sortCode: string;
1528
+ }
1529
+
1530
+ export interface Wallet {
1531
+ /**
1532
+ * The blockchain wallet address
1533
+ */
1534
+ address: string;
1535
+
1536
+ /**
1537
+ * The blockchain network
1538
+ */
1539
+ blockchain:
1540
+ | 'BTC'
1541
+ | 'BTC-TESTNET4'
1542
+ | 'ETH'
1543
+ | 'ETH-SEPOLIA'
1544
+ | 'SOL'
1545
+ | 'SOL-DEVNET'
1546
+ | 'MATIC'
1547
+ | 'MATIC-AMOY';
1548
+ }
1549
+ }
1550
+
1551
+ /**
1552
+ * The counterparty physical address
1553
+ */
1554
+ export interface PhysicalAddress {
1555
+ /**
1556
+ * City or locality.
1557
+ */
1558
+ city: string;
1559
+
1560
+ /**
1561
+ * ISO 3166-1 alpha-2 country code.
1562
+ */
1563
+ countryCode:
1564
+ | 'AF'
1565
+ | 'AL'
1566
+ | 'DZ'
1567
+ | 'AS'
1568
+ | 'AD'
1569
+ | 'AO'
1570
+ | 'AI'
1571
+ | 'AQ'
1572
+ | 'AG'
1573
+ | 'AR'
1574
+ | 'AM'
1575
+ | 'AW'
1576
+ | 'AU'
1577
+ | 'AT'
1578
+ | 'AZ'
1579
+ | 'BS'
1580
+ | 'BH'
1581
+ | 'BD'
1582
+ | 'BB'
1583
+ | 'BY'
1584
+ | 'BE'
1585
+ | 'BZ'
1586
+ | 'BJ'
1587
+ | 'BM'
1588
+ | 'BT'
1589
+ | 'BO'
1590
+ | 'BA'
1591
+ | 'BW'
1592
+ | 'BV'
1593
+ | 'BR'
1594
+ | 'IO'
1595
+ | 'BN'
1596
+ | 'BG'
1597
+ | 'BF'
1598
+ | 'BI'
1599
+ | 'KH'
1600
+ | 'CM'
1601
+ | 'CA'
1602
+ | 'CV'
1603
+ | 'KY'
1604
+ | 'CF'
1605
+ | 'TD'
1606
+ | 'CL'
1607
+ | 'CN'
1608
+ | 'CX'
1609
+ | 'CC'
1610
+ | 'CO'
1611
+ | 'KM'
1612
+ | 'CG'
1613
+ | 'CD'
1614
+ | 'CK'
1615
+ | 'CR'
1616
+ | 'CI'
1617
+ | 'HR'
1618
+ | 'CU'
1619
+ | 'CY'
1620
+ | 'CZ'
1621
+ | 'DK'
1622
+ | 'DJ'
1623
+ | 'DM'
1624
+ | 'DO'
1625
+ | 'EC'
1626
+ | 'EG'
1627
+ | 'SV'
1628
+ | 'GQ'
1629
+ | 'ER'
1630
+ | 'EE'
1631
+ | 'ET'
1632
+ | 'FK'
1633
+ | 'FO'
1634
+ | 'FJ'
1635
+ | 'FI'
1636
+ | 'FR'
1637
+ | 'GF'
1638
+ | 'PF'
1639
+ | 'TF'
1640
+ | 'GA'
1641
+ | 'GM'
1642
+ | 'GE'
1643
+ | 'DE'
1644
+ | 'GH'
1645
+ | 'GI'
1646
+ | 'GR'
1647
+ | 'GL'
1648
+ | 'GD'
1649
+ | 'GP'
1650
+ | 'GU'
1651
+ | 'GT'
1652
+ | 'GN'
1653
+ | 'GW'
1654
+ | 'GY'
1655
+ | 'HT'
1656
+ | 'HM'
1657
+ | 'VA'
1658
+ | 'HN'
1659
+ | 'HK'
1660
+ | 'HU'
1661
+ | 'IS'
1662
+ | 'IN'
1663
+ | 'ID'
1664
+ | 'IR'
1665
+ | 'IQ'
1666
+ | 'IE'
1667
+ | 'IL'
1668
+ | 'IT'
1669
+ | 'JM'
1670
+ | 'JP'
1671
+ | 'JO'
1672
+ | 'KZ'
1673
+ | 'KE'
1674
+ | 'KI'
1675
+ | 'KP'
1676
+ | 'KR'
1677
+ | 'KW'
1678
+ | 'KG'
1679
+ | 'LA'
1680
+ | 'LV'
1681
+ | 'LB'
1682
+ | 'LS'
1683
+ | 'LR'
1684
+ | 'LY'
1685
+ | 'LI'
1686
+ | 'LT'
1687
+ | 'LU'
1688
+ | 'MO'
1689
+ | 'MG'
1690
+ | 'MW'
1691
+ | 'MY'
1692
+ | 'MV'
1693
+ | 'ML'
1694
+ | 'MT'
1695
+ | 'MH'
1696
+ | 'MQ'
1697
+ | 'MR'
1698
+ | 'MU'
1699
+ | 'YT'
1700
+ | 'MX'
1701
+ | 'FM'
1702
+ | 'MD'
1703
+ | 'MC'
1704
+ | 'MN'
1705
+ | 'MS'
1706
+ | 'MA'
1707
+ | 'MZ'
1708
+ | 'MM'
1709
+ | 'NA'
1710
+ | 'NR'
1711
+ | 'NP'
1712
+ | 'NL'
1713
+ | 'NC'
1714
+ | 'NZ'
1715
+ | 'NI'
1716
+ | 'NE'
1717
+ | 'NG'
1718
+ | 'NU'
1719
+ | 'NF'
1720
+ | 'MP'
1721
+ | 'MK'
1722
+ | 'NO'
1723
+ | 'OM'
1724
+ | 'PK'
1725
+ | 'PW'
1726
+ | 'PS'
1727
+ | 'PA'
1728
+ | 'PG'
1729
+ | 'PY'
1730
+ | 'PE'
1731
+ | 'PH'
1732
+ | 'PN'
1733
+ | 'PL'
1734
+ | 'PT'
1735
+ | 'PR'
1736
+ | 'QA'
1737
+ | 'RE'
1738
+ | 'RO'
1739
+ | 'RU'
1740
+ | 'RW'
1741
+ | 'SH'
1742
+ | 'KN'
1743
+ | 'LC'
1744
+ | 'PM'
1745
+ | 'VC'
1746
+ | 'WS'
1747
+ | 'SM'
1748
+ | 'ST'
1749
+ | 'SA'
1750
+ | 'SN'
1751
+ | 'SC'
1752
+ | 'SL'
1753
+ | 'SG'
1754
+ | 'SK'
1755
+ | 'SI'
1756
+ | 'SB'
1757
+ | 'SO'
1758
+ | 'ZA'
1759
+ | 'GS'
1760
+ | 'ES'
1761
+ | 'LK'
1762
+ | 'SD'
1763
+ | 'SR'
1764
+ | 'SJ'
1765
+ | 'SZ'
1766
+ | 'SE'
1767
+ | 'CH'
1768
+ | 'SY'
1769
+ | 'TW'
1770
+ | 'TJ'
1771
+ | 'TZ'
1772
+ | 'TH'
1773
+ | 'TL'
1774
+ | 'TG'
1775
+ | 'TK'
1776
+ | 'TO'
1777
+ | 'TT'
1778
+ | 'TN'
1779
+ | 'TR'
1780
+ | 'TM'
1781
+ | 'TC'
1782
+ | 'TV'
1783
+ | 'UG'
1784
+ | 'UA'
1785
+ | 'AE'
1786
+ | 'GB'
1787
+ | 'US'
1788
+ | 'UM'
1789
+ | 'UY'
1790
+ | 'UZ'
1791
+ | 'VU'
1792
+ | 'VE'
1793
+ | 'VN'
1794
+ | 'VG'
1795
+ | 'VI'
1796
+ | 'WF'
1797
+ | 'EH'
1798
+ | 'YE'
1799
+ | 'ZM'
1800
+ | 'ZW'
1801
+ | 'AX'
1802
+ | 'BQ'
1803
+ | 'CW'
1804
+ | 'GG'
1805
+ | 'IM'
1806
+ | 'JE'
1807
+ | 'ME'
1808
+ | 'BL'
1809
+ | 'MF'
1810
+ | 'RS'
1811
+ | 'SX'
1812
+ | 'SS'
1813
+ | 'XK';
1814
+
1815
+ /**
1816
+ * Primary street address line.
1817
+ */
1818
+ line1?: string;
1819
+
1820
+ /**
1821
+ * Secondary street address line.
1822
+ */
1823
+ line2?: string;
1824
+
1825
+ /**
1826
+ * Postal or ZIP code.
1827
+ */
1828
+ postalCode?: string;
1829
+
1830
+ /**
1831
+ * State, province, or region.
1832
+ */
1833
+ state?: string;
1834
+ }
1835
+ }
1836
+
1837
+ /**
1838
+ * Pagination information
1839
+ */
1840
+ export interface Paging {
1841
+ /**
1842
+ * Whether more counterparties are available
1843
+ */
1844
+ hasNext: boolean;
1845
+
1846
+ /**
1847
+ * Cursor for the next page of results
1848
+ */
1849
+ nextCursor?: string;
1850
+ }
1851
+ }
1852
+
1853
+ export interface CounterpartyActivateResponse {
1854
+ /**
1855
+ * The counterparty id
1856
+ */
1857
+ id: string;
1858
+
1859
+ /**
1860
+ * Whether payments to and from the counterparty are blocked
1861
+ */
1862
+ blocked: boolean;
1863
+
1864
+ /**
1865
+ * When the counterparty was created
1866
+ */
1867
+ createdAt: string;
1868
+
1869
+ /**
1870
+ * The counterparty date of birth as YYYY-MM-DD
1871
+ */
1872
+ dateOfBirth: string | null;
1873
+
1874
+ /**
1875
+ * Whether the counterparty is an individual, business, sole proprietor or
1876
+ * non-profit
1877
+ */
1878
+ entityType: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
1879
+
1880
+ /**
1881
+ * The counterparty financial address
1882
+ */
1883
+ financialAddress: CounterpartyActivateResponse.FinancialAddress;
1884
+
1885
+ /**
1886
+ * Whether the counterparty is owned by the merchant
1887
+ */
1888
+ isSelfOwned: boolean;
1889
+
1890
+ /**
1891
+ * The counterparty metadata
1892
+ */
1893
+ metadata: { [key: string]: string };
1894
+
1895
+ /**
1896
+ * The counterparty name
1897
+ */
1898
+ name: string | null;
1899
+
1900
+ /**
1901
+ * The counterparty physical address
1902
+ */
1903
+ physicalAddress: CounterpartyActivateResponse.PhysicalAddress | null;
1904
+
1905
+ /**
1906
+ * The counterparty lifecycle status
1907
+ */
1908
+ status: 'pending' | 'active' | 'rejected';
1909
+
1910
+ /**
1911
+ * When the counterparty was last updated
1912
+ */
1913
+ updatedAt: string;
1914
+ }
1915
+
1916
+ export namespace CounterpartyActivateResponse {
1917
+ /**
1918
+ * The counterparty financial address
1919
+ */
1920
+ export interface FinancialAddress {
1921
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
1922
+
1923
+ aba?: FinancialAddress.Aba;
1924
+
1925
+ bankCode?: FinancialAddress.BankCode;
1926
+
1927
+ bban?: FinancialAddress.Bban;
1928
+
1929
+ bic?: FinancialAddress.Bic;
1930
+
1931
+ iban?: FinancialAddress.Iban;
1932
+
1933
+ sortCode?: FinancialAddress.SortCode;
1934
+
1935
+ wallet?: FinancialAddress.Wallet;
1936
+ }
1937
+
1938
+ export namespace FinancialAddress {
1939
+ export interface Aba {
1940
+ accountHolderName: string;
1941
+
1942
+ accountNumber: string;
1943
+
1944
+ routingNumber: string;
1945
+ }
1946
+
1947
+ export interface BankCode {
1948
+ accountHolderName: string;
1949
+
1950
+ accountNumber: string;
1951
+
1952
+ code: string;
1953
+ }
1954
+
1955
+ export interface Bban {
1956
+ accountHolderName: string;
1957
+
1958
+ bban: string;
1959
+
1960
+ bic?: string;
1961
+ }
1962
+
1963
+ export interface Bic {
1964
+ accountHolderName: string;
1965
+
1966
+ accountNumber: string;
1967
+
1968
+ bic: string;
1969
+
1970
+ localBankCode?: string;
1971
+ }
1972
+
1973
+ export interface Iban {
1974
+ accountHolderName: string;
1975
+
1976
+ iban: string;
1977
+
1978
+ bic?: string;
1979
+ }
1980
+
1981
+ export interface SortCode {
1982
+ accountHolderName: string;
1983
+
1984
+ accountNumber: string;
1985
+
1986
+ sortCode: string;
1987
+ }
1988
+
1989
+ export interface Wallet {
1990
+ /**
1991
+ * The blockchain wallet address
1992
+ */
1993
+ address: string;
1994
+
1995
+ /**
1996
+ * The blockchain network
1997
+ */
1998
+ blockchain:
1999
+ | 'BTC'
2000
+ | 'BTC-TESTNET4'
2001
+ | 'ETH'
2002
+ | 'ETH-SEPOLIA'
2003
+ | 'SOL'
2004
+ | 'SOL-DEVNET'
2005
+ | 'MATIC'
2006
+ | 'MATIC-AMOY';
2007
+ }
2008
+ }
2009
+
2010
+ /**
2011
+ * The counterparty physical address
2012
+ */
2013
+ export interface PhysicalAddress {
2014
+ /**
2015
+ * City or locality.
2016
+ */
2017
+ city: string;
2018
+
2019
+ /**
2020
+ * ISO 3166-1 alpha-2 country code.
2021
+ */
2022
+ countryCode:
2023
+ | 'AF'
2024
+ | 'AL'
2025
+ | 'DZ'
2026
+ | 'AS'
2027
+ | 'AD'
2028
+ | 'AO'
2029
+ | 'AI'
2030
+ | 'AQ'
2031
+ | 'AG'
2032
+ | 'AR'
2033
+ | 'AM'
2034
+ | 'AW'
2035
+ | 'AU'
2036
+ | 'AT'
2037
+ | 'AZ'
2038
+ | 'BS'
2039
+ | 'BH'
2040
+ | 'BD'
2041
+ | 'BB'
2042
+ | 'BY'
2043
+ | 'BE'
2044
+ | 'BZ'
2045
+ | 'BJ'
2046
+ | 'BM'
2047
+ | 'BT'
2048
+ | 'BO'
2049
+ | 'BA'
2050
+ | 'BW'
2051
+ | 'BV'
2052
+ | 'BR'
2053
+ | 'IO'
2054
+ | 'BN'
2055
+ | 'BG'
2056
+ | 'BF'
2057
+ | 'BI'
2058
+ | 'KH'
2059
+ | 'CM'
2060
+ | 'CA'
2061
+ | 'CV'
2062
+ | 'KY'
2063
+ | 'CF'
2064
+ | 'TD'
2065
+ | 'CL'
2066
+ | 'CN'
2067
+ | 'CX'
2068
+ | 'CC'
2069
+ | 'CO'
2070
+ | 'KM'
2071
+ | 'CG'
2072
+ | 'CD'
2073
+ | 'CK'
2074
+ | 'CR'
2075
+ | 'CI'
2076
+ | 'HR'
2077
+ | 'CU'
2078
+ | 'CY'
2079
+ | 'CZ'
2080
+ | 'DK'
2081
+ | 'DJ'
2082
+ | 'DM'
2083
+ | 'DO'
2084
+ | 'EC'
2085
+ | 'EG'
2086
+ | 'SV'
2087
+ | 'GQ'
2088
+ | 'ER'
2089
+ | 'EE'
2090
+ | 'ET'
2091
+ | 'FK'
2092
+ | 'FO'
2093
+ | 'FJ'
2094
+ | 'FI'
2095
+ | 'FR'
2096
+ | 'GF'
2097
+ | 'PF'
2098
+ | 'TF'
2099
+ | 'GA'
2100
+ | 'GM'
2101
+ | 'GE'
2102
+ | 'DE'
2103
+ | 'GH'
2104
+ | 'GI'
2105
+ | 'GR'
2106
+ | 'GL'
2107
+ | 'GD'
2108
+ | 'GP'
2109
+ | 'GU'
2110
+ | 'GT'
2111
+ | 'GN'
2112
+ | 'GW'
2113
+ | 'GY'
2114
+ | 'HT'
2115
+ | 'HM'
2116
+ | 'VA'
2117
+ | 'HN'
2118
+ | 'HK'
2119
+ | 'HU'
2120
+ | 'IS'
2121
+ | 'IN'
2122
+ | 'ID'
2123
+ | 'IR'
2124
+ | 'IQ'
2125
+ | 'IE'
2126
+ | 'IL'
2127
+ | 'IT'
2128
+ | 'JM'
2129
+ | 'JP'
2130
+ | 'JO'
2131
+ | 'KZ'
2132
+ | 'KE'
2133
+ | 'KI'
2134
+ | 'KP'
2135
+ | 'KR'
2136
+ | 'KW'
2137
+ | 'KG'
2138
+ | 'LA'
2139
+ | 'LV'
2140
+ | 'LB'
2141
+ | 'LS'
2142
+ | 'LR'
2143
+ | 'LY'
2144
+ | 'LI'
2145
+ | 'LT'
2146
+ | 'LU'
2147
+ | 'MO'
2148
+ | 'MG'
2149
+ | 'MW'
2150
+ | 'MY'
2151
+ | 'MV'
2152
+ | 'ML'
2153
+ | 'MT'
2154
+ | 'MH'
2155
+ | 'MQ'
2156
+ | 'MR'
2157
+ | 'MU'
2158
+ | 'YT'
2159
+ | 'MX'
2160
+ | 'FM'
2161
+ | 'MD'
2162
+ | 'MC'
2163
+ | 'MN'
2164
+ | 'MS'
2165
+ | 'MA'
2166
+ | 'MZ'
2167
+ | 'MM'
2168
+ | 'NA'
2169
+ | 'NR'
2170
+ | 'NP'
2171
+ | 'NL'
2172
+ | 'NC'
2173
+ | 'NZ'
2174
+ | 'NI'
2175
+ | 'NE'
2176
+ | 'NG'
2177
+ | 'NU'
2178
+ | 'NF'
2179
+ | 'MP'
2180
+ | 'MK'
2181
+ | 'NO'
2182
+ | 'OM'
2183
+ | 'PK'
2184
+ | 'PW'
2185
+ | 'PS'
2186
+ | 'PA'
2187
+ | 'PG'
2188
+ | 'PY'
2189
+ | 'PE'
2190
+ | 'PH'
2191
+ | 'PN'
2192
+ | 'PL'
2193
+ | 'PT'
2194
+ | 'PR'
2195
+ | 'QA'
2196
+ | 'RE'
2197
+ | 'RO'
2198
+ | 'RU'
2199
+ | 'RW'
2200
+ | 'SH'
2201
+ | 'KN'
2202
+ | 'LC'
2203
+ | 'PM'
2204
+ | 'VC'
2205
+ | 'WS'
2206
+ | 'SM'
2207
+ | 'ST'
2208
+ | 'SA'
2209
+ | 'SN'
2210
+ | 'SC'
2211
+ | 'SL'
2212
+ | 'SG'
2213
+ | 'SK'
2214
+ | 'SI'
2215
+ | 'SB'
2216
+ | 'SO'
2217
+ | 'ZA'
2218
+ | 'GS'
2219
+ | 'ES'
2220
+ | 'LK'
2221
+ | 'SD'
2222
+ | 'SR'
2223
+ | 'SJ'
2224
+ | 'SZ'
2225
+ | 'SE'
2226
+ | 'CH'
2227
+ | 'SY'
2228
+ | 'TW'
2229
+ | 'TJ'
2230
+ | 'TZ'
2231
+ | 'TH'
2232
+ | 'TL'
2233
+ | 'TG'
2234
+ | 'TK'
2235
+ | 'TO'
2236
+ | 'TT'
2237
+ | 'TN'
2238
+ | 'TR'
2239
+ | 'TM'
2240
+ | 'TC'
2241
+ | 'TV'
2242
+ | 'UG'
2243
+ | 'UA'
2244
+ | 'AE'
2245
+ | 'GB'
2246
+ | 'US'
2247
+ | 'UM'
2248
+ | 'UY'
2249
+ | 'UZ'
2250
+ | 'VU'
2251
+ | 'VE'
2252
+ | 'VN'
2253
+ | 'VG'
2254
+ | 'VI'
2255
+ | 'WF'
2256
+ | 'EH'
2257
+ | 'YE'
2258
+ | 'ZM'
2259
+ | 'ZW'
2260
+ | 'AX'
2261
+ | 'BQ'
2262
+ | 'CW'
2263
+ | 'GG'
2264
+ | 'IM'
2265
+ | 'JE'
2266
+ | 'ME'
2267
+ | 'BL'
2268
+ | 'MF'
2269
+ | 'RS'
2270
+ | 'SX'
2271
+ | 'SS'
2272
+ | 'XK';
2273
+
2274
+ /**
2275
+ * Primary street address line.
2276
+ */
2277
+ line1?: string;
2278
+
2279
+ /**
2280
+ * Secondary street address line.
2281
+ */
2282
+ line2?: string;
2283
+
2284
+ /**
2285
+ * Postal or ZIP code.
2286
+ */
2287
+ postalCode?: string;
2288
+
2289
+ /**
2290
+ * State, province, or region.
2291
+ */
2292
+ state?: string;
2293
+ }
2294
+ }
2295
+
2296
+ export interface CounterpartyCreateParams {
2297
+ /**
2298
+ * The counterparty financial address
2299
+ */
2300
+ financialAddress: CounterpartyCreateParams.FinancialAddress;
2301
+
2302
+ /**
2303
+ * The counterparty date of birth as YYYY-MM-DD
2304
+ */
2305
+ dateOfBirth?: string;
2306
+
2307
+ /**
2308
+ * Whether the counterparty is an individual, business, sole proprietor or
2309
+ * non-profit
2310
+ */
2311
+ entityType?: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
2312
+
2313
+ /**
2314
+ * Whether the counterparty is owned by the merchant
2315
+ */
2316
+ isSelfOwned?: boolean;
2317
+
2318
+ /**
2319
+ * The counterparty metadata
2320
+ */
2321
+ metadata?: { [key: string]: string };
2322
+
2323
+ /**
2324
+ * The counterparty name
2325
+ */
2326
+ name?: string;
2327
+
2328
+ /**
2329
+ * The counterparty physical address
2330
+ */
2331
+ physicalAddress?: CounterpartyCreateParams.PhysicalAddress;
2332
+ }
2333
+
2334
+ export namespace CounterpartyCreateParams {
2335
+ /**
2336
+ * The counterparty financial address
2337
+ */
2338
+ export interface FinancialAddress {
2339
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
2340
+
2341
+ aba?: FinancialAddress.Aba;
2342
+
2343
+ bankCode?: FinancialAddress.BankCode;
2344
+
2345
+ bban?: FinancialAddress.Bban;
2346
+
2347
+ bic?: FinancialAddress.Bic;
2348
+
2349
+ iban?: FinancialAddress.Iban;
2350
+
2351
+ sortCode?: FinancialAddress.SortCode;
2352
+
2353
+ wallet?: FinancialAddress.Wallet;
2354
+ }
2355
+
2356
+ export namespace FinancialAddress {
2357
+ export interface Aba {
2358
+ accountHolderName: string;
2359
+
2360
+ accountNumber: string;
2361
+
2362
+ routingNumber: string;
2363
+ }
2364
+
2365
+ export interface BankCode {
2366
+ accountHolderName: string;
2367
+
2368
+ accountNumber: string;
2369
+
2370
+ code: string;
2371
+ }
2372
+
2373
+ export interface Bban {
2374
+ accountHolderName: string;
2375
+
2376
+ bban: string;
2377
+
2378
+ bic?: string;
2379
+ }
2380
+
2381
+ export interface Bic {
2382
+ accountHolderName: string;
2383
+
2384
+ accountNumber: string;
2385
+
2386
+ bic: string;
2387
+
2388
+ localBankCode?: string;
2389
+ }
2390
+
2391
+ export interface Iban {
2392
+ accountHolderName: string;
2393
+
2394
+ iban: string;
2395
+
2396
+ bic?: string;
2397
+ }
2398
+
2399
+ export interface SortCode {
2400
+ accountHolderName: string;
2401
+
2402
+ accountNumber: string;
2403
+
2404
+ sortCode: string;
2405
+ }
2406
+
2407
+ export interface Wallet {
2408
+ /**
2409
+ * The blockchain wallet address
2410
+ */
2411
+ address: string;
2412
+
2413
+ /**
2414
+ * The blockchain network
2415
+ */
2416
+ blockchain:
2417
+ | 'BTC'
2418
+ | 'BTC-TESTNET4'
2419
+ | 'ETH'
2420
+ | 'ETH-SEPOLIA'
2421
+ | 'SOL'
2422
+ | 'SOL-DEVNET'
2423
+ | 'MATIC'
2424
+ | 'MATIC-AMOY';
2425
+ }
2426
+ }
2427
+
2428
+ /**
2429
+ * The counterparty physical address
2430
+ */
2431
+ export interface PhysicalAddress {
2432
+ /**
2433
+ * City or locality.
2434
+ */
2435
+ city: string;
2436
+
2437
+ /**
2438
+ * ISO 3166-1 alpha-2 country code.
2439
+ */
2440
+ countryCode:
2441
+ | 'AF'
2442
+ | 'AL'
2443
+ | 'DZ'
2444
+ | 'AS'
2445
+ | 'AD'
2446
+ | 'AO'
2447
+ | 'AI'
2448
+ | 'AQ'
2449
+ | 'AG'
2450
+ | 'AR'
2451
+ | 'AM'
2452
+ | 'AW'
2453
+ | 'AU'
2454
+ | 'AT'
2455
+ | 'AZ'
2456
+ | 'BS'
2457
+ | 'BH'
2458
+ | 'BD'
2459
+ | 'BB'
2460
+ | 'BY'
2461
+ | 'BE'
2462
+ | 'BZ'
2463
+ | 'BJ'
2464
+ | 'BM'
2465
+ | 'BT'
2466
+ | 'BO'
2467
+ | 'BA'
2468
+ | 'BW'
2469
+ | 'BV'
2470
+ | 'BR'
2471
+ | 'IO'
2472
+ | 'BN'
2473
+ | 'BG'
2474
+ | 'BF'
2475
+ | 'BI'
2476
+ | 'KH'
2477
+ | 'CM'
2478
+ | 'CA'
2479
+ | 'CV'
2480
+ | 'KY'
2481
+ | 'CF'
2482
+ | 'TD'
2483
+ | 'CL'
2484
+ | 'CN'
2485
+ | 'CX'
2486
+ | 'CC'
2487
+ | 'CO'
2488
+ | 'KM'
2489
+ | 'CG'
2490
+ | 'CD'
2491
+ | 'CK'
2492
+ | 'CR'
2493
+ | 'CI'
2494
+ | 'HR'
2495
+ | 'CU'
2496
+ | 'CY'
2497
+ | 'CZ'
2498
+ | 'DK'
2499
+ | 'DJ'
2500
+ | 'DM'
2501
+ | 'DO'
2502
+ | 'EC'
2503
+ | 'EG'
2504
+ | 'SV'
2505
+ | 'GQ'
2506
+ | 'ER'
2507
+ | 'EE'
2508
+ | 'ET'
2509
+ | 'FK'
2510
+ | 'FO'
2511
+ | 'FJ'
2512
+ | 'FI'
2513
+ | 'FR'
2514
+ | 'GF'
2515
+ | 'PF'
2516
+ | 'TF'
2517
+ | 'GA'
2518
+ | 'GM'
2519
+ | 'GE'
2520
+ | 'DE'
2521
+ | 'GH'
2522
+ | 'GI'
2523
+ | 'GR'
2524
+ | 'GL'
2525
+ | 'GD'
2526
+ | 'GP'
2527
+ | 'GU'
2528
+ | 'GT'
2529
+ | 'GN'
2530
+ | 'GW'
2531
+ | 'GY'
2532
+ | 'HT'
2533
+ | 'HM'
2534
+ | 'VA'
2535
+ | 'HN'
2536
+ | 'HK'
2537
+ | 'HU'
2538
+ | 'IS'
2539
+ | 'IN'
2540
+ | 'ID'
2541
+ | 'IR'
2542
+ | 'IQ'
2543
+ | 'IE'
2544
+ | 'IL'
2545
+ | 'IT'
2546
+ | 'JM'
2547
+ | 'JP'
2548
+ | 'JO'
2549
+ | 'KZ'
2550
+ | 'KE'
2551
+ | 'KI'
2552
+ | 'KP'
2553
+ | 'KR'
2554
+ | 'KW'
2555
+ | 'KG'
2556
+ | 'LA'
2557
+ | 'LV'
2558
+ | 'LB'
2559
+ | 'LS'
2560
+ | 'LR'
2561
+ | 'LY'
2562
+ | 'LI'
2563
+ | 'LT'
2564
+ | 'LU'
2565
+ | 'MO'
2566
+ | 'MG'
2567
+ | 'MW'
2568
+ | 'MY'
2569
+ | 'MV'
2570
+ | 'ML'
2571
+ | 'MT'
2572
+ | 'MH'
2573
+ | 'MQ'
2574
+ | 'MR'
2575
+ | 'MU'
2576
+ | 'YT'
2577
+ | 'MX'
2578
+ | 'FM'
2579
+ | 'MD'
2580
+ | 'MC'
2581
+ | 'MN'
2582
+ | 'MS'
2583
+ | 'MA'
2584
+ | 'MZ'
2585
+ | 'MM'
2586
+ | 'NA'
2587
+ | 'NR'
2588
+ | 'NP'
2589
+ | 'NL'
2590
+ | 'NC'
2591
+ | 'NZ'
2592
+ | 'NI'
2593
+ | 'NE'
2594
+ | 'NG'
2595
+ | 'NU'
2596
+ | 'NF'
2597
+ | 'MP'
2598
+ | 'MK'
2599
+ | 'NO'
2600
+ | 'OM'
2601
+ | 'PK'
2602
+ | 'PW'
2603
+ | 'PS'
2604
+ | 'PA'
2605
+ | 'PG'
2606
+ | 'PY'
2607
+ | 'PE'
2608
+ | 'PH'
2609
+ | 'PN'
2610
+ | 'PL'
2611
+ | 'PT'
2612
+ | 'PR'
2613
+ | 'QA'
2614
+ | 'RE'
2615
+ | 'RO'
2616
+ | 'RU'
2617
+ | 'RW'
2618
+ | 'SH'
2619
+ | 'KN'
2620
+ | 'LC'
2621
+ | 'PM'
2622
+ | 'VC'
2623
+ | 'WS'
2624
+ | 'SM'
2625
+ | 'ST'
2626
+ | 'SA'
2627
+ | 'SN'
2628
+ | 'SC'
2629
+ | 'SL'
2630
+ | 'SG'
2631
+ | 'SK'
2632
+ | 'SI'
2633
+ | 'SB'
2634
+ | 'SO'
2635
+ | 'ZA'
2636
+ | 'GS'
2637
+ | 'ES'
2638
+ | 'LK'
2639
+ | 'SD'
2640
+ | 'SR'
2641
+ | 'SJ'
2642
+ | 'SZ'
2643
+ | 'SE'
2644
+ | 'CH'
2645
+ | 'SY'
2646
+ | 'TW'
2647
+ | 'TJ'
2648
+ | 'TZ'
2649
+ | 'TH'
2650
+ | 'TL'
2651
+ | 'TG'
2652
+ | 'TK'
2653
+ | 'TO'
2654
+ | 'TT'
2655
+ | 'TN'
2656
+ | 'TR'
2657
+ | 'TM'
2658
+ | 'TC'
2659
+ | 'TV'
2660
+ | 'UG'
2661
+ | 'UA'
2662
+ | 'AE'
2663
+ | 'GB'
2664
+ | 'US'
2665
+ | 'UM'
2666
+ | 'UY'
2667
+ | 'UZ'
2668
+ | 'VU'
2669
+ | 'VE'
2670
+ | 'VN'
2671
+ | 'VG'
2672
+ | 'VI'
2673
+ | 'WF'
2674
+ | 'EH'
2675
+ | 'YE'
2676
+ | 'ZM'
2677
+ | 'ZW'
2678
+ | 'AX'
2679
+ | 'BQ'
2680
+ | 'CW'
2681
+ | 'GG'
2682
+ | 'IM'
2683
+ | 'JE'
2684
+ | 'ME'
2685
+ | 'BL'
2686
+ | 'MF'
2687
+ | 'RS'
2688
+ | 'SX'
2689
+ | 'SS'
2690
+ | 'XK';
2691
+
2692
+ /**
2693
+ * Primary street address line.
2694
+ */
2695
+ line1?: string;
2696
+
2697
+ /**
2698
+ * Secondary street address line.
2699
+ */
2700
+ line2?: string;
2701
+
2702
+ /**
2703
+ * Postal or ZIP code.
2704
+ */
2705
+ postalCode?: string;
2706
+
2707
+ /**
2708
+ * State, province, or region.
2709
+ */
2710
+ state?: string;
2711
+ }
2712
+ }
2713
+
2714
+ export interface CounterpartyRetrieveParams {
2715
+ /**
2716
+ * The counterparty id
2717
+ */
2718
+ id: string;
2719
+ }
2720
+
2721
+ export interface CounterpartyUpdateParams {
2722
+ /**
2723
+ * The counterparty id
2724
+ */
2725
+ id: string;
2726
+
2727
+ /**
2728
+ * The counterparty date of birth as YYYY-MM-DD. Pass null to clear.
2729
+ */
2730
+ dateOfBirth?: string | null;
2731
+
2732
+ /**
2733
+ * Whether the counterparty is an individual, business, sole proprietor or
2734
+ * non-profit
2735
+ */
2736
+ entityType?: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
2737
+
2738
+ /**
2739
+ * Whether the counterparty is owned by the merchant
2740
+ */
2741
+ isSelfOwned?: boolean;
2742
+
2743
+ /**
2744
+ * The counterparty name. Pass null to clear.
2745
+ */
2746
+ name?: string | null;
2747
+
2748
+ /**
2749
+ * The counterparty physical address. Pass null to clear.
2750
+ */
2751
+ physicalAddress?: CounterpartyUpdateParams.PhysicalAddress | null;
2752
+ }
2753
+
2754
+ export namespace CounterpartyUpdateParams {
2755
+ /**
2756
+ * The counterparty physical address. Pass null to clear.
2757
+ */
2758
+ export interface PhysicalAddress {
2759
+ /**
2760
+ * City or locality.
2761
+ */
2762
+ city: string;
2763
+
2764
+ /**
2765
+ * ISO 3166-1 alpha-2 country code.
2766
+ */
2767
+ countryCode:
2768
+ | 'AF'
2769
+ | 'AL'
2770
+ | 'DZ'
2771
+ | 'AS'
2772
+ | 'AD'
2773
+ | 'AO'
2774
+ | 'AI'
2775
+ | 'AQ'
2776
+ | 'AG'
2777
+ | 'AR'
2778
+ | 'AM'
2779
+ | 'AW'
2780
+ | 'AU'
2781
+ | 'AT'
2782
+ | 'AZ'
2783
+ | 'BS'
2784
+ | 'BH'
2785
+ | 'BD'
2786
+ | 'BB'
2787
+ | 'BY'
2788
+ | 'BE'
2789
+ | 'BZ'
2790
+ | 'BJ'
2791
+ | 'BM'
2792
+ | 'BT'
2793
+ | 'BO'
2794
+ | 'BA'
2795
+ | 'BW'
2796
+ | 'BV'
2797
+ | 'BR'
2798
+ | 'IO'
2799
+ | 'BN'
2800
+ | 'BG'
2801
+ | 'BF'
2802
+ | 'BI'
2803
+ | 'KH'
2804
+ | 'CM'
2805
+ | 'CA'
2806
+ | 'CV'
2807
+ | 'KY'
2808
+ | 'CF'
2809
+ | 'TD'
2810
+ | 'CL'
2811
+ | 'CN'
2812
+ | 'CX'
2813
+ | 'CC'
2814
+ | 'CO'
2815
+ | 'KM'
2816
+ | 'CG'
2817
+ | 'CD'
2818
+ | 'CK'
2819
+ | 'CR'
2820
+ | 'CI'
2821
+ | 'HR'
2822
+ | 'CU'
2823
+ | 'CY'
2824
+ | 'CZ'
2825
+ | 'DK'
2826
+ | 'DJ'
2827
+ | 'DM'
2828
+ | 'DO'
2829
+ | 'EC'
2830
+ | 'EG'
2831
+ | 'SV'
2832
+ | 'GQ'
2833
+ | 'ER'
2834
+ | 'EE'
2835
+ | 'ET'
2836
+ | 'FK'
2837
+ | 'FO'
2838
+ | 'FJ'
2839
+ | 'FI'
2840
+ | 'FR'
2841
+ | 'GF'
2842
+ | 'PF'
2843
+ | 'TF'
2844
+ | 'GA'
2845
+ | 'GM'
2846
+ | 'GE'
2847
+ | 'DE'
2848
+ | 'GH'
2849
+ | 'GI'
2850
+ | 'GR'
2851
+ | 'GL'
2852
+ | 'GD'
2853
+ | 'GP'
2854
+ | 'GU'
2855
+ | 'GT'
2856
+ | 'GN'
2857
+ | 'GW'
2858
+ | 'GY'
2859
+ | 'HT'
2860
+ | 'HM'
2861
+ | 'VA'
2862
+ | 'HN'
2863
+ | 'HK'
2864
+ | 'HU'
2865
+ | 'IS'
2866
+ | 'IN'
2867
+ | 'ID'
2868
+ | 'IR'
2869
+ | 'IQ'
2870
+ | 'IE'
2871
+ | 'IL'
2872
+ | 'IT'
2873
+ | 'JM'
2874
+ | 'JP'
2875
+ | 'JO'
2876
+ | 'KZ'
2877
+ | 'KE'
2878
+ | 'KI'
2879
+ | 'KP'
2880
+ | 'KR'
2881
+ | 'KW'
2882
+ | 'KG'
2883
+ | 'LA'
2884
+ | 'LV'
2885
+ | 'LB'
2886
+ | 'LS'
2887
+ | 'LR'
2888
+ | 'LY'
2889
+ | 'LI'
2890
+ | 'LT'
2891
+ | 'LU'
2892
+ | 'MO'
2893
+ | 'MG'
2894
+ | 'MW'
2895
+ | 'MY'
2896
+ | 'MV'
2897
+ | 'ML'
2898
+ | 'MT'
2899
+ | 'MH'
2900
+ | 'MQ'
2901
+ | 'MR'
2902
+ | 'MU'
2903
+ | 'YT'
2904
+ | 'MX'
2905
+ | 'FM'
2906
+ | 'MD'
2907
+ | 'MC'
2908
+ | 'MN'
2909
+ | 'MS'
2910
+ | 'MA'
2911
+ | 'MZ'
2912
+ | 'MM'
2913
+ | 'NA'
2914
+ | 'NR'
2915
+ | 'NP'
2916
+ | 'NL'
2917
+ | 'NC'
2918
+ | 'NZ'
2919
+ | 'NI'
2920
+ | 'NE'
2921
+ | 'NG'
2922
+ | 'NU'
2923
+ | 'NF'
2924
+ | 'MP'
2925
+ | 'MK'
2926
+ | 'NO'
2927
+ | 'OM'
2928
+ | 'PK'
2929
+ | 'PW'
2930
+ | 'PS'
2931
+ | 'PA'
2932
+ | 'PG'
2933
+ | 'PY'
2934
+ | 'PE'
2935
+ | 'PH'
2936
+ | 'PN'
2937
+ | 'PL'
2938
+ | 'PT'
2939
+ | 'PR'
2940
+ | 'QA'
2941
+ | 'RE'
2942
+ | 'RO'
2943
+ | 'RU'
2944
+ | 'RW'
2945
+ | 'SH'
2946
+ | 'KN'
2947
+ | 'LC'
2948
+ | 'PM'
2949
+ | 'VC'
2950
+ | 'WS'
2951
+ | 'SM'
2952
+ | 'ST'
2953
+ | 'SA'
2954
+ | 'SN'
2955
+ | 'SC'
2956
+ | 'SL'
2957
+ | 'SG'
2958
+ | 'SK'
2959
+ | 'SI'
2960
+ | 'SB'
2961
+ | 'SO'
2962
+ | 'ZA'
2963
+ | 'GS'
2964
+ | 'ES'
2965
+ | 'LK'
2966
+ | 'SD'
2967
+ | 'SR'
2968
+ | 'SJ'
2969
+ | 'SZ'
2970
+ | 'SE'
2971
+ | 'CH'
2972
+ | 'SY'
2973
+ | 'TW'
2974
+ | 'TJ'
2975
+ | 'TZ'
2976
+ | 'TH'
2977
+ | 'TL'
2978
+ | 'TG'
2979
+ | 'TK'
2980
+ | 'TO'
2981
+ | 'TT'
2982
+ | 'TN'
2983
+ | 'TR'
2984
+ | 'TM'
2985
+ | 'TC'
2986
+ | 'TV'
2987
+ | 'UG'
2988
+ | 'UA'
2989
+ | 'AE'
2990
+ | 'GB'
2991
+ | 'US'
2992
+ | 'UM'
2993
+ | 'UY'
2994
+ | 'UZ'
2995
+ | 'VU'
2996
+ | 'VE'
2997
+ | 'VN'
2998
+ | 'VG'
2999
+ | 'VI'
3000
+ | 'WF'
3001
+ | 'EH'
3002
+ | 'YE'
3003
+ | 'ZM'
3004
+ | 'ZW'
3005
+ | 'AX'
3006
+ | 'BQ'
3007
+ | 'CW'
3008
+ | 'GG'
3009
+ | 'IM'
3010
+ | 'JE'
3011
+ | 'ME'
3012
+ | 'BL'
3013
+ | 'MF'
3014
+ | 'RS'
3015
+ | 'SX'
3016
+ | 'SS'
3017
+ | 'XK';
3018
+
3019
+ /**
3020
+ * Primary street address line.
3021
+ */
3022
+ line1?: string;
3023
+
3024
+ /**
3025
+ * Secondary street address line.
3026
+ */
3027
+ line2?: string;
3028
+
3029
+ /**
3030
+ * Postal or ZIP code.
3031
+ */
3032
+ postalCode?: string;
3033
+
3034
+ /**
3035
+ * State, province, or region.
3036
+ */
3037
+ state?: string;
3038
+ }
3039
+ }
3040
+
3041
+ export interface CounterpartyListParams {
3042
+ /**
3043
+ * Cursor for pagination
3044
+ */
3045
+ afterCursor?: string;
3046
+
3047
+ /**
3048
+ * Maximum number of counterparties to return
3049
+ */
3050
+ limit?: number;
3051
+ }
3052
+
3053
+ export interface CounterpartyActivateParams {
3054
+ /**
3055
+ * The counterparty id
3056
+ */
3057
+ id: string;
3058
+ }
3059
+
3060
+ export declare namespace Counterparties {
3061
+ export {
3062
+ type Counterparty as Counterparty,
3063
+ type CounterpartyRetrieveResponse as CounterpartyRetrieveResponse,
3064
+ type CounterpartyUpdateResponse as CounterpartyUpdateResponse,
3065
+ type CounterpartyListResponse as CounterpartyListResponse,
3066
+ type CounterpartyActivateResponse as CounterpartyActivateResponse,
3067
+ type CounterpartyCreateParams as CounterpartyCreateParams,
3068
+ type CounterpartyRetrieveParams as CounterpartyRetrieveParams,
3069
+ type CounterpartyUpdateParams as CounterpartyUpdateParams,
3070
+ type CounterpartyListParams as CounterpartyListParams,
3071
+ type CounterpartyActivateParams as CounterpartyActivateParams,
3072
+ };
3073
+ }