@augustusbank/typescript-sdk 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-holders.d.mts +1555 -1184
  12. package/resources/account-holders.d.mts.map +1 -1
  13. package/resources/account-holders.d.ts +1555 -1184
  14. package/resources/account-holders.d.ts.map +1 -1
  15. package/resources/account-holders.js +59 -0
  16. package/resources/account-holders.js.map +1 -1
  17. package/resources/account-holders.mjs +59 -0
  18. package/resources/account-holders.mjs.map +1 -1
  19. package/resources/account-programs.d.mts +22 -17
  20. package/resources/account-programs.d.mts.map +1 -1
  21. package/resources/account-programs.d.ts +22 -17
  22. package/resources/account-programs.d.ts.map +1 -1
  23. package/resources/account-programs.js +2 -2
  24. package/resources/account-programs.js.map +1 -1
  25. package/resources/account-programs.mjs +2 -2
  26. package/resources/account-programs.mjs.map +1 -1
  27. package/resources/accounts.d.mts +226 -48
  28. package/resources/accounts.d.mts.map +1 -1
  29. package/resources/accounts.d.ts +226 -48
  30. package/resources/accounts.d.ts.map +1 -1
  31. package/resources/accounts.js +55 -2
  32. package/resources/accounts.js.map +1 -1
  33. package/resources/accounts.mjs +55 -2
  34. package/resources/accounts.mjs.map +1 -1
  35. package/resources/api-keys.d.mts +1 -1
  36. package/resources/api-keys.d.mts.map +1 -1
  37. package/resources/api-keys.d.ts +1 -1
  38. package/resources/api-keys.d.ts.map +1 -1
  39. package/resources/api-versions.d.mts +3 -0
  40. package/resources/api-versions.d.mts.map +1 -1
  41. package/resources/api-versions.d.ts +3 -0
  42. package/resources/api-versions.d.ts.map +1 -1
  43. package/resources/conversions.d.mts +36 -81
  44. package/resources/conversions.d.mts.map +1 -1
  45. package/resources/conversions.d.ts +36 -81
  46. package/resources/conversions.d.ts.map +1 -1
  47. package/resources/conversions.js +25 -1
  48. package/resources/conversions.js.map +1 -1
  49. package/resources/conversions.mjs +25 -1
  50. package/resources/conversions.mjs.map +1 -1
  51. package/resources/counterparties.d.mts +1042 -0
  52. package/resources/counterparties.d.mts.map +1 -0
  53. package/resources/counterparties.d.ts +1042 -0
  54. package/resources/counterparties.d.ts.map +1 -0
  55. package/resources/counterparties.js +45 -0
  56. package/resources/counterparties.js.map +1 -0
  57. package/resources/counterparties.mjs +41 -0
  58. package/resources/counterparties.mjs.map +1 -0
  59. package/resources/deposits.d.mts +48 -186
  60. package/resources/deposits.d.mts.map +1 -1
  61. package/resources/deposits.d.ts +48 -186
  62. package/resources/deposits.d.ts.map +1 -1
  63. package/resources/events.d.mts +3 -3
  64. package/resources/events.d.mts.map +1 -1
  65. package/resources/events.d.ts +3 -3
  66. package/resources/events.d.ts.map +1 -1
  67. package/resources/index.d.mts +5 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +5 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +5 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +2 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/payouts.d.mts +133 -335
  76. package/resources/payouts.d.mts.map +1 -1
  77. package/resources/payouts.d.ts +133 -335
  78. package/resources/payouts.d.ts.map +1 -1
  79. package/resources/payouts.js +25 -0
  80. package/resources/payouts.js.map +1 -1
  81. package/resources/payouts.mjs +25 -0
  82. package/resources/payouts.mjs.map +1 -1
  83. package/resources/quotes/indicative.d.mts +7 -11
  84. package/resources/quotes/indicative.d.mts.map +1 -1
  85. package/resources/quotes/indicative.d.ts +7 -11
  86. package/resources/quotes/indicative.d.ts.map +1 -1
  87. package/resources/quotes/quotes.d.mts +4 -8
  88. package/resources/quotes/quotes.d.mts.map +1 -1
  89. package/resources/quotes/quotes.d.ts +4 -8
  90. package/resources/quotes/quotes.d.ts.map +1 -1
  91. package/resources/quotes/quotes.js.map +1 -1
  92. package/resources/quotes/quotes.mjs.map +1 -1
  93. package/resources/returns.d.mts +84 -39
  94. package/resources/returns.d.mts.map +1 -1
  95. package/resources/returns.d.ts +84 -39
  96. package/resources/returns.d.ts.map +1 -1
  97. package/resources/returns.js +22 -0
  98. package/resources/returns.js.map +1 -1
  99. package/resources/returns.mjs +22 -0
  100. package/resources/returns.mjs.map +1 -1
  101. package/resources/scopes.d.mts +4 -1
  102. package/resources/scopes.d.mts.map +1 -1
  103. package/resources/scopes.d.ts +4 -1
  104. package/resources/scopes.d.ts.map +1 -1
  105. package/resources/simulations/account-programs.d.mts +215 -0
  106. package/resources/simulations/account-programs.d.mts.map +1 -0
  107. package/resources/simulations/account-programs.d.ts +215 -0
  108. package/resources/simulations/account-programs.d.ts.map +1 -0
  109. package/resources/simulations/account-programs.js +96 -0
  110. package/resources/simulations/account-programs.js.map +1 -0
  111. package/resources/simulations/account-programs.mjs +92 -0
  112. package/resources/simulations/account-programs.mjs.map +1 -0
  113. package/resources/simulations/accounts.d.mts +209 -0
  114. package/resources/simulations/accounts.d.mts.map +1 -0
  115. package/resources/simulations/accounts.d.ts +209 -0
  116. package/resources/simulations/accounts.d.ts.map +1 -0
  117. package/resources/simulations/accounts.js +90 -0
  118. package/resources/simulations/accounts.js.map +1 -0
  119. package/resources/simulations/accounts.mjs +86 -0
  120. package/resources/simulations/accounts.mjs.map +1 -0
  121. package/resources/simulations/conversions.d.mts +54 -0
  122. package/resources/simulations/conversions.d.mts.map +1 -0
  123. package/resources/simulations/conversions.d.ts +54 -0
  124. package/resources/simulations/conversions.d.ts.map +1 -0
  125. package/resources/simulations/conversions.js +39 -0
  126. package/resources/simulations/conversions.js.map +1 -0
  127. package/resources/simulations/conversions.mjs +35 -0
  128. package/resources/simulations/conversions.mjs.map +1 -0
  129. package/resources/simulations/deposits.d.mts +202 -0
  130. package/resources/simulations/deposits.d.mts.map +1 -0
  131. package/resources/simulations/deposits.d.ts +202 -0
  132. package/resources/simulations/deposits.d.ts.map +1 -0
  133. package/resources/simulations/deposits.js +25 -0
  134. package/resources/simulations/deposits.js.map +1 -0
  135. package/resources/simulations/deposits.mjs +21 -0
  136. package/resources/simulations/deposits.mjs.map +1 -0
  137. package/resources/simulations/index.d.mts +7 -0
  138. package/resources/simulations/index.d.mts.map +1 -0
  139. package/resources/simulations/index.d.ts +7 -0
  140. package/resources/simulations/index.d.ts.map +1 -0
  141. package/resources/simulations/index.js +17 -0
  142. package/resources/simulations/index.js.map +1 -0
  143. package/resources/simulations/index.mjs +8 -0
  144. package/resources/simulations/index.mjs.map +1 -0
  145. package/resources/simulations/payouts.d.mts +62 -0
  146. package/resources/simulations/payouts.d.mts.map +1 -0
  147. package/resources/simulations/payouts.d.ts +62 -0
  148. package/resources/simulations/payouts.d.ts.map +1 -0
  149. package/resources/simulations/payouts.js +39 -0
  150. package/resources/simulations/payouts.js.map +1 -0
  151. package/resources/simulations/payouts.mjs +35 -0
  152. package/resources/simulations/payouts.mjs.map +1 -0
  153. package/resources/simulations/simulations.d.mts +26 -0
  154. package/resources/simulations/simulations.d.mts.map +1 -0
  155. package/resources/simulations/simulations.d.ts +26 -0
  156. package/resources/simulations/simulations.d.ts.map +1 -0
  157. package/resources/simulations/simulations.js +33 -0
  158. package/resources/simulations/simulations.js.map +1 -0
  159. package/resources/simulations/simulations.mjs +28 -0
  160. package/resources/simulations/simulations.mjs.map +1 -0
  161. package/resources/simulations.d.mts +2 -0
  162. package/resources/simulations.d.mts.map +1 -0
  163. package/resources/simulations.d.ts +2 -0
  164. package/resources/simulations.d.ts.map +1 -0
  165. package/resources/simulations.js +6 -0
  166. package/resources/simulations.js.map +1 -0
  167. package/resources/simulations.mjs +3 -0
  168. package/resources/simulations.mjs.map +1 -0
  169. package/resources/transactions.d.mts +342 -162
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +342 -162
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/webhook-subscriptions.d.mts +61 -11
  174. package/resources/webhook-subscriptions.d.mts.map +1 -1
  175. package/resources/webhook-subscriptions.d.ts +61 -11
  176. package/resources/webhook-subscriptions.d.ts.map +1 -1
  177. package/resources/webhook-subscriptions.js +49 -0
  178. package/resources/webhook-subscriptions.js.map +1 -1
  179. package/resources/webhook-subscriptions.mjs +49 -0
  180. package/resources/webhook-subscriptions.mjs.map +1 -1
  181. package/resources/webhooks.d.mts +976 -978
  182. package/resources/webhooks.d.mts.map +1 -1
  183. package/resources/webhooks.d.ts +976 -978
  184. package/resources/webhooks.d.ts.map +1 -1
  185. package/src/client.ts +48 -8
  186. package/src/resources/account-holders.ts +1701 -1282
  187. package/src/resources/account-programs.ts +30 -19
  188. package/src/resources/accounts.ts +265 -50
  189. package/src/resources/api-keys.ts +3 -0
  190. package/src/resources/api-versions.ts +3 -0
  191. package/src/resources/conversions.ts +36 -93
  192. package/src/resources/counterparties.ts +3127 -0
  193. package/src/resources/deposits.ts +66 -269
  194. package/src/resources/events.ts +18 -12
  195. package/src/resources/index.ts +21 -4
  196. package/src/resources/payouts.ts +204 -439
  197. package/src/resources/quotes/indicative.ts +7 -12
  198. package/src/resources/quotes/quotes.ts +4 -9
  199. package/src/resources/returns.ts +144 -40
  200. package/src/resources/scopes.ts +7 -1
  201. package/src/resources/simulations/account-programs.ts +282 -0
  202. package/src/resources/simulations/accounts.ts +265 -0
  203. package/src/resources/simulations/conversions.ts +70 -0
  204. package/src/resources/simulations/deposits.ts +522 -0
  205. package/src/resources/simulations/index.ts +33 -0
  206. package/src/resources/simulations/payouts.ts +80 -0
  207. package/src/resources/simulations/simulations.ts +92 -0
  208. package/src/resources/simulations.ts +3 -0
  209. package/src/resources/transactions.ts +954 -206
  210. package/src/resources/webhook-subscriptions.ts +102 -36
  211. package/src/resources/webhooks.ts +1283 -1153
  212. package/src/version.ts +1 -1
  213. package/version.d.mts +1 -1
  214. package/version.d.ts +1 -1
  215. package/version.js +1 -1
  216. package/version.mjs +1 -1
@@ -5,14 +5,39 @@ import { RequestOptions } from "../internal/request-options.mjs";
5
5
  export declare class Payouts extends APIResource {
6
6
  /**
7
7
  * Creates a new payout.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const payout = await client.payouts.create({
12
+ * account_id: '550e8400-e29b-41d4-a716-44665544000b',
13
+ * amount: '100.50',
14
+ * counterparty_id: '550e8400-e29b-41d4-a716-446655440000',
15
+ * currency: 'EUR',
16
+ * });
17
+ * ```
8
18
  */
9
19
  create(body: PayoutCreateParams, options?: RequestOptions): APIPromise<PayoutCreateResponse>;
10
20
  /**
11
21
  * Retrieves a payout by ID.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const payout = await client.payouts.retrieve(
26
+ * '550e8400-e29b-41d4-a716-446655440003',
27
+ * );
28
+ * ```
12
29
  */
13
30
  retrieve(id: string, options?: RequestOptions): APIPromise<PayoutRetrieveResponse>;
14
31
  /**
15
32
  * Lists payouts for the merchant with cursor-based pagination.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Automatically fetches more pages as needed.
37
+ * for await (const payoutListResponse of client.payouts.list()) {
38
+ * // ...
39
+ * }
40
+ * ```
16
41
  */
17
42
  list(query?: PayoutListParams | null | undefined, options?: RequestOptions): PagePromise<PayoutListResponsesCursorPage, PayoutListResponse>;
18
43
  }
@@ -22,26 +47,30 @@ export interface PayoutCreateResponse {
22
47
  * Unique identifier of the payout.
23
48
  */
24
49
  id: string;
50
+ /**
51
+ * ID of the account that was debited.
52
+ */
53
+ account_id: string;
25
54
  /**
26
55
  * Amount as a string decimal (e.g. "100.50").
27
56
  */
28
57
  amount: string;
29
58
  /**
30
- * ISO 8601 UTC timestamp when the payout was created.
59
+ * ID of the counterparty that receives the money.
31
60
  */
32
- created_at: string;
61
+ counterparty_id: string;
33
62
  /**
34
- * Currency code (ISO 4217 currency code or crypto currency code).
63
+ * Currency code (ISO 4217 or crypto).
35
64
  */
36
65
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
37
- /**
38
- * Bank account or crypto wallet the payout was sent to.
39
- */
40
- destination: PayoutCreateResponse.IbanFinancialAddress | PayoutCreateResponse.SortCodeFinancialAddress | PayoutCreateResponse.AbaFinancialAddress | PayoutCreateResponse.CryptoWalletFinancialAddress;
41
66
  /**
42
67
  * Failure details when status is failed, otherwise null.
43
68
  */
44
69
  failure: PayoutCreateResponse.Failure | null;
70
+ /**
71
+ * ISO 8601 UTC timestamp when the payout was initiated.
72
+ */
73
+ initiated_at: string;
45
74
  /**
46
75
  * Key-value pairs stored with the payout.
47
76
  */
@@ -49,95 +78,38 @@ export interface PayoutCreateResponse {
49
78
  [key: string]: string;
50
79
  };
51
80
  /**
52
- * Payment reference.
81
+ * Payment scheme or blockchain used for the payout, or null when unknown.
53
82
  */
54
- reference: string;
83
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
55
84
  /**
56
- * ID of the account that was debited.
85
+ * ISO 8601 UTC timestamp when the payout was sent.
57
86
  */
58
- source_account_id: string;
87
+ sent_at: string | null;
59
88
  /**
60
89
  * Current status of the payout.
61
90
  */
62
- status: 'pending' | 'paid' | 'failed' | 'returned';
91
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
92
+ /**
93
+ * Reference used to track the payment across the payment network, such as the UETR
94
+ * for SWIFT payments.
95
+ */
96
+ tracking_reference: string | null;
97
+ /**
98
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
99
+ * rails support this field.
100
+ */
101
+ tx_hash: string | null;
63
102
  /**
64
103
  * Resource type discriminator.
65
104
  */
66
105
  type: 'payout';
67
106
  /**
68
- * ISO 8601 UTC timestamp when the payout was last updated.
107
+ * Unstructured remittance information attached to the transfer. Not all rails
108
+ * support this field.
69
109
  */
70
- updated_at: string;
110
+ unstructured_remittance_information: string | null;
71
111
  }
72
112
  export declare namespace PayoutCreateResponse {
73
- interface IbanFinancialAddress {
74
- /**
75
- * Name of the account holder.
76
- */
77
- account_holder_name: string;
78
- /**
79
- * Bank Identifier Code, or null if not provided.
80
- */
81
- bic: string | null;
82
- /**
83
- * International Bank Account Number.
84
- */
85
- iban: string;
86
- /**
87
- * Discriminator for IBAN financial address.
88
- */
89
- type: 'iban';
90
- }
91
- interface SortCodeFinancialAddress {
92
- /**
93
- * Name of the account holder.
94
- */
95
- account_holder_name: string;
96
- /**
97
- * UK account number (8 digits).
98
- */
99
- account_number: string;
100
- /**
101
- * UK sort code (6 digits).
102
- */
103
- sort_code: string;
104
- /**
105
- * Discriminator for UK sort code financial address.
106
- */
107
- type: 'sort_code';
108
- }
109
- interface AbaFinancialAddress {
110
- /**
111
- * Name of the account holder.
112
- */
113
- account_holder_name: string;
114
- /**
115
- * Bank account number.
116
- */
117
- account_number: string;
118
- /**
119
- * ABA routing number (9 digits).
120
- */
121
- routing_number: string;
122
- /**
123
- * Discriminator for ABA wire financial address.
124
- */
125
- type: 'aba';
126
- }
127
- interface CryptoWalletFinancialAddress {
128
- /**
129
- * Wallet address on the specified blockchain.
130
- */
131
- address: string;
132
- /**
133
- * Blockchain network for the crypto wallet.
134
- */
135
- blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
136
- /**
137
- * Discriminator for crypto wallet financial address.
138
- */
139
- type: 'crypto_wallet';
140
- }
141
113
  /**
142
114
  * Failure details when status is failed, otherwise null.
143
115
  */
@@ -145,7 +117,7 @@ export declare namespace PayoutCreateResponse {
145
117
  /**
146
118
  * Failure code.
147
119
  */
148
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
120
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
149
121
  /**
150
122
  * Human-readable description of the failure.
151
123
  */
@@ -161,26 +133,30 @@ export interface PayoutRetrieveResponse {
161
133
  * Unique identifier of the payout.
162
134
  */
163
135
  id: string;
136
+ /**
137
+ * ID of the account that was debited.
138
+ */
139
+ account_id: string;
164
140
  /**
165
141
  * Amount as a string decimal (e.g. "100.50").
166
142
  */
167
143
  amount: string;
168
144
  /**
169
- * ISO 8601 UTC timestamp when the payout was created.
145
+ * ID of the counterparty that receives the money.
170
146
  */
171
- created_at: string;
147
+ counterparty_id: string;
172
148
  /**
173
- * Currency code (ISO 4217 currency code or crypto currency code).
149
+ * Currency code (ISO 4217 or crypto).
174
150
  */
175
151
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
176
- /**
177
- * Bank account or crypto wallet the payout was sent to.
178
- */
179
- destination: PayoutRetrieveResponse.IbanFinancialAddress | PayoutRetrieveResponse.SortCodeFinancialAddress | PayoutRetrieveResponse.AbaFinancialAddress | PayoutRetrieveResponse.CryptoWalletFinancialAddress;
180
152
  /**
181
153
  * Failure details when status is failed, otherwise null.
182
154
  */
183
155
  failure: PayoutRetrieveResponse.Failure | null;
156
+ /**
157
+ * ISO 8601 UTC timestamp when the payout was initiated.
158
+ */
159
+ initiated_at: string;
184
160
  /**
185
161
  * Key-value pairs stored with the payout.
186
162
  */
@@ -188,95 +164,38 @@ export interface PayoutRetrieveResponse {
188
164
  [key: string]: string;
189
165
  };
190
166
  /**
191
- * Payment reference.
167
+ * Payment scheme or blockchain used for the payout, or null when unknown.
192
168
  */
193
- reference: string;
169
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
194
170
  /**
195
- * ID of the account that was debited.
171
+ * ISO 8601 UTC timestamp when the payout was sent.
196
172
  */
197
- source_account_id: string;
173
+ sent_at: string | null;
198
174
  /**
199
175
  * Current status of the payout.
200
176
  */
201
- status: 'pending' | 'paid' | 'failed' | 'returned';
177
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
178
+ /**
179
+ * Reference used to track the payment across the payment network, such as the UETR
180
+ * for SWIFT payments.
181
+ */
182
+ tracking_reference: string | null;
183
+ /**
184
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
185
+ * rails support this field.
186
+ */
187
+ tx_hash: string | null;
202
188
  /**
203
189
  * Resource type discriminator.
204
190
  */
205
191
  type: 'payout';
206
192
  /**
207
- * ISO 8601 UTC timestamp when the payout was last updated.
193
+ * Unstructured remittance information attached to the transfer. Not all rails
194
+ * support this field.
208
195
  */
209
- updated_at: string;
196
+ unstructured_remittance_information: string | null;
210
197
  }
211
198
  export declare namespace PayoutRetrieveResponse {
212
- interface IbanFinancialAddress {
213
- /**
214
- * Name of the account holder.
215
- */
216
- account_holder_name: string;
217
- /**
218
- * Bank Identifier Code, or null if not provided.
219
- */
220
- bic: string | null;
221
- /**
222
- * International Bank Account Number.
223
- */
224
- iban: string;
225
- /**
226
- * Discriminator for IBAN financial address.
227
- */
228
- type: 'iban';
229
- }
230
- interface SortCodeFinancialAddress {
231
- /**
232
- * Name of the account holder.
233
- */
234
- account_holder_name: string;
235
- /**
236
- * UK account number (8 digits).
237
- */
238
- account_number: string;
239
- /**
240
- * UK sort code (6 digits).
241
- */
242
- sort_code: string;
243
- /**
244
- * Discriminator for UK sort code financial address.
245
- */
246
- type: 'sort_code';
247
- }
248
- interface AbaFinancialAddress {
249
- /**
250
- * Name of the account holder.
251
- */
252
- account_holder_name: string;
253
- /**
254
- * Bank account number.
255
- */
256
- account_number: string;
257
- /**
258
- * ABA routing number (9 digits).
259
- */
260
- routing_number: string;
261
- /**
262
- * Discriminator for ABA wire financial address.
263
- */
264
- type: 'aba';
265
- }
266
- interface CryptoWalletFinancialAddress {
267
- /**
268
- * Wallet address on the specified blockchain.
269
- */
270
- address: string;
271
- /**
272
- * Blockchain network for the crypto wallet.
273
- */
274
- blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
275
- /**
276
- * Discriminator for crypto wallet financial address.
277
- */
278
- type: 'crypto_wallet';
279
- }
280
199
  /**
281
200
  * Failure details when status is failed, otherwise null.
282
201
  */
@@ -284,7 +203,7 @@ export declare namespace PayoutRetrieveResponse {
284
203
  /**
285
204
  * Failure code.
286
205
  */
287
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
206
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
288
207
  /**
289
208
  * Human-readable description of the failure.
290
209
  */
@@ -300,26 +219,30 @@ export interface PayoutListResponse {
300
219
  * Unique identifier of the payout.
301
220
  */
302
221
  id: string;
222
+ /**
223
+ * ID of the account that was debited.
224
+ */
225
+ account_id: string;
303
226
  /**
304
227
  * Amount as a string decimal (e.g. "100.50").
305
228
  */
306
229
  amount: string;
307
230
  /**
308
- * ISO 8601 UTC timestamp when the payout was created.
231
+ * ID of the counterparty that receives the money.
309
232
  */
310
- created_at: string;
233
+ counterparty_id: string;
311
234
  /**
312
- * Currency code (ISO 4217 currency code or crypto currency code).
235
+ * Currency code (ISO 4217 or crypto).
313
236
  */
314
237
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
315
- /**
316
- * Bank account or crypto wallet the payout was sent to.
317
- */
318
- destination: PayoutListResponse.IbanFinancialAddress | PayoutListResponse.SortCodeFinancialAddress | PayoutListResponse.AbaFinancialAddress | PayoutListResponse.CryptoWalletFinancialAddress;
319
238
  /**
320
239
  * Failure details when status is failed, otherwise null.
321
240
  */
322
241
  failure: PayoutListResponse.Failure | null;
242
+ /**
243
+ * ISO 8601 UTC timestamp when the payout was initiated.
244
+ */
245
+ initiated_at: string;
323
246
  /**
324
247
  * Key-value pairs stored with the payout.
325
248
  */
@@ -327,95 +250,38 @@ export interface PayoutListResponse {
327
250
  [key: string]: string;
328
251
  };
329
252
  /**
330
- * Payment reference.
253
+ * Payment scheme or blockchain used for the payout, or null when unknown.
331
254
  */
332
- reference: string;
255
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
333
256
  /**
334
- * ID of the account that was debited.
257
+ * ISO 8601 UTC timestamp when the payout was sent.
335
258
  */
336
- source_account_id: string;
259
+ sent_at: string | null;
337
260
  /**
338
261
  * Current status of the payout.
339
262
  */
340
- status: 'pending' | 'paid' | 'failed' | 'returned';
263
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
264
+ /**
265
+ * Reference used to track the payment across the payment network, such as the UETR
266
+ * for SWIFT payments.
267
+ */
268
+ tracking_reference: string | null;
269
+ /**
270
+ * Transaction hash for crypto payouts, or null when not known. Only blockchain
271
+ * rails support this field.
272
+ */
273
+ tx_hash: string | null;
341
274
  /**
342
275
  * Resource type discriminator.
343
276
  */
344
277
  type: 'payout';
345
278
  /**
346
- * ISO 8601 UTC timestamp when the payout was last updated.
279
+ * Unstructured remittance information attached to the transfer. Not all rails
280
+ * support this field.
347
281
  */
348
- updated_at: string;
282
+ unstructured_remittance_information: string | null;
349
283
  }
350
284
  export declare namespace PayoutListResponse {
351
- interface IbanFinancialAddress {
352
- /**
353
- * Name of the account holder.
354
- */
355
- account_holder_name: string;
356
- /**
357
- * Bank Identifier Code, or null if not provided.
358
- */
359
- bic: string | null;
360
- /**
361
- * International Bank Account Number.
362
- */
363
- iban: string;
364
- /**
365
- * Discriminator for IBAN financial address.
366
- */
367
- type: 'iban';
368
- }
369
- interface SortCodeFinancialAddress {
370
- /**
371
- * Name of the account holder.
372
- */
373
- account_holder_name: string;
374
- /**
375
- * UK account number (8 digits).
376
- */
377
- account_number: string;
378
- /**
379
- * UK sort code (6 digits).
380
- */
381
- sort_code: string;
382
- /**
383
- * Discriminator for UK sort code financial address.
384
- */
385
- type: 'sort_code';
386
- }
387
- interface AbaFinancialAddress {
388
- /**
389
- * Name of the account holder.
390
- */
391
- account_holder_name: string;
392
- /**
393
- * Bank account number.
394
- */
395
- account_number: string;
396
- /**
397
- * ABA routing number (9 digits).
398
- */
399
- routing_number: string;
400
- /**
401
- * Discriminator for ABA wire financial address.
402
- */
403
- type: 'aba';
404
- }
405
- interface CryptoWalletFinancialAddress {
406
- /**
407
- * Wallet address on the specified blockchain.
408
- */
409
- address: string;
410
- /**
411
- * Blockchain network for the crypto wallet.
412
- */
413
- blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
414
- /**
415
- * Discriminator for crypto wallet financial address.
416
- */
417
- type: 'crypto_wallet';
418
- }
419
285
  /**
420
286
  * Failure details when status is failed, otherwise null.
421
287
  */
@@ -423,7 +289,7 @@ export declare namespace PayoutListResponse {
423
289
  /**
424
290
  * Failure code.
425
291
  */
426
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
292
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
427
293
  /**
428
294
  * Human-readable description of the failure.
429
295
  */
@@ -436,105 +302,37 @@ export declare namespace PayoutListResponse {
436
302
  }
437
303
  export interface PayoutCreateParams {
438
304
  /**
439
- * Amount as a string decimal (e.g. "100.50").
440
- */
441
- amount: string;
442
- /**
443
- * Currency for the payout.
305
+ * ID of the account to debit.
444
306
  */
445
- currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
307
+ account_id: string;
446
308
  /**
447
- * Bank account or crypto wallet to send funds to.
309
+ * Amount as a string decimal (e.g. "100.50").
448
310
  */
449
- destination: PayoutCreateParams.Iban | PayoutCreateParams.SortCodeFinancialAddress | PayoutCreateParams.AbaFinancialAddress | PayoutCreateParams.CryptoWalletFinancialAddress;
311
+ amount: string;
450
312
  /**
451
- * Payment reference.
313
+ * ID of the saved counterparty that receives the money.
452
314
  */
453
- reference: string;
315
+ counterparty_id: string;
454
316
  /**
455
- * ID of the account to debit.
317
+ * Currency code (ISO 4217 or crypto).
456
318
  */
457
- source_account_id: string;
319
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
458
320
  /**
459
321
  * Key-value pairs stored with the payout.
460
322
  */
461
323
  metadata?: {
462
324
  [key: string]: string;
463
- };
325
+ } | null;
464
326
  /**
465
- * Payment rail. It is enforced when provided, otherwise auto-selected.
327
+ * Settlement rail the counterparty is reachable on. Selected automatically when
328
+ * omitted. Validated against the counterparty financial address at runtime.
466
329
  */
467
- rail?: 'sepa_instant' | 'sepa' | 'faster_payments';
468
- }
469
- export declare namespace PayoutCreateParams {
470
- interface Iban {
471
- /**
472
- * Name of the account holder.
473
- */
474
- account_holder_name: string;
475
- /**
476
- * International Bank Account Number.
477
- */
478
- iban: string;
479
- /**
480
- * Discriminator for IBAN financial address.
481
- */
482
- type: 'iban';
483
- /**
484
- * Bank Identifier Code.
485
- */
486
- bic?: string;
487
- }
488
- interface SortCodeFinancialAddress {
489
- /**
490
- * Name of the account holder.
491
- */
492
- account_holder_name: string;
493
- /**
494
- * UK account number (8 digits).
495
- */
496
- account_number: string;
497
- /**
498
- * UK sort code (6 digits).
499
- */
500
- sort_code: string;
501
- /**
502
- * Discriminator for UK sort code financial address.
503
- */
504
- type: 'sort_code';
505
- }
506
- interface AbaFinancialAddress {
507
- /**
508
- * Name of the account holder.
509
- */
510
- account_holder_name: string;
511
- /**
512
- * Bank account number.
513
- */
514
- account_number: string;
515
- /**
516
- * ABA routing number (9 digits).
517
- */
518
- routing_number: string;
519
- /**
520
- * Discriminator for ABA wire financial address.
521
- */
522
- type: 'aba';
523
- }
524
- interface CryptoWalletFinancialAddress {
525
- /**
526
- * Wallet address on the specified blockchain.
527
- */
528
- address: string;
529
- /**
530
- * Blockchain network for the crypto wallet.
531
- */
532
- blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
533
- /**
534
- * Discriminator for crypto wallet financial address.
535
- */
536
- type: 'crypto_wallet';
537
- }
330
+ rail?: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'ach' | 'fedwire' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy';
331
+ /**
332
+ * Unstructured remittance information attached to the transfer. This appears on
333
+ * the counterparty's bank statement. Not supported by blockchain rails.
334
+ */
335
+ unstructured_remittance_information?: string | null;
538
336
  }
539
337
  export interface PayoutListParams extends CursorPageParams {
540
338
  created_at?: PayoutListParams.CreatedAt;
@@ -546,7 +344,7 @@ export interface PayoutListParams extends CursorPageParams {
546
344
  /**
547
345
  * Filter by payout status.
548
346
  */
549
- status?: 'pending' | 'paid' | 'failed';
347
+ status?: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
550
348
  }
551
349
  export declare namespace PayoutListParams {
552
350
  interface CreatedAt {