@augustusbank/typescript-sdk 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-holders.d.mts +1555 -1184
  12. package/resources/account-holders.d.mts.map +1 -1
  13. package/resources/account-holders.d.ts +1555 -1184
  14. package/resources/account-holders.d.ts.map +1 -1
  15. package/resources/account-holders.js +59 -0
  16. package/resources/account-holders.js.map +1 -1
  17. package/resources/account-holders.mjs +59 -0
  18. package/resources/account-holders.mjs.map +1 -1
  19. package/resources/account-programs.d.mts +2 -2
  20. package/resources/account-programs.d.ts +2 -2
  21. package/resources/accounts.d.mts +206 -43
  22. package/resources/accounts.d.mts.map +1 -1
  23. package/resources/accounts.d.ts +206 -43
  24. package/resources/accounts.d.ts.map +1 -1
  25. package/resources/accounts.js +53 -0
  26. package/resources/accounts.js.map +1 -1
  27. package/resources/accounts.mjs +53 -0
  28. package/resources/accounts.mjs.map +1 -1
  29. package/resources/api-keys.d.mts +1 -1
  30. package/resources/api-keys.d.mts.map +1 -1
  31. package/resources/api-keys.d.ts +1 -1
  32. package/resources/api-keys.d.ts.map +1 -1
  33. package/resources/api-versions.d.mts +3 -0
  34. package/resources/api-versions.d.mts.map +1 -1
  35. package/resources/api-versions.d.ts +3 -0
  36. package/resources/api-versions.d.ts.map +1 -1
  37. package/resources/conversions.d.mts +36 -81
  38. package/resources/conversions.d.mts.map +1 -1
  39. package/resources/conversions.d.ts +36 -81
  40. package/resources/conversions.d.ts.map +1 -1
  41. package/resources/conversions.js +25 -1
  42. package/resources/conversions.js.map +1 -1
  43. package/resources/conversions.mjs +25 -1
  44. package/resources/conversions.mjs.map +1 -1
  45. package/resources/counterparties.d.mts +1042 -0
  46. package/resources/counterparties.d.mts.map +1 -0
  47. package/resources/counterparties.d.ts +1042 -0
  48. package/resources/counterparties.d.ts.map +1 -0
  49. package/resources/counterparties.js +45 -0
  50. package/resources/counterparties.js.map +1 -0
  51. package/resources/counterparties.mjs +41 -0
  52. package/resources/counterparties.mjs.map +1 -0
  53. package/resources/deposits.d.mts +38 -186
  54. package/resources/deposits.d.mts.map +1 -1
  55. package/resources/deposits.d.ts +38 -186
  56. package/resources/deposits.d.ts.map +1 -1
  57. package/resources/index.d.mts +2 -0
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +2 -0
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +5 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +2 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/payouts.d.mts +458 -276
  66. package/resources/payouts.d.mts.map +1 -1
  67. package/resources/payouts.d.ts +458 -276
  68. package/resources/payouts.d.ts.map +1 -1
  69. package/resources/payouts.js +27 -0
  70. package/resources/payouts.js.map +1 -1
  71. package/resources/payouts.mjs +27 -0
  72. package/resources/payouts.mjs.map +1 -1
  73. package/resources/quotes/indicative.d.mts +7 -11
  74. package/resources/quotes/indicative.d.mts.map +1 -1
  75. package/resources/quotes/indicative.d.ts +7 -11
  76. package/resources/quotes/indicative.d.ts.map +1 -1
  77. package/resources/quotes/quotes.d.mts +4 -8
  78. package/resources/quotes/quotes.d.mts.map +1 -1
  79. package/resources/quotes/quotes.d.ts +4 -8
  80. package/resources/quotes/quotes.d.ts.map +1 -1
  81. package/resources/quotes/quotes.js.map +1 -1
  82. package/resources/quotes/quotes.mjs.map +1 -1
  83. package/resources/returns.d.mts +84 -39
  84. package/resources/returns.d.mts.map +1 -1
  85. package/resources/returns.d.ts +84 -39
  86. package/resources/returns.d.ts.map +1 -1
  87. package/resources/returns.js +22 -0
  88. package/resources/returns.js.map +1 -1
  89. package/resources/returns.mjs +22 -0
  90. package/resources/returns.mjs.map +1 -1
  91. package/resources/scopes.d.mts +4 -1
  92. package/resources/scopes.d.mts.map +1 -1
  93. package/resources/scopes.d.ts +4 -1
  94. package/resources/scopes.d.ts.map +1 -1
  95. package/resources/simulations/account-programs.d.mts +281 -0
  96. package/resources/simulations/account-programs.d.mts.map +1 -0
  97. package/resources/simulations/account-programs.d.ts +281 -0
  98. package/resources/simulations/account-programs.d.ts.map +1 -0
  99. package/resources/simulations/account-programs.js +98 -0
  100. package/resources/simulations/account-programs.js.map +1 -0
  101. package/resources/simulations/account-programs.mjs +94 -0
  102. package/resources/simulations/account-programs.mjs.map +1 -0
  103. package/resources/simulations/accounts.d.mts +270 -0
  104. package/resources/simulations/accounts.d.mts.map +1 -0
  105. package/resources/simulations/accounts.d.ts +270 -0
  106. package/resources/simulations/accounts.d.ts.map +1 -0
  107. package/resources/simulations/accounts.js +91 -0
  108. package/resources/simulations/accounts.js.map +1 -0
  109. package/resources/simulations/accounts.mjs +87 -0
  110. package/resources/simulations/accounts.mjs.map +1 -0
  111. package/resources/simulations/deposits.d.mts +218 -0
  112. package/resources/simulations/deposits.d.mts.map +1 -0
  113. package/resources/simulations/deposits.d.ts +218 -0
  114. package/resources/simulations/deposits.d.ts.map +1 -0
  115. package/resources/simulations/deposits.js +25 -0
  116. package/resources/simulations/deposits.js.map +1 -0
  117. package/resources/simulations/deposits.mjs +21 -0
  118. package/resources/simulations/deposits.mjs.map +1 -0
  119. package/resources/simulations/index.d.mts +6 -0
  120. package/resources/simulations/index.d.mts.map +1 -0
  121. package/resources/simulations/index.d.ts +6 -0
  122. package/resources/simulations/index.d.ts.map +1 -0
  123. package/resources/simulations/index.js +15 -0
  124. package/resources/simulations/index.js.map +1 -0
  125. package/resources/simulations/index.mjs +7 -0
  126. package/resources/simulations/index.mjs.map +1 -0
  127. package/resources/simulations/payouts.d.mts +76 -0
  128. package/resources/simulations/payouts.d.mts.map +1 -0
  129. package/resources/simulations/payouts.d.ts +76 -0
  130. package/resources/simulations/payouts.d.ts.map +1 -0
  131. package/resources/simulations/payouts.js +39 -0
  132. package/resources/simulations/payouts.js.map +1 -0
  133. package/resources/simulations/payouts.mjs +35 -0
  134. package/resources/simulations/payouts.mjs.map +1 -0
  135. package/resources/simulations/simulations.d.mts +22 -0
  136. package/resources/simulations/simulations.d.mts.map +1 -0
  137. package/resources/simulations/simulations.d.ts +22 -0
  138. package/resources/simulations/simulations.d.ts.map +1 -0
  139. package/resources/simulations/simulations.js +29 -0
  140. package/resources/simulations/simulations.js.map +1 -0
  141. package/resources/simulations/simulations.mjs +24 -0
  142. package/resources/simulations/simulations.mjs.map +1 -0
  143. package/resources/simulations.d.mts +2 -0
  144. package/resources/simulations.d.mts.map +1 -0
  145. package/resources/simulations.d.ts +2 -0
  146. package/resources/simulations.d.ts.map +1 -0
  147. package/resources/simulations.js +6 -0
  148. package/resources/simulations.js.map +1 -0
  149. package/resources/simulations.mjs +3 -0
  150. package/resources/simulations.mjs.map +1 -0
  151. package/resources/transactions.d.mts +300 -180
  152. package/resources/transactions.d.mts.map +1 -1
  153. package/resources/transactions.d.ts +300 -180
  154. package/resources/transactions.d.ts.map +1 -1
  155. package/resources/webhook-subscriptions.d.mts +54 -4
  156. package/resources/webhook-subscriptions.d.mts.map +1 -1
  157. package/resources/webhook-subscriptions.d.ts +54 -4
  158. package/resources/webhook-subscriptions.d.ts.map +1 -1
  159. package/resources/webhook-subscriptions.js +49 -0
  160. package/resources/webhook-subscriptions.js.map +1 -1
  161. package/resources/webhook-subscriptions.mjs +49 -0
  162. package/resources/webhook-subscriptions.mjs.map +1 -1
  163. package/resources/webhooks.d.mts +736 -953
  164. package/resources/webhooks.d.mts.map +1 -1
  165. package/resources/webhooks.d.ts +736 -953
  166. package/resources/webhooks.d.ts.map +1 -1
  167. package/src/client.ts +32 -0
  168. package/src/resources/account-holders.ts +1701 -1282
  169. package/src/resources/account-programs.ts +2 -2
  170. package/src/resources/accounts.ts +236 -44
  171. package/src/resources/api-keys.ts +3 -0
  172. package/src/resources/api-versions.ts +3 -0
  173. package/src/resources/conversions.ts +36 -93
  174. package/src/resources/counterparties.ts +3127 -0
  175. package/src/resources/deposits.ts +54 -269
  176. package/src/resources/index.ts +13 -0
  177. package/src/resources/payouts.ts +2089 -367
  178. package/src/resources/quotes/indicative.ts +7 -12
  179. package/src/resources/quotes/quotes.ts +4 -9
  180. package/src/resources/returns.ts +144 -40
  181. package/src/resources/scopes.ts +7 -1
  182. package/src/resources/simulations/account-programs.ts +363 -0
  183. package/src/resources/simulations/accounts.ts +340 -0
  184. package/src/resources/simulations/deposits.ts +530 -0
  185. package/src/resources/simulations/index.ts +32 -0
  186. package/src/resources/simulations/payouts.ts +98 -0
  187. package/src/resources/simulations/simulations.ts +82 -0
  188. package/src/resources/simulations.ts +3 -0
  189. package/src/resources/transactions.ts +910 -232
  190. package/src/resources/webhook-subscriptions.ts +54 -4
  191. package/src/resources/webhooks.ts +948 -1126
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -37,7 +37,7 @@ export interface TransactionRetrieveResponse {
37
37
  id: string;
38
38
 
39
39
  /**
40
- * ID of the merchant account this transaction settled on.
40
+ * ID of the merchant account this transaction was credited to or debited from.
41
41
  */
42
42
  account_id: string;
43
43
 
@@ -47,34 +47,41 @@ export interface TransactionRetrieveResponse {
47
47
  amount: string;
48
48
 
49
49
  /**
50
- * Reference visible on the bank statement, or null when not applicable.
51
- */
52
- bank_statement_reference: string | null;
53
-
54
- /**
55
- * Bank account or wallet of the other party, or null when not known.
50
+ * ISO 8601 UTC timestamp when the transaction was recorded.
56
51
  */
57
- counterparty:
58
- | TransactionRetrieveResponse.UnionMember0
59
- | TransactionRetrieveResponse.UnionMember1
60
- | TransactionRetrieveResponse.UnionMember2
61
- | TransactionRetrieveResponse.UnionMember3
62
- | null;
52
+ booked_at: string;
63
53
 
64
54
  /**
65
- * ISO 8601 UTC timestamp when the transaction was recorded.
55
+ * Counterparty of the transaction.
66
56
  */
67
- created_at: string;
57
+ counterparty: TransactionRetrieveResponse.Counterparty | null;
68
58
 
69
59
  /**
70
- * ISO 4217 fiat or crypto currency code of the amount.
60
+ * Currency code (ISO 4217 or crypto).
71
61
  */
72
62
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
73
63
 
74
64
  /**
75
- * The product that caused this transaction, or null when no product is linked.
65
+ * Payment scheme or blockchain used for the transaction, or null when unknown.
76
66
  */
77
- product: TransactionRetrieveResponse.Product | null;
67
+ rail:
68
+ | 'sepa'
69
+ | 'sepa_instant'
70
+ | 'faster_payments'
71
+ | 'swift'
72
+ | 'internal'
73
+ | 'target'
74
+ | 'ach'
75
+ | 'fedwire'
76
+ | 'bitcoin'
77
+ | 'bitcoin_testnet4'
78
+ | 'ethereum'
79
+ | 'ethereum_sepolia'
80
+ | 'solana'
81
+ | 'solana_devnet'
82
+ | 'polygon'
83
+ | 'polygon_amoy'
84
+ | null;
78
85
 
79
86
  /**
80
87
  * Direction of the movement relative to the merchant account.
@@ -82,121 +89,453 @@ export interface TransactionRetrieveResponse {
82
89
  side: 'credit' | 'debit';
83
90
 
84
91
  /**
85
- * Lifecycle state of the transaction.
92
+ * State of the transaction. Transactions are by definition booked.
93
+ */
94
+ status: 'booked';
95
+
96
+ /**
97
+ * Transaction hash for crypto transactions, or null when not known. Only
98
+ * blockchain rails support this field.
86
99
  */
87
- status: 'pending' | 'completed' | 'failed';
100
+ tx_hash: string | null;
88
101
 
89
102
  /**
90
103
  * Resource type discriminator.
91
104
  */
92
105
  type: 'transaction';
106
+
107
+ /**
108
+ * Unstructured remittance information attached to the transfer. Not all rails
109
+ * support this field.
110
+ */
111
+ unstructured_remittance_information: string | null;
93
112
  }
94
113
 
95
114
  export namespace TransactionRetrieveResponse {
96
- export interface UnionMember0 {
97
- /**
98
- * Name of the account holder.
99
- */
100
- account_holder_name: string;
101
-
102
- /**
103
- * Bank Identifier Code, or null if not provided.
104
- */
105
- bic: string | null;
106
-
107
- /**
108
- * International Bank Account Number.
109
- */
110
- iban: string;
111
-
112
- /**
113
- * Discriminator for IBAN financial address.
114
- */
115
- type: 'iban';
116
- }
117
-
118
- export interface UnionMember1 {
119
- /**
120
- * Name of the account holder.
121
- */
122
- account_holder_name: string;
123
-
124
- /**
125
- * UK account number (8 digits).
126
- */
127
- account_number: string;
128
-
129
- /**
130
- * UK sort code (6 digits).
131
- */
132
- sort_code: string;
133
-
134
- /**
135
- * Discriminator for UK sort code financial address.
136
- */
137
- type: 'sort_code';
138
- }
139
-
140
- export interface UnionMember2 {
141
- /**
142
- * Name of the account holder.
143
- */
144
- account_holder_name: string;
145
-
146
- /**
147
- * Bank account number.
148
- */
149
- account_number: string;
150
-
151
- /**
152
- * ABA routing number (9 digits).
153
- */
154
- routing_number: string;
155
-
156
- /**
157
- * Discriminator for ABA wire financial address.
158
- */
159
- type: 'aba';
160
- }
161
-
162
- export interface UnionMember3 {
163
- /**
164
- * Wallet address on the specified blockchain.
165
- */
166
- address: string;
167
-
115
+ /**
116
+ * Counterparty of the transaction.
117
+ */
118
+ export interface Counterparty {
168
119
  /**
169
- * Blockchain network for the crypto wallet.
120
+ * Financial address of the counterparty.
170
121
  */
171
- blockchain:
172
- | 'bitcoin'
173
- | 'ethereum'
174
- | 'solana'
175
- | 'polygon'
176
- | 'bitcoin_testnet4'
177
- | 'ethereum_sepolia'
178
- | 'solana_devnet'
179
- | 'polygon_amoy';
122
+ financial_address:
123
+ | Counterparty.IbanFinancialAddress
124
+ | Counterparty.SortCodeFinancialAddress
125
+ | Counterparty.AbaFinancialAddress
126
+ | Counterparty.BicFinancialAddress
127
+ | Counterparty.CryptoWalletFinancialAddress;
180
128
 
181
129
  /**
182
- * Discriminator for crypto wallet financial address.
130
+ * Physical address of the counterparty.
183
131
  */
184
- type: 'crypto_wallet';
132
+ physical_address: Counterparty.PhysicalAddress | null;
185
133
  }
186
134
 
187
- /**
188
- * The product that caused this transaction, or null when no product is linked.
189
- */
190
- export interface Product {
191
- /**
192
- * Identifier of the product resource that caused this transaction.
193
- */
194
- id: string;
135
+ export namespace Counterparty {
136
+ export interface IbanFinancialAddress {
137
+ /**
138
+ * Name of the account holder.
139
+ */
140
+ account_holder_name: string;
141
+
142
+ /**
143
+ * Bank Identifier Code, or null if not provided.
144
+ */
145
+ bic: string | null;
146
+
147
+ /**
148
+ * International Bank Account Number.
149
+ */
150
+ iban: string;
151
+
152
+ /**
153
+ * Discriminator for IBAN financial address.
154
+ */
155
+ type: 'iban';
156
+ }
157
+
158
+ export interface SortCodeFinancialAddress {
159
+ /**
160
+ * Name of the account holder.
161
+ */
162
+ account_holder_name: string;
163
+
164
+ /**
165
+ * UK account number (8 digits).
166
+ */
167
+ account_number: string;
168
+
169
+ /**
170
+ * UK sort code (6 digits).
171
+ */
172
+ sort_code: string;
173
+
174
+ /**
175
+ * Discriminator for UK sort code financial address.
176
+ */
177
+ type: 'sort_code';
178
+ }
179
+
180
+ export interface AbaFinancialAddress {
181
+ /**
182
+ * Name of the account holder.
183
+ */
184
+ account_holder_name: string;
185
+
186
+ /**
187
+ * Bank account number.
188
+ */
189
+ account_number: string;
190
+
191
+ /**
192
+ * ABA routing number (9 digits).
193
+ */
194
+ routing_number: string;
195
+
196
+ /**
197
+ * Discriminator for ABA wire financial address.
198
+ */
199
+ type: 'aba';
200
+ }
201
+
202
+ export interface BicFinancialAddress {
203
+ /**
204
+ * Name of the account holder.
205
+ */
206
+ account_holder_name: string;
207
+
208
+ /**
209
+ * Local-format bank account number.
210
+ */
211
+ account_number: string;
212
+
213
+ /**
214
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
215
+ */
216
+ bic: string;
217
+
218
+ /**
219
+ * Domestic bank or branch code where the destination country uses one (for example
220
+ * the BSB in Australia), or null.
221
+ */
222
+ local_bank_code: string | null;
223
+
224
+ /**
225
+ * Discriminator for BIC + local account financial address.
226
+ */
227
+ type: 'bic';
228
+ }
229
+
230
+ export interface CryptoWalletFinancialAddress {
231
+ /**
232
+ * Wallet address on the specified blockchain.
233
+ */
234
+ address: string;
235
+
236
+ /**
237
+ * Blockchain network for the crypto wallet.
238
+ */
239
+ blockchain:
240
+ | 'bitcoin'
241
+ | 'ethereum'
242
+ | 'solana'
243
+ | 'polygon'
244
+ | 'bitcoin_testnet4'
245
+ | 'ethereum_sepolia'
246
+ | 'solana_devnet'
247
+ | 'polygon_amoy';
248
+
249
+ /**
250
+ * Discriminator for crypto wallet financial address.
251
+ */
252
+ type: 'crypto_wallet';
253
+ }
195
254
 
196
255
  /**
197
- * Type of the product that caused this transaction.
256
+ * Physical address of the counterparty.
198
257
  */
199
- type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
258
+ export interface PhysicalAddress {
259
+ /**
260
+ * City or locality.
261
+ */
262
+ city: string;
263
+
264
+ /**
265
+ * ISO 3166-1 alpha-2 country code.
266
+ */
267
+ country_code:
268
+ | 'AF'
269
+ | 'AL'
270
+ | 'DZ'
271
+ | 'AS'
272
+ | 'AD'
273
+ | 'AO'
274
+ | 'AI'
275
+ | 'AQ'
276
+ | 'AG'
277
+ | 'AR'
278
+ | 'AM'
279
+ | 'AW'
280
+ | 'AU'
281
+ | 'AT'
282
+ | 'AZ'
283
+ | 'BS'
284
+ | 'BH'
285
+ | 'BD'
286
+ | 'BB'
287
+ | 'BY'
288
+ | 'BE'
289
+ | 'BZ'
290
+ | 'BJ'
291
+ | 'BM'
292
+ | 'BT'
293
+ | 'BO'
294
+ | 'BA'
295
+ | 'BW'
296
+ | 'BV'
297
+ | 'BR'
298
+ | 'IO'
299
+ | 'BN'
300
+ | 'BG'
301
+ | 'BF'
302
+ | 'BI'
303
+ | 'KH'
304
+ | 'CM'
305
+ | 'CA'
306
+ | 'CV'
307
+ | 'KY'
308
+ | 'CF'
309
+ | 'TD'
310
+ | 'CL'
311
+ | 'CN'
312
+ | 'CX'
313
+ | 'CC'
314
+ | 'CO'
315
+ | 'KM'
316
+ | 'CG'
317
+ | 'CD'
318
+ | 'CK'
319
+ | 'CR'
320
+ | 'CI'
321
+ | 'HR'
322
+ | 'CU'
323
+ | 'CY'
324
+ | 'CZ'
325
+ | 'DK'
326
+ | 'DJ'
327
+ | 'DM'
328
+ | 'DO'
329
+ | 'EC'
330
+ | 'EG'
331
+ | 'SV'
332
+ | 'GQ'
333
+ | 'ER'
334
+ | 'EE'
335
+ | 'ET'
336
+ | 'FK'
337
+ | 'FO'
338
+ | 'FJ'
339
+ | 'FI'
340
+ | 'FR'
341
+ | 'GF'
342
+ | 'PF'
343
+ | 'TF'
344
+ | 'GA'
345
+ | 'GM'
346
+ | 'GE'
347
+ | 'DE'
348
+ | 'GH'
349
+ | 'GI'
350
+ | 'GR'
351
+ | 'GL'
352
+ | 'GD'
353
+ | 'GP'
354
+ | 'GU'
355
+ | 'GT'
356
+ | 'GN'
357
+ | 'GW'
358
+ | 'GY'
359
+ | 'HT'
360
+ | 'HM'
361
+ | 'VA'
362
+ | 'HN'
363
+ | 'HK'
364
+ | 'HU'
365
+ | 'IS'
366
+ | 'IN'
367
+ | 'ID'
368
+ | 'IR'
369
+ | 'IQ'
370
+ | 'IE'
371
+ | 'IL'
372
+ | 'IT'
373
+ | 'JM'
374
+ | 'JP'
375
+ | 'JO'
376
+ | 'KZ'
377
+ | 'KE'
378
+ | 'KI'
379
+ | 'KP'
380
+ | 'KR'
381
+ | 'KW'
382
+ | 'KG'
383
+ | 'LA'
384
+ | 'LV'
385
+ | 'LB'
386
+ | 'LS'
387
+ | 'LR'
388
+ | 'LY'
389
+ | 'LI'
390
+ | 'LT'
391
+ | 'LU'
392
+ | 'MO'
393
+ | 'MG'
394
+ | 'MW'
395
+ | 'MY'
396
+ | 'MV'
397
+ | 'ML'
398
+ | 'MT'
399
+ | 'MH'
400
+ | 'MQ'
401
+ | 'MR'
402
+ | 'MU'
403
+ | 'YT'
404
+ | 'MX'
405
+ | 'FM'
406
+ | 'MD'
407
+ | 'MC'
408
+ | 'MN'
409
+ | 'MS'
410
+ | 'MA'
411
+ | 'MZ'
412
+ | 'MM'
413
+ | 'NA'
414
+ | 'NR'
415
+ | 'NP'
416
+ | 'NL'
417
+ | 'NC'
418
+ | 'NZ'
419
+ | 'NI'
420
+ | 'NE'
421
+ | 'NG'
422
+ | 'NU'
423
+ | 'NF'
424
+ | 'MP'
425
+ | 'MK'
426
+ | 'NO'
427
+ | 'OM'
428
+ | 'PK'
429
+ | 'PW'
430
+ | 'PS'
431
+ | 'PA'
432
+ | 'PG'
433
+ | 'PY'
434
+ | 'PE'
435
+ | 'PH'
436
+ | 'PN'
437
+ | 'PL'
438
+ | 'PT'
439
+ | 'PR'
440
+ | 'QA'
441
+ | 'RE'
442
+ | 'RO'
443
+ | 'RU'
444
+ | 'RW'
445
+ | 'SH'
446
+ | 'KN'
447
+ | 'LC'
448
+ | 'PM'
449
+ | 'VC'
450
+ | 'WS'
451
+ | 'SM'
452
+ | 'ST'
453
+ | 'SA'
454
+ | 'SN'
455
+ | 'SC'
456
+ | 'SL'
457
+ | 'SG'
458
+ | 'SK'
459
+ | 'SI'
460
+ | 'SB'
461
+ | 'SO'
462
+ | 'ZA'
463
+ | 'GS'
464
+ | 'ES'
465
+ | 'LK'
466
+ | 'SD'
467
+ | 'SR'
468
+ | 'SJ'
469
+ | 'SZ'
470
+ | 'SE'
471
+ | 'CH'
472
+ | 'SY'
473
+ | 'TW'
474
+ | 'TJ'
475
+ | 'TZ'
476
+ | 'TH'
477
+ | 'TL'
478
+ | 'TG'
479
+ | 'TK'
480
+ | 'TO'
481
+ | 'TT'
482
+ | 'TN'
483
+ | 'TR'
484
+ | 'TM'
485
+ | 'TC'
486
+ | 'TV'
487
+ | 'UG'
488
+ | 'UA'
489
+ | 'AE'
490
+ | 'GB'
491
+ | 'US'
492
+ | 'UM'
493
+ | 'UY'
494
+ | 'UZ'
495
+ | 'VU'
496
+ | 'VE'
497
+ | 'VN'
498
+ | 'VG'
499
+ | 'VI'
500
+ | 'WF'
501
+ | 'EH'
502
+ | 'YE'
503
+ | 'ZM'
504
+ | 'ZW'
505
+ | 'AX'
506
+ | 'BQ'
507
+ | 'CW'
508
+ | 'GG'
509
+ | 'IM'
510
+ | 'JE'
511
+ | 'ME'
512
+ | 'BL'
513
+ | 'MF'
514
+ | 'RS'
515
+ | 'SX'
516
+ | 'SS'
517
+ | 'XK';
518
+
519
+ /**
520
+ * Primary street address.
521
+ */
522
+ line_1: string;
523
+
524
+ /**
525
+ * Secondary street address, or null if not recorded.
526
+ */
527
+ line_2: string | null;
528
+
529
+ /**
530
+ * Postal or ZIP code.
531
+ */
532
+ postal_code: string;
533
+
534
+ /**
535
+ * State, province, or region, or null if not recorded.
536
+ */
537
+ state: string | null;
538
+ }
200
539
  }
201
540
  }
202
541
 
@@ -207,7 +546,7 @@ export interface TransactionListResponse {
207
546
  id: string;
208
547
 
209
548
  /**
210
- * ID of the merchant account this transaction settled on.
549
+ * ID of the merchant account this transaction was credited to or debited from.
211
550
  */
212
551
  account_id: string;
213
552
 
@@ -217,34 +556,41 @@ export interface TransactionListResponse {
217
556
  amount: string;
218
557
 
219
558
  /**
220
- * Reference visible on the bank statement, or null when not applicable.
221
- */
222
- bank_statement_reference: string | null;
223
-
224
- /**
225
- * Bank account or wallet of the other party, or null when not known.
559
+ * ISO 8601 UTC timestamp when the transaction was recorded.
226
560
  */
227
- counterparty:
228
- | TransactionListResponse.UnionMember0
229
- | TransactionListResponse.UnionMember1
230
- | TransactionListResponse.UnionMember2
231
- | TransactionListResponse.UnionMember3
232
- | null;
561
+ booked_at: string;
233
562
 
234
563
  /**
235
- * ISO 8601 UTC timestamp when the transaction was recorded.
564
+ * Counterparty of the transaction.
236
565
  */
237
- created_at: string;
566
+ counterparty: TransactionListResponse.Counterparty | null;
238
567
 
239
568
  /**
240
- * ISO 4217 fiat or crypto currency code of the amount.
569
+ * Currency code (ISO 4217 or crypto).
241
570
  */
242
571
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
243
572
 
244
573
  /**
245
- * The product that caused this transaction, or null when no product is linked.
574
+ * Payment scheme or blockchain used for the transaction, or null when unknown.
246
575
  */
247
- product: TransactionListResponse.Product | null;
576
+ rail:
577
+ | 'sepa'
578
+ | 'sepa_instant'
579
+ | 'faster_payments'
580
+ | 'swift'
581
+ | 'internal'
582
+ | 'target'
583
+ | 'ach'
584
+ | 'fedwire'
585
+ | 'bitcoin'
586
+ | 'bitcoin_testnet4'
587
+ | 'ethereum'
588
+ | 'ethereum_sepolia'
589
+ | 'solana'
590
+ | 'solana_devnet'
591
+ | 'polygon'
592
+ | 'polygon_amoy'
593
+ | null;
248
594
 
249
595
  /**
250
596
  * Direction of the movement relative to the merchant account.
@@ -252,121 +598,453 @@ export interface TransactionListResponse {
252
598
  side: 'credit' | 'debit';
253
599
 
254
600
  /**
255
- * Lifecycle state of the transaction.
601
+ * State of the transaction. Transactions are by definition booked.
602
+ */
603
+ status: 'booked';
604
+
605
+ /**
606
+ * Transaction hash for crypto transactions, or null when not known. Only
607
+ * blockchain rails support this field.
256
608
  */
257
- status: 'pending' | 'completed' | 'failed';
609
+ tx_hash: string | null;
258
610
 
259
611
  /**
260
612
  * Resource type discriminator.
261
613
  */
262
614
  type: 'transaction';
615
+
616
+ /**
617
+ * Unstructured remittance information attached to the transfer. Not all rails
618
+ * support this field.
619
+ */
620
+ unstructured_remittance_information: string | null;
263
621
  }
264
622
 
265
623
  export namespace TransactionListResponse {
266
- export interface UnionMember0 {
267
- /**
268
- * Name of the account holder.
269
- */
270
- account_holder_name: string;
271
-
272
- /**
273
- * Bank Identifier Code, or null if not provided.
274
- */
275
- bic: string | null;
276
-
277
- /**
278
- * International Bank Account Number.
279
- */
280
- iban: string;
281
-
282
- /**
283
- * Discriminator for IBAN financial address.
284
- */
285
- type: 'iban';
286
- }
287
-
288
- export interface UnionMember1 {
289
- /**
290
- * Name of the account holder.
291
- */
292
- account_holder_name: string;
293
-
294
- /**
295
- * UK account number (8 digits).
296
- */
297
- account_number: string;
298
-
299
- /**
300
- * UK sort code (6 digits).
301
- */
302
- sort_code: string;
303
-
304
- /**
305
- * Discriminator for UK sort code financial address.
306
- */
307
- type: 'sort_code';
308
- }
309
-
310
- export interface UnionMember2 {
311
- /**
312
- * Name of the account holder.
313
- */
314
- account_holder_name: string;
315
-
316
- /**
317
- * Bank account number.
318
- */
319
- account_number: string;
320
-
321
- /**
322
- * ABA routing number (9 digits).
323
- */
324
- routing_number: string;
325
-
326
- /**
327
- * Discriminator for ABA wire financial address.
328
- */
329
- type: 'aba';
330
- }
331
-
332
- export interface UnionMember3 {
333
- /**
334
- * Wallet address on the specified blockchain.
335
- */
336
- address: string;
337
-
624
+ /**
625
+ * Counterparty of the transaction.
626
+ */
627
+ export interface Counterparty {
338
628
  /**
339
- * Blockchain network for the crypto wallet.
629
+ * Financial address of the counterparty.
340
630
  */
341
- blockchain:
342
- | 'bitcoin'
343
- | 'ethereum'
344
- | 'solana'
345
- | 'polygon'
346
- | 'bitcoin_testnet4'
347
- | 'ethereum_sepolia'
348
- | 'solana_devnet'
349
- | 'polygon_amoy';
631
+ financial_address:
632
+ | Counterparty.IbanFinancialAddress
633
+ | Counterparty.SortCodeFinancialAddress
634
+ | Counterparty.AbaFinancialAddress
635
+ | Counterparty.BicFinancialAddress
636
+ | Counterparty.CryptoWalletFinancialAddress;
350
637
 
351
638
  /**
352
- * Discriminator for crypto wallet financial address.
639
+ * Physical address of the counterparty.
353
640
  */
354
- type: 'crypto_wallet';
641
+ physical_address: Counterparty.PhysicalAddress | null;
355
642
  }
356
643
 
357
- /**
358
- * The product that caused this transaction, or null when no product is linked.
359
- */
360
- export interface Product {
361
- /**
362
- * Identifier of the product resource that caused this transaction.
363
- */
364
- id: string;
644
+ export namespace Counterparty {
645
+ export interface IbanFinancialAddress {
646
+ /**
647
+ * Name of the account holder.
648
+ */
649
+ account_holder_name: string;
650
+
651
+ /**
652
+ * Bank Identifier Code, or null if not provided.
653
+ */
654
+ bic: string | null;
655
+
656
+ /**
657
+ * International Bank Account Number.
658
+ */
659
+ iban: string;
660
+
661
+ /**
662
+ * Discriminator for IBAN financial address.
663
+ */
664
+ type: 'iban';
665
+ }
666
+
667
+ export interface SortCodeFinancialAddress {
668
+ /**
669
+ * Name of the account holder.
670
+ */
671
+ account_holder_name: string;
672
+
673
+ /**
674
+ * UK account number (8 digits).
675
+ */
676
+ account_number: string;
677
+
678
+ /**
679
+ * UK sort code (6 digits).
680
+ */
681
+ sort_code: string;
682
+
683
+ /**
684
+ * Discriminator for UK sort code financial address.
685
+ */
686
+ type: 'sort_code';
687
+ }
688
+
689
+ export interface AbaFinancialAddress {
690
+ /**
691
+ * Name of the account holder.
692
+ */
693
+ account_holder_name: string;
694
+
695
+ /**
696
+ * Bank account number.
697
+ */
698
+ account_number: string;
699
+
700
+ /**
701
+ * ABA routing number (9 digits).
702
+ */
703
+ routing_number: string;
704
+
705
+ /**
706
+ * Discriminator for ABA wire financial address.
707
+ */
708
+ type: 'aba';
709
+ }
710
+
711
+ export interface BicFinancialAddress {
712
+ /**
713
+ * Name of the account holder.
714
+ */
715
+ account_holder_name: string;
716
+
717
+ /**
718
+ * Local-format bank account number.
719
+ */
720
+ account_number: string;
721
+
722
+ /**
723
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
724
+ */
725
+ bic: string;
726
+
727
+ /**
728
+ * Domestic bank or branch code where the destination country uses one (for example
729
+ * the BSB in Australia), or null.
730
+ */
731
+ local_bank_code: string | null;
732
+
733
+ /**
734
+ * Discriminator for BIC + local account financial address.
735
+ */
736
+ type: 'bic';
737
+ }
738
+
739
+ export interface CryptoWalletFinancialAddress {
740
+ /**
741
+ * Wallet address on the specified blockchain.
742
+ */
743
+ address: string;
744
+
745
+ /**
746
+ * Blockchain network for the crypto wallet.
747
+ */
748
+ blockchain:
749
+ | 'bitcoin'
750
+ | 'ethereum'
751
+ | 'solana'
752
+ | 'polygon'
753
+ | 'bitcoin_testnet4'
754
+ | 'ethereum_sepolia'
755
+ | 'solana_devnet'
756
+ | 'polygon_amoy';
757
+
758
+ /**
759
+ * Discriminator for crypto wallet financial address.
760
+ */
761
+ type: 'crypto_wallet';
762
+ }
365
763
 
366
764
  /**
367
- * Type of the product that caused this transaction.
765
+ * Physical address of the counterparty.
368
766
  */
369
- type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
767
+ export interface PhysicalAddress {
768
+ /**
769
+ * City or locality.
770
+ */
771
+ city: string;
772
+
773
+ /**
774
+ * ISO 3166-1 alpha-2 country code.
775
+ */
776
+ country_code:
777
+ | 'AF'
778
+ | 'AL'
779
+ | 'DZ'
780
+ | 'AS'
781
+ | 'AD'
782
+ | 'AO'
783
+ | 'AI'
784
+ | 'AQ'
785
+ | 'AG'
786
+ | 'AR'
787
+ | 'AM'
788
+ | 'AW'
789
+ | 'AU'
790
+ | 'AT'
791
+ | 'AZ'
792
+ | 'BS'
793
+ | 'BH'
794
+ | 'BD'
795
+ | 'BB'
796
+ | 'BY'
797
+ | 'BE'
798
+ | 'BZ'
799
+ | 'BJ'
800
+ | 'BM'
801
+ | 'BT'
802
+ | 'BO'
803
+ | 'BA'
804
+ | 'BW'
805
+ | 'BV'
806
+ | 'BR'
807
+ | 'IO'
808
+ | 'BN'
809
+ | 'BG'
810
+ | 'BF'
811
+ | 'BI'
812
+ | 'KH'
813
+ | 'CM'
814
+ | 'CA'
815
+ | 'CV'
816
+ | 'KY'
817
+ | 'CF'
818
+ | 'TD'
819
+ | 'CL'
820
+ | 'CN'
821
+ | 'CX'
822
+ | 'CC'
823
+ | 'CO'
824
+ | 'KM'
825
+ | 'CG'
826
+ | 'CD'
827
+ | 'CK'
828
+ | 'CR'
829
+ | 'CI'
830
+ | 'HR'
831
+ | 'CU'
832
+ | 'CY'
833
+ | 'CZ'
834
+ | 'DK'
835
+ | 'DJ'
836
+ | 'DM'
837
+ | 'DO'
838
+ | 'EC'
839
+ | 'EG'
840
+ | 'SV'
841
+ | 'GQ'
842
+ | 'ER'
843
+ | 'EE'
844
+ | 'ET'
845
+ | 'FK'
846
+ | 'FO'
847
+ | 'FJ'
848
+ | 'FI'
849
+ | 'FR'
850
+ | 'GF'
851
+ | 'PF'
852
+ | 'TF'
853
+ | 'GA'
854
+ | 'GM'
855
+ | 'GE'
856
+ | 'DE'
857
+ | 'GH'
858
+ | 'GI'
859
+ | 'GR'
860
+ | 'GL'
861
+ | 'GD'
862
+ | 'GP'
863
+ | 'GU'
864
+ | 'GT'
865
+ | 'GN'
866
+ | 'GW'
867
+ | 'GY'
868
+ | 'HT'
869
+ | 'HM'
870
+ | 'VA'
871
+ | 'HN'
872
+ | 'HK'
873
+ | 'HU'
874
+ | 'IS'
875
+ | 'IN'
876
+ | 'ID'
877
+ | 'IR'
878
+ | 'IQ'
879
+ | 'IE'
880
+ | 'IL'
881
+ | 'IT'
882
+ | 'JM'
883
+ | 'JP'
884
+ | 'JO'
885
+ | 'KZ'
886
+ | 'KE'
887
+ | 'KI'
888
+ | 'KP'
889
+ | 'KR'
890
+ | 'KW'
891
+ | 'KG'
892
+ | 'LA'
893
+ | 'LV'
894
+ | 'LB'
895
+ | 'LS'
896
+ | 'LR'
897
+ | 'LY'
898
+ | 'LI'
899
+ | 'LT'
900
+ | 'LU'
901
+ | 'MO'
902
+ | 'MG'
903
+ | 'MW'
904
+ | 'MY'
905
+ | 'MV'
906
+ | 'ML'
907
+ | 'MT'
908
+ | 'MH'
909
+ | 'MQ'
910
+ | 'MR'
911
+ | 'MU'
912
+ | 'YT'
913
+ | 'MX'
914
+ | 'FM'
915
+ | 'MD'
916
+ | 'MC'
917
+ | 'MN'
918
+ | 'MS'
919
+ | 'MA'
920
+ | 'MZ'
921
+ | 'MM'
922
+ | 'NA'
923
+ | 'NR'
924
+ | 'NP'
925
+ | 'NL'
926
+ | 'NC'
927
+ | 'NZ'
928
+ | 'NI'
929
+ | 'NE'
930
+ | 'NG'
931
+ | 'NU'
932
+ | 'NF'
933
+ | 'MP'
934
+ | 'MK'
935
+ | 'NO'
936
+ | 'OM'
937
+ | 'PK'
938
+ | 'PW'
939
+ | 'PS'
940
+ | 'PA'
941
+ | 'PG'
942
+ | 'PY'
943
+ | 'PE'
944
+ | 'PH'
945
+ | 'PN'
946
+ | 'PL'
947
+ | 'PT'
948
+ | 'PR'
949
+ | 'QA'
950
+ | 'RE'
951
+ | 'RO'
952
+ | 'RU'
953
+ | 'RW'
954
+ | 'SH'
955
+ | 'KN'
956
+ | 'LC'
957
+ | 'PM'
958
+ | 'VC'
959
+ | 'WS'
960
+ | 'SM'
961
+ | 'ST'
962
+ | 'SA'
963
+ | 'SN'
964
+ | 'SC'
965
+ | 'SL'
966
+ | 'SG'
967
+ | 'SK'
968
+ | 'SI'
969
+ | 'SB'
970
+ | 'SO'
971
+ | 'ZA'
972
+ | 'GS'
973
+ | 'ES'
974
+ | 'LK'
975
+ | 'SD'
976
+ | 'SR'
977
+ | 'SJ'
978
+ | 'SZ'
979
+ | 'SE'
980
+ | 'CH'
981
+ | 'SY'
982
+ | 'TW'
983
+ | 'TJ'
984
+ | 'TZ'
985
+ | 'TH'
986
+ | 'TL'
987
+ | 'TG'
988
+ | 'TK'
989
+ | 'TO'
990
+ | 'TT'
991
+ | 'TN'
992
+ | 'TR'
993
+ | 'TM'
994
+ | 'TC'
995
+ | 'TV'
996
+ | 'UG'
997
+ | 'UA'
998
+ | 'AE'
999
+ | 'GB'
1000
+ | 'US'
1001
+ | 'UM'
1002
+ | 'UY'
1003
+ | 'UZ'
1004
+ | 'VU'
1005
+ | 'VE'
1006
+ | 'VN'
1007
+ | 'VG'
1008
+ | 'VI'
1009
+ | 'WF'
1010
+ | 'EH'
1011
+ | 'YE'
1012
+ | 'ZM'
1013
+ | 'ZW'
1014
+ | 'AX'
1015
+ | 'BQ'
1016
+ | 'CW'
1017
+ | 'GG'
1018
+ | 'IM'
1019
+ | 'JE'
1020
+ | 'ME'
1021
+ | 'BL'
1022
+ | 'MF'
1023
+ | 'RS'
1024
+ | 'SX'
1025
+ | 'SS'
1026
+ | 'XK';
1027
+
1028
+ /**
1029
+ * Primary street address.
1030
+ */
1031
+ line_1: string;
1032
+
1033
+ /**
1034
+ * Secondary street address, or null if not recorded.
1035
+ */
1036
+ line_2: string | null;
1037
+
1038
+ /**
1039
+ * Postal or ZIP code.
1040
+ */
1041
+ postal_code: string;
1042
+
1043
+ /**
1044
+ * State, province, or region, or null if not recorded.
1045
+ */
1046
+ state: string | null;
1047
+ }
370
1048
  }
371
1049
  }
372
1050
 
@@ -376,19 +1054,19 @@ export interface TransactionListParams extends CursorPageParams {
376
1054
  */
377
1055
  account_id: string;
378
1056
 
379
- created_at?: TransactionListParams.CreatedAt;
1057
+ booked_at?: TransactionListParams.BookedAt;
380
1058
  }
381
1059
 
382
1060
  export namespace TransactionListParams {
383
- export interface CreatedAt {
1061
+ export interface BookedAt {
384
1062
  /**
385
- * Include transactions whose created_at is greater than or equal to this ISO 8601
1063
+ * Include transactions whose booked_at is greater than or equal to this ISO 8601
386
1064
  * timestamp.
387
1065
  */
388
1066
  gte?: string;
389
1067
 
390
1068
  /**
391
- * Include transactions whose created_at is less than or equal to this ISO 8601
1069
+ * Include transactions whose booked_at is less than or equal to this ISO 8601
392
1070
  * timestamp.
393
1071
  */
394
1072
  lte?: string;