@augustusbank/typescript-sdk 0.26.0 → 0.28.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 (80) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/account-programs.d.mts +2 -1
  10. package/resources/account-programs.d.mts.map +1 -1
  11. package/resources/account-programs.d.ts +2 -1
  12. package/resources/account-programs.d.ts.map +1 -1
  13. package/resources/accounts.d.mts +188 -115
  14. package/resources/accounts.d.mts.map +1 -1
  15. package/resources/accounts.d.ts +188 -115
  16. package/resources/accounts.d.ts.map +1 -1
  17. package/resources/counterparties.d.mts +226 -261
  18. package/resources/counterparties.d.mts.map +1 -1
  19. package/resources/counterparties.d.ts +226 -261
  20. package/resources/counterparties.d.ts.map +1 -1
  21. package/resources/counterparties.js +3 -16
  22. package/resources/counterparties.js.map +1 -1
  23. package/resources/counterparties.mjs +3 -16
  24. package/resources/counterparties.mjs.map +1 -1
  25. package/resources/index.d.mts +1 -1
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +1 -1
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/payouts.d.mts +1 -1
  32. package/resources/payouts.d.ts +1 -1
  33. package/resources/payouts.js +1 -1
  34. package/resources/payouts.mjs +1 -1
  35. package/resources/simulations/account-programs.d.mts +38 -23
  36. package/resources/simulations/account-programs.d.mts.map +1 -1
  37. package/resources/simulations/account-programs.d.ts +38 -23
  38. package/resources/simulations/account-programs.d.ts.map +1 -1
  39. package/resources/simulations/account-programs.js +3 -2
  40. package/resources/simulations/account-programs.js.map +1 -1
  41. package/resources/simulations/account-programs.mjs +3 -2
  42. package/resources/simulations/account-programs.mjs.map +1 -1
  43. package/resources/simulations/accounts.d.mts +38 -23
  44. package/resources/simulations/accounts.d.mts.map +1 -1
  45. package/resources/simulations/accounts.d.ts +38 -23
  46. package/resources/simulations/accounts.d.ts.map +1 -1
  47. package/resources/simulations/accounts.js +4 -3
  48. package/resources/simulations/accounts.js.map +1 -1
  49. package/resources/simulations/accounts.mjs +4 -3
  50. package/resources/simulations/accounts.mjs.map +1 -1
  51. package/resources/simulations/deposits.d.mts +42 -21
  52. package/resources/simulations/deposits.d.mts.map +1 -1
  53. package/resources/simulations/deposits.d.ts +42 -21
  54. package/resources/simulations/deposits.d.ts.map +1 -1
  55. package/resources/simulations/deposits.js +1 -1
  56. package/resources/simulations/deposits.mjs +1 -1
  57. package/resources/transactions.d.mts +62 -38
  58. package/resources/transactions.d.mts.map +1 -1
  59. package/resources/transactions.d.ts +62 -38
  60. package/resources/transactions.d.ts.map +1 -1
  61. package/resources/webhooks.d.mts +258 -114
  62. package/resources/webhooks.d.mts.map +1 -1
  63. package/resources/webhooks.d.ts +258 -114
  64. package/resources/webhooks.d.ts.map +1 -1
  65. package/src/client.ts +0 -2
  66. package/src/resources/account-programs.ts +2 -1
  67. package/src/resources/accounts.ts +218 -127
  68. package/src/resources/counterparties.ts +277 -580
  69. package/src/resources/index.ts +0 -1
  70. package/src/resources/payouts.ts +1 -1
  71. package/src/resources/simulations/account-programs.ts +42 -25
  72. package/src/resources/simulations/accounts.ts +42 -25
  73. package/src/resources/simulations/deposits.ts +47 -23
  74. package/src/resources/transactions.ts +72 -42
  75. package/src/resources/webhooks.ts +306 -126
  76. package/src/version.ts +1 -1
  77. package/version.d.mts +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
  80. package/version.mjs +1 -1
@@ -15,8 +15,9 @@ export class Counterparties extends APIResource {
15
15
  * const counterparty = await client.counterparties.create({
16
16
  * financial_address: {
17
17
  * account_holder_name: 'Acme Sandbox Ltd.',
18
- * iban: 'DE89370400440532013000',
19
- * type: 'iban',
18
+ * account_number: '000123456789',
19
+ * routing_number: '110000000',
20
+ * type: 'aba',
20
21
  * },
21
22
  * });
22
23
  * ```
@@ -77,21 +78,6 @@ export class Counterparties extends APIResource {
77
78
  ...options,
78
79
  });
79
80
  }
80
-
81
- /**
82
- * Blocks payments to and from a counterparty owned by the merchant. Blocking an
83
- * already-blocked counterparty succeeds without changing the existing block.
84
- *
85
- * @example
86
- * ```ts
87
- * const response = await client.counterparties.block(
88
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
89
- * );
90
- * ```
91
- */
92
- block(id: string, options?: RequestOptions): APIPromise<CounterpartyBlockResponse> {
93
- return this._client.post(path`/v1/counterparties/${id}/block`, options);
94
- }
95
81
  }
96
82
 
97
83
  export type CounterpartyListResponsesCursorPage = CursorPage<CounterpartyListResponse>;
@@ -112,6 +98,11 @@ export interface CounterpartyCreateResponse {
112
98
  */
113
99
  date_of_birth: string | null;
114
100
 
101
+ /**
102
+ * Email address of the counterparty, or null if not recorded.
103
+ */
104
+ email: string | null;
105
+
115
106
  /**
116
107
  * Whether the counterparty is a business or an individual.
117
108
  */
@@ -121,9 +112,9 @@ export interface CounterpartyCreateResponse {
121
112
  * Financial address of the counterparty.
122
113
  */
123
114
  financial_address:
115
+ | CounterpartyCreateResponse.AbaFinancialAddress
124
116
  | CounterpartyCreateResponse.IbanFinancialAddress
125
117
  | CounterpartyCreateResponse.SortCodeFinancialAddress
126
- | CounterpartyCreateResponse.AbaFinancialAddress
127
118
  | CounterpartyCreateResponse.BicFinancialAddress
128
119
  | CounterpartyCreateResponse.CryptoWalletFinancialAddress;
129
120
 
@@ -133,6 +124,11 @@ export interface CounterpartyCreateResponse {
133
124
  */
134
125
  is_self_owned: boolean;
135
126
 
127
+ /**
128
+ * National tax or identity number of the counterparty, or null if not recorded.
129
+ */
130
+ legal_id: string | null;
131
+
136
132
  /**
137
133
  * Set of up to 50 key-value string pairs you can attach to store structured
138
134
  * information, such as correlating this resource with an object in your own
@@ -145,6 +141,11 @@ export interface CounterpartyCreateResponse {
145
141
  */
146
142
  name: string | null;
147
143
 
144
+ /**
145
+ * Phone number of the counterparty, or null if not recorded.
146
+ */
147
+ phone: string | null;
148
+
148
149
  /**
149
150
  * Physical address of the counterparty, or null if not recorded.
150
151
  */
@@ -157,70 +158,80 @@ export interface CounterpartyCreateResponse {
157
158
  }
158
159
 
159
160
  export namespace CounterpartyCreateResponse {
160
- export interface IbanFinancialAddress {
161
+ export interface AbaFinancialAddress {
161
162
  /**
162
163
  * Name of the account holder.
163
164
  */
164
165
  account_holder_name: string;
165
166
 
166
167
  /**
167
- * Bank Identifier Code, or null if not provided.
168
+ * Bank account number.
168
169
  */
169
- bic: string | null;
170
+ account_number: string;
170
171
 
171
172
  /**
172
- * International Bank Account Number.
173
+ * Whether the account is a checking or a savings account, or null if not provided.
173
174
  */
174
- iban: string;
175
+ account_type: 'checking' | 'savings' | null;
175
176
 
176
177
  /**
177
- * Discriminator for IBAN financial address.
178
+ * ABA routing number (9 digits).
178
179
  */
179
- type: 'iban';
180
+ routing_number: string;
181
+
182
+ /**
183
+ * Discriminator for ABA wire financial address.
184
+ */
185
+ type: 'aba';
180
186
  }
181
187
 
182
- export interface SortCodeFinancialAddress {
188
+ export interface IbanFinancialAddress {
183
189
  /**
184
190
  * Name of the account holder.
185
191
  */
186
192
  account_holder_name: string;
187
193
 
188
194
  /**
189
- * UK account number (8 digits).
195
+ * Whether the account is a checking or a savings account, or null if not provided.
190
196
  */
191
- account_number: string;
197
+ account_type: 'checking' | 'savings' | null;
192
198
 
193
199
  /**
194
- * UK sort code (6 digits).
200
+ * Bank Identifier Code, or null if not provided.
195
201
  */
196
- sort_code: string;
202
+ bic: string | null;
197
203
 
198
204
  /**
199
- * Discriminator for UK sort code financial address.
205
+ * International Bank Account Number.
200
206
  */
201
- type: 'sort_code';
207
+ iban: string;
208
+
209
+ /**
210
+ * Discriminator for IBAN financial address.
211
+ */
212
+ type: 'iban';
202
213
  }
203
214
 
204
- export interface AbaFinancialAddress {
215
+ export interface SortCodeFinancialAddress {
205
216
  /**
206
217
  * Name of the account holder.
207
218
  */
208
219
  account_holder_name: string;
209
220
 
210
221
  /**
211
- * Bank account number.
222
+ * UK account number (8 digits).
212
223
  */
213
224
  account_number: string;
214
225
 
215
226
  /**
216
- * ABA routing number (9 digits).
227
+ * UK sort code (6 digits).
217
228
  */
218
- routing_number: string;
229
+ sort_code: string;
219
230
 
220
231
  /**
221
- * Discriminator for ABA wire financial address.
232
+ * Discriminator for UK sort code financial address.
222
233
  */
223
- type: 'aba';
234
+ type: 'sort_code';
224
235
  }
225
236
 
226
237
  export interface BicFinancialAddress {
@@ -234,6 +245,11 @@ export namespace CounterpartyCreateResponse {
234
245
  */
235
246
  account_number: string;
236
247
 
248
+ /**
249
+ * Whether the account is a checking or a savings account, or null if not provided.
250
+ */
251
+ account_type: 'checking' | 'savings' | null;
252
+
237
253
  /**
238
254
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
239
255
  */
@@ -578,6 +594,11 @@ export interface CounterpartyRetrieveResponse {
578
594
  */
579
595
  date_of_birth: string | null;
580
596
 
597
+ /**
598
+ * Email address of the counterparty, or null if not recorded.
599
+ */
600
+ email: string | null;
601
+
581
602
  /**
582
603
  * Whether the counterparty is a business or an individual.
583
604
  */
@@ -587,9 +608,9 @@ export interface CounterpartyRetrieveResponse {
587
608
  * Financial address of the counterparty.
588
609
  */
589
610
  financial_address:
611
+ | CounterpartyRetrieveResponse.AbaFinancialAddress
590
612
  | CounterpartyRetrieveResponse.IbanFinancialAddress
591
613
  | CounterpartyRetrieveResponse.SortCodeFinancialAddress
592
- | CounterpartyRetrieveResponse.AbaFinancialAddress
593
614
  | CounterpartyRetrieveResponse.BicFinancialAddress
594
615
  | CounterpartyRetrieveResponse.CryptoWalletFinancialAddress;
595
616
 
@@ -599,6 +620,11 @@ export interface CounterpartyRetrieveResponse {
599
620
  */
600
621
  is_self_owned: boolean;
601
622
 
623
+ /**
624
+ * National tax or identity number of the counterparty, or null if not recorded.
625
+ */
626
+ legal_id: string | null;
627
+
602
628
  /**
603
629
  * Set of up to 50 key-value string pairs you can attach to store structured
604
630
  * information, such as correlating this resource with an object in your own
@@ -611,6 +637,11 @@ export interface CounterpartyRetrieveResponse {
611
637
  */
612
638
  name: string | null;
613
639
 
640
+ /**
641
+ * Phone number of the counterparty, or null if not recorded.
642
+ */
643
+ phone: string | null;
644
+
614
645
  /**
615
646
  * Physical address of the counterparty, or null if not recorded.
616
647
  */
@@ -623,70 +654,80 @@ export interface CounterpartyRetrieveResponse {
623
654
  }
624
655
 
625
656
  export namespace CounterpartyRetrieveResponse {
626
- export interface IbanFinancialAddress {
657
+ export interface AbaFinancialAddress {
627
658
  /**
628
659
  * Name of the account holder.
629
660
  */
630
661
  account_holder_name: string;
631
662
 
632
663
  /**
633
- * Bank Identifier Code, or null if not provided.
664
+ * Bank account number.
634
665
  */
635
- bic: string | null;
666
+ account_number: string;
636
667
 
637
668
  /**
638
- * International Bank Account Number.
669
+ * Whether the account is a checking or a savings account, or null if not provided.
639
670
  */
640
- iban: string;
671
+ account_type: 'checking' | 'savings' | null;
641
672
 
642
673
  /**
643
- * Discriminator for IBAN financial address.
674
+ * ABA routing number (9 digits).
644
675
  */
645
- type: 'iban';
676
+ routing_number: string;
677
+
678
+ /**
679
+ * Discriminator for ABA wire financial address.
680
+ */
681
+ type: 'aba';
646
682
  }
647
683
 
648
- export interface SortCodeFinancialAddress {
684
+ export interface IbanFinancialAddress {
649
685
  /**
650
686
  * Name of the account holder.
651
687
  */
652
688
  account_holder_name: string;
653
689
 
654
690
  /**
655
- * UK account number (8 digits).
691
+ * Whether the account is a checking or a savings account, or null if not provided.
656
692
  */
657
- account_number: string;
693
+ account_type: 'checking' | 'savings' | null;
658
694
 
659
695
  /**
660
- * UK sort code (6 digits).
696
+ * Bank Identifier Code, or null if not provided.
661
697
  */
662
- sort_code: string;
698
+ bic: string | null;
663
699
 
664
700
  /**
665
- * Discriminator for UK sort code financial address.
701
+ * International Bank Account Number.
666
702
  */
667
- type: 'sort_code';
703
+ iban: string;
704
+
705
+ /**
706
+ * Discriminator for IBAN financial address.
707
+ */
708
+ type: 'iban';
668
709
  }
669
710
 
670
- export interface AbaFinancialAddress {
711
+ export interface SortCodeFinancialAddress {
671
712
  /**
672
713
  * Name of the account holder.
673
714
  */
674
715
  account_holder_name: string;
675
716
 
676
717
  /**
677
- * Bank account number.
718
+ * UK account number (8 digits).
678
719
  */
679
720
  account_number: string;
680
721
 
681
722
  /**
682
- * ABA routing number (9 digits).
723
+ * UK sort code (6 digits).
683
724
  */
684
- routing_number: string;
725
+ sort_code: string;
685
726
 
686
727
  /**
687
- * Discriminator for ABA wire financial address.
728
+ * Discriminator for UK sort code financial address.
688
729
  */
689
- type: 'aba';
730
+ type: 'sort_code';
690
731
  }
691
732
 
692
733
  export interface BicFinancialAddress {
@@ -700,6 +741,11 @@ export namespace CounterpartyRetrieveResponse {
700
741
  */
701
742
  account_number: string;
702
743
 
744
+ /**
745
+ * Whether the account is a checking or a savings account, or null if not provided.
746
+ */
747
+ account_type: 'checking' | 'savings' | null;
748
+
703
749
  /**
704
750
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
705
751
  */
@@ -1044,6 +1090,11 @@ export interface CounterpartyUpdateResponse {
1044
1090
  */
1045
1091
  date_of_birth: string | null;
1046
1092
 
1093
+ /**
1094
+ * Email address of the counterparty, or null if not recorded.
1095
+ */
1096
+ email: string | null;
1097
+
1047
1098
  /**
1048
1099
  * Whether the counterparty is a business or an individual.
1049
1100
  */
@@ -1053,9 +1104,9 @@ export interface CounterpartyUpdateResponse {
1053
1104
  * Financial address of the counterparty.
1054
1105
  */
1055
1106
  financial_address:
1107
+ | CounterpartyUpdateResponse.AbaFinancialAddress
1056
1108
  | CounterpartyUpdateResponse.IbanFinancialAddress
1057
1109
  | CounterpartyUpdateResponse.SortCodeFinancialAddress
1058
- | CounterpartyUpdateResponse.AbaFinancialAddress
1059
1110
  | CounterpartyUpdateResponse.BicFinancialAddress
1060
1111
  | CounterpartyUpdateResponse.CryptoWalletFinancialAddress;
1061
1112
 
@@ -1065,6 +1116,11 @@ export interface CounterpartyUpdateResponse {
1065
1116
  */
1066
1117
  is_self_owned: boolean;
1067
1118
 
1119
+ /**
1120
+ * National tax or identity number of the counterparty, or null if not recorded.
1121
+ */
1122
+ legal_id: string | null;
1123
+
1068
1124
  /**
1069
1125
  * Set of up to 50 key-value string pairs you can attach to store structured
1070
1126
  * information, such as correlating this resource with an object in your own
@@ -1077,6 +1133,11 @@ export interface CounterpartyUpdateResponse {
1077
1133
  */
1078
1134
  name: string | null;
1079
1135
 
1136
+ /**
1137
+ * Phone number of the counterparty, or null if not recorded.
1138
+ */
1139
+ phone: string | null;
1140
+
1080
1141
  /**
1081
1142
  * Physical address of the counterparty, or null if not recorded.
1082
1143
  */
@@ -1089,70 +1150,80 @@ export interface CounterpartyUpdateResponse {
1089
1150
  }
1090
1151
 
1091
1152
  export namespace CounterpartyUpdateResponse {
1092
- export interface IbanFinancialAddress {
1153
+ export interface AbaFinancialAddress {
1093
1154
  /**
1094
1155
  * Name of the account holder.
1095
1156
  */
1096
1157
  account_holder_name: string;
1097
1158
 
1098
1159
  /**
1099
- * Bank Identifier Code, or null if not provided.
1160
+ * Bank account number.
1100
1161
  */
1101
- bic: string | null;
1162
+ account_number: string;
1102
1163
 
1103
1164
  /**
1104
- * International Bank Account Number.
1165
+ * Whether the account is a checking or a savings account, or null if not provided.
1105
1166
  */
1106
- iban: string;
1167
+ account_type: 'checking' | 'savings' | null;
1107
1168
 
1108
1169
  /**
1109
- * Discriminator for IBAN financial address.
1170
+ * ABA routing number (9 digits).
1110
1171
  */
1111
- type: 'iban';
1172
+ routing_number: string;
1173
+
1174
+ /**
1175
+ * Discriminator for ABA wire financial address.
1176
+ */
1177
+ type: 'aba';
1112
1178
  }
1113
1179
 
1114
- export interface SortCodeFinancialAddress {
1180
+ export interface IbanFinancialAddress {
1115
1181
  /**
1116
1182
  * Name of the account holder.
1117
1183
  */
1118
1184
  account_holder_name: string;
1119
1185
 
1120
1186
  /**
1121
- * UK account number (8 digits).
1187
+ * Whether the account is a checking or a savings account, or null if not provided.
1122
1188
  */
1123
- account_number: string;
1189
+ account_type: 'checking' | 'savings' | null;
1124
1190
 
1125
1191
  /**
1126
- * UK sort code (6 digits).
1192
+ * Bank Identifier Code, or null if not provided.
1127
1193
  */
1128
- sort_code: string;
1194
+ bic: string | null;
1129
1195
 
1130
1196
  /**
1131
- * Discriminator for UK sort code financial address.
1197
+ * International Bank Account Number.
1132
1198
  */
1133
- type: 'sort_code';
1199
+ iban: string;
1200
+
1201
+ /**
1202
+ * Discriminator for IBAN financial address.
1203
+ */
1204
+ type: 'iban';
1134
1205
  }
1135
1206
 
1136
- export interface AbaFinancialAddress {
1207
+ export interface SortCodeFinancialAddress {
1137
1208
  /**
1138
1209
  * Name of the account holder.
1139
1210
  */
1140
1211
  account_holder_name: string;
1141
1212
 
1142
1213
  /**
1143
- * Bank account number.
1214
+ * UK account number (8 digits).
1144
1215
  */
1145
1216
  account_number: string;
1146
1217
 
1147
1218
  /**
1148
- * ABA routing number (9 digits).
1219
+ * UK sort code (6 digits).
1149
1220
  */
1150
- routing_number: string;
1221
+ sort_code: string;
1151
1222
 
1152
1223
  /**
1153
- * Discriminator for ABA wire financial address.
1224
+ * Discriminator for UK sort code financial address.
1154
1225
  */
1155
- type: 'aba';
1226
+ type: 'sort_code';
1156
1227
  }
1157
1228
 
1158
1229
  export interface BicFinancialAddress {
@@ -1166,6 +1237,11 @@ export namespace CounterpartyUpdateResponse {
1166
1237
  */
1167
1238
  account_number: string;
1168
1239
 
1240
+ /**
1241
+ * Whether the account is a checking or a savings account, or null if not provided.
1242
+ */
1243
+ account_type: 'checking' | 'savings' | null;
1244
+
1169
1245
  /**
1170
1246
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
1171
1247
  */
@@ -1510,6 +1586,11 @@ export interface CounterpartyListResponse {
1510
1586
  */
1511
1587
  date_of_birth: string | null;
1512
1588
 
1589
+ /**
1590
+ * Email address of the counterparty, or null if not recorded.
1591
+ */
1592
+ email: string | null;
1593
+
1513
1594
  /**
1514
1595
  * Whether the counterparty is a business or an individual.
1515
1596
  */
@@ -1519,9 +1600,9 @@ export interface CounterpartyListResponse {
1519
1600
  * Financial address of the counterparty.
1520
1601
  */
1521
1602
  financial_address:
1603
+ | CounterpartyListResponse.AbaFinancialAddress
1522
1604
  | CounterpartyListResponse.IbanFinancialAddress
1523
1605
  | CounterpartyListResponse.SortCodeFinancialAddress
1524
- | CounterpartyListResponse.AbaFinancialAddress
1525
1606
  | CounterpartyListResponse.BicFinancialAddress
1526
1607
  | CounterpartyListResponse.CryptoWalletFinancialAddress;
1527
1608
 
@@ -1531,6 +1612,11 @@ export interface CounterpartyListResponse {
1531
1612
  */
1532
1613
  is_self_owned: boolean;
1533
1614
 
1615
+ /**
1616
+ * National tax or identity number of the counterparty, or null if not recorded.
1617
+ */
1618
+ legal_id: string | null;
1619
+
1534
1620
  /**
1535
1621
  * Set of up to 50 key-value string pairs you can attach to store structured
1536
1622
  * information, such as correlating this resource with an object in your own
@@ -1543,6 +1629,11 @@ export interface CounterpartyListResponse {
1543
1629
  */
1544
1630
  name: string | null;
1545
1631
 
1632
+ /**
1633
+ * Phone number of the counterparty, or null if not recorded.
1634
+ */
1635
+ phone: string | null;
1636
+
1546
1637
  /**
1547
1638
  * Physical address of the counterparty, or null if not recorded.
1548
1639
  */
@@ -1555,70 +1646,80 @@ export interface CounterpartyListResponse {
1555
1646
  }
1556
1647
 
1557
1648
  export namespace CounterpartyListResponse {
1558
- export interface IbanFinancialAddress {
1649
+ export interface AbaFinancialAddress {
1559
1650
  /**
1560
1651
  * Name of the account holder.
1561
1652
  */
1562
1653
  account_holder_name: string;
1563
1654
 
1564
1655
  /**
1565
- * Bank Identifier Code, or null if not provided.
1656
+ * Bank account number.
1566
1657
  */
1567
- bic: string | null;
1658
+ account_number: string;
1568
1659
 
1569
1660
  /**
1570
- * International Bank Account Number.
1661
+ * Whether the account is a checking or a savings account, or null if not provided.
1571
1662
  */
1572
- iban: string;
1663
+ account_type: 'checking' | 'savings' | null;
1573
1664
 
1574
1665
  /**
1575
- * Discriminator for IBAN financial address.
1666
+ * ABA routing number (9 digits).
1576
1667
  */
1577
- type: 'iban';
1668
+ routing_number: string;
1669
+
1670
+ /**
1671
+ * Discriminator for ABA wire financial address.
1672
+ */
1673
+ type: 'aba';
1578
1674
  }
1579
1675
 
1580
- export interface SortCodeFinancialAddress {
1676
+ export interface IbanFinancialAddress {
1581
1677
  /**
1582
1678
  * Name of the account holder.
1583
1679
  */
1584
1680
  account_holder_name: string;
1585
1681
 
1586
1682
  /**
1587
- * UK account number (8 digits).
1683
+ * Whether the account is a checking or a savings account, or null if not provided.
1588
1684
  */
1589
- account_number: string;
1685
+ account_type: 'checking' | 'savings' | null;
1590
1686
 
1591
1687
  /**
1592
- * UK sort code (6 digits).
1688
+ * Bank Identifier Code, or null if not provided.
1593
1689
  */
1594
- sort_code: string;
1690
+ bic: string | null;
1595
1691
 
1596
1692
  /**
1597
- * Discriminator for UK sort code financial address.
1693
+ * International Bank Account Number.
1598
1694
  */
1599
- type: 'sort_code';
1695
+ iban: string;
1696
+
1697
+ /**
1698
+ * Discriminator for IBAN financial address.
1699
+ */
1700
+ type: 'iban';
1600
1701
  }
1601
1702
 
1602
- export interface AbaFinancialAddress {
1703
+ export interface SortCodeFinancialAddress {
1603
1704
  /**
1604
1705
  * Name of the account holder.
1605
1706
  */
1606
1707
  account_holder_name: string;
1607
1708
 
1608
1709
  /**
1609
- * Bank account number.
1710
+ * UK account number (8 digits).
1610
1711
  */
1611
1712
  account_number: string;
1612
1713
 
1613
1714
  /**
1614
- * ABA routing number (9 digits).
1715
+ * UK sort code (6 digits).
1615
1716
  */
1616
- routing_number: string;
1717
+ sort_code: string;
1617
1718
 
1618
1719
  /**
1619
- * Discriminator for ABA wire financial address.
1720
+ * Discriminator for UK sort code financial address.
1620
1721
  */
1621
- type: 'aba';
1722
+ type: 'sort_code';
1622
1723
  }
1623
1724
 
1624
1725
  export interface BicFinancialAddress {
@@ -1632,6 +1733,11 @@ export namespace CounterpartyListResponse {
1632
1733
  */
1633
1734
  account_number: string;
1634
1735
 
1736
+ /**
1737
+ * Whether the account is a checking or a savings account, or null if not provided.
1738
+ */
1739
+ account_type: 'checking' | 'savings' | null;
1740
+
1635
1741
  /**
1636
1742
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
1637
1743
  */
@@ -1960,112 +2066,72 @@ export namespace CounterpartyListResponse {
1960
2066
  }
1961
2067
  }
1962
2068
 
1963
- export interface CounterpartyBlockResponse {
2069
+ export interface CounterpartyCreateParams {
1964
2070
  /**
1965
- * Unique identifier of the counterparty.
2071
+ * Financial address of the counterparty.
1966
2072
  */
1967
- id: string;
1968
-
1969
- /**
1970
- * Whether payments to or from this counterparty are currently blocked.
1971
- */
1972
- blocked: boolean;
2073
+ financial_address:
2074
+ | CounterpartyCreateParams.AbaFinancialAddressRequest
2075
+ | CounterpartyCreateParams.IbanFinancialAddressRequest
2076
+ | CounterpartyCreateParams.SortCodeFinancialAddressRequest
2077
+ | CounterpartyCreateParams.BicFinancialAddressRequest
2078
+ | CounterpartyCreateParams.CryptoWalletFinancialAddress;
1973
2079
 
1974
2080
  /**
1975
- * Date of birth in YYYY-MM-DD format, or null if not recorded.
2081
+ * Date of birth in YYYY-MM-DD format.
1976
2082
  */
1977
- date_of_birth: string | null;
2083
+ date_of_birth?: string;
1978
2084
 
1979
2085
  /**
1980
- * Whether the counterparty is a business or an individual.
2086
+ * Email address of the counterparty. Stored for operational contact only; it is
2087
+ * not sent with payments.
1981
2088
  */
1982
- entity_type: 'business' | 'individual';
2089
+ email?: string;
1983
2090
 
1984
2091
  /**
1985
- * Financial address of the counterparty.
2092
+ * Whether the counterparty is a business or an individual. Defaults to business.
1986
2093
  */
1987
- financial_address:
1988
- | CounterpartyBlockResponse.IbanFinancialAddress
1989
- | CounterpartyBlockResponse.SortCodeFinancialAddress
1990
- | CounterpartyBlockResponse.AbaFinancialAddress
1991
- | CounterpartyBlockResponse.BicFinancialAddress
1992
- | CounterpartyBlockResponse.CryptoWalletFinancialAddress;
2094
+ entity_type?: 'business' | 'individual';
1993
2095
 
1994
2096
  /**
1995
2097
  * Whether the counterparty is self-owned. `false` if the counterparty is not owned
1996
2098
  * by you, `true` if it is.
1997
2099
  */
1998
- is_self_owned: boolean;
2100
+ is_self_owned?: boolean;
2101
+
2102
+ /**
2103
+ * National tax or identity number of the counterparty, as issued in its country:
2104
+ * CPF or CNPJ in Brazil, Cédula or NIT in Colombia, CUIL or CUIT in Argentina, DNI
2105
+ * or RUC in Peru, RUT in Chile. Free text, up to 127 characters.
2106
+ */
2107
+ legal_id?: string;
1999
2108
 
2000
2109
  /**
2001
2110
  * Set of up to 50 key-value string pairs you can attach to store structured
2002
2111
  * information, such as correlating this resource with an object in your own
2003
2112
  * system. Keys may be up to 40 characters and values up to 500 characters.
2004
2113
  */
2005
- metadata: { [key: string]: string };
2114
+ metadata?: { [key: string]: string } | null;
2006
2115
 
2007
2116
  /**
2008
- * Name of the counterparty, or null if not recorded.
2117
+ * Name of the counterparty.
2009
2118
  */
2010
- name: string | null;
2119
+ name?: string;
2011
2120
 
2012
2121
  /**
2013
- * Physical address of the counterparty, or null if not recorded.
2122
+ * Phone number of the counterparty. Stored for operational contact only; it is not
2123
+ * sent with payments.
2014
2124
  */
2015
- physical_address: CounterpartyBlockResponse.PhysicalAddress | null;
2125
+ phone?: string;
2016
2126
 
2017
2127
  /**
2018
- * Resource type discriminator.
2128
+ * Physical address of the counterparty.
2019
2129
  */
2020
- type: 'counterparty';
2130
+ physical_address?: CounterpartyCreateParams.PhysicalAddress;
2021
2131
  }
2022
2132
 
2023
- export namespace CounterpartyBlockResponse {
2024
- export interface IbanFinancialAddress {
2025
- /**
2026
- * Name of the account holder.
2027
- */
2028
- account_holder_name: string;
2029
-
2030
- /**
2031
- * Bank Identifier Code, or null if not provided.
2032
- */
2033
- bic: string | null;
2034
-
2035
- /**
2036
- * International Bank Account Number.
2037
- */
2038
- iban: string;
2039
-
2040
- /**
2041
- * Discriminator for IBAN financial address.
2042
- */
2043
- type: 'iban';
2044
- }
2045
-
2046
- export interface SortCodeFinancialAddress {
2047
- /**
2048
- * Name of the account holder.
2049
- */
2050
- account_holder_name: string;
2051
-
2052
- /**
2053
- * UK account number (8 digits).
2054
- */
2055
- account_number: string;
2056
-
2057
- /**
2058
- * UK sort code (6 digits).
2059
- */
2060
- sort_code: string;
2061
-
2062
- /**
2063
- * Discriminator for UK sort code financial address.
2064
- */
2065
- type: 'sort_code';
2066
- }
2067
-
2068
- export interface AbaFinancialAddress {
2133
+ export namespace CounterpartyCreateParams {
2134
+ export interface AbaFinancialAddressRequest {
2069
2135
  /**
2070
2136
  * Name of the account holder.
2071
2137
  */
@@ -2085,393 +2151,16 @@ export namespace CounterpartyBlockResponse {
2085
2151
  * Discriminator for ABA wire financial address.
2086
2152
  */
2087
2153
  type: 'aba';
2088
- }
2089
-
2090
- export interface BicFinancialAddress {
2091
- /**
2092
- * Name of the account holder.
2093
- */
2094
- account_holder_name: string;
2095
-
2096
- /**
2097
- * Local-format bank account number.
2098
- */
2099
- account_number: string;
2100
-
2101
- /**
2102
- * ISO 9362 Bank Identifier Code (8 or 11 characters).
2103
- */
2104
- bic: string;
2105
-
2106
- /**
2107
- * Domestic bank or branch code where the destination country uses one (for example
2108
- * the BSB in Australia), or null.
2109
- */
2110
- local_bank_code: string | null;
2111
2154
 
2112
2155
  /**
2113
- * Discriminator for BIC + local account financial address.
2156
+ * Whether the account is a checking or a savings account. Optional; omit or send
2157
+ * null if not provided. Some destination countries require it (for example the
2158
+ * Dominican Republic, Honduras and Jamaica) and ACH uses it for the transaction
2159
+ * code. A payment to an account without one is sent as checking.
2114
2160
  */
2115
- type: 'bic';
2161
+ account_type?: 'checking' | 'savings' | null;
2116
2162
  }
2117
2163
 
2118
- export interface CryptoWalletFinancialAddress {
2119
- /**
2120
- * Wallet address on the specified blockchain.
2121
- */
2122
- address: string;
2123
-
2124
- /**
2125
- * Blockchain network for the crypto wallet.
2126
- */
2127
- blockchain:
2128
- | 'bitcoin'
2129
- | 'ethereum'
2130
- | 'solana'
2131
- | 'polygon'
2132
- | 'bitcoin_testnet4'
2133
- | 'ethereum_sepolia'
2134
- | 'solana_devnet'
2135
- | 'polygon_amoy';
2136
-
2137
- /**
2138
- * Discriminator for crypto wallet financial address.
2139
- */
2140
- type: 'crypto_wallet';
2141
- }
2142
-
2143
- /**
2144
- * Physical address of the counterparty, or null if not recorded.
2145
- */
2146
- export interface PhysicalAddress {
2147
- /**
2148
- * City or locality.
2149
- */
2150
- city: string;
2151
-
2152
- /**
2153
- * ISO 3166-1 alpha-2 country code.
2154
- */
2155
- country_code:
2156
- | 'AF'
2157
- | 'AL'
2158
- | 'DZ'
2159
- | 'AS'
2160
- | 'AD'
2161
- | 'AO'
2162
- | 'AI'
2163
- | 'AQ'
2164
- | 'AG'
2165
- | 'AR'
2166
- | 'AM'
2167
- | 'AW'
2168
- | 'AU'
2169
- | 'AT'
2170
- | 'AZ'
2171
- | 'BS'
2172
- | 'BH'
2173
- | 'BD'
2174
- | 'BB'
2175
- | 'BY'
2176
- | 'BE'
2177
- | 'BZ'
2178
- | 'BJ'
2179
- | 'BM'
2180
- | 'BT'
2181
- | 'BO'
2182
- | 'BA'
2183
- | 'BW'
2184
- | 'BV'
2185
- | 'BR'
2186
- | 'IO'
2187
- | 'BN'
2188
- | 'BG'
2189
- | 'BF'
2190
- | 'BI'
2191
- | 'KH'
2192
- | 'CM'
2193
- | 'CA'
2194
- | 'CV'
2195
- | 'KY'
2196
- | 'CF'
2197
- | 'TD'
2198
- | 'CL'
2199
- | 'CN'
2200
- | 'CX'
2201
- | 'CC'
2202
- | 'CO'
2203
- | 'KM'
2204
- | 'CG'
2205
- | 'CD'
2206
- | 'CK'
2207
- | 'CR'
2208
- | 'CI'
2209
- | 'HR'
2210
- | 'CU'
2211
- | 'CY'
2212
- | 'CZ'
2213
- | 'DK'
2214
- | 'DJ'
2215
- | 'DM'
2216
- | 'DO'
2217
- | 'EC'
2218
- | 'EG'
2219
- | 'SV'
2220
- | 'GQ'
2221
- | 'ER'
2222
- | 'EE'
2223
- | 'ET'
2224
- | 'FK'
2225
- | 'FO'
2226
- | 'FJ'
2227
- | 'FI'
2228
- | 'FR'
2229
- | 'GF'
2230
- | 'PF'
2231
- | 'TF'
2232
- | 'GA'
2233
- | 'GM'
2234
- | 'GE'
2235
- | 'DE'
2236
- | 'GH'
2237
- | 'GI'
2238
- | 'GR'
2239
- | 'GL'
2240
- | 'GD'
2241
- | 'GP'
2242
- | 'GU'
2243
- | 'GT'
2244
- | 'GN'
2245
- | 'GW'
2246
- | 'GY'
2247
- | 'HT'
2248
- | 'HM'
2249
- | 'VA'
2250
- | 'HN'
2251
- | 'HK'
2252
- | 'HU'
2253
- | 'IS'
2254
- | 'IN'
2255
- | 'ID'
2256
- | 'IR'
2257
- | 'IQ'
2258
- | 'IE'
2259
- | 'IL'
2260
- | 'IT'
2261
- | 'JM'
2262
- | 'JP'
2263
- | 'JO'
2264
- | 'KZ'
2265
- | 'KE'
2266
- | 'KI'
2267
- | 'KP'
2268
- | 'KR'
2269
- | 'KW'
2270
- | 'KG'
2271
- | 'LA'
2272
- | 'LV'
2273
- | 'LB'
2274
- | 'LS'
2275
- | 'LR'
2276
- | 'LY'
2277
- | 'LI'
2278
- | 'LT'
2279
- | 'LU'
2280
- | 'MO'
2281
- | 'MG'
2282
- | 'MW'
2283
- | 'MY'
2284
- | 'MV'
2285
- | 'ML'
2286
- | 'MT'
2287
- | 'MH'
2288
- | 'MQ'
2289
- | 'MR'
2290
- | 'MU'
2291
- | 'YT'
2292
- | 'MX'
2293
- | 'FM'
2294
- | 'MD'
2295
- | 'MC'
2296
- | 'MN'
2297
- | 'MS'
2298
- | 'MA'
2299
- | 'MZ'
2300
- | 'MM'
2301
- | 'NA'
2302
- | 'NR'
2303
- | 'NP'
2304
- | 'NL'
2305
- | 'NC'
2306
- | 'NZ'
2307
- | 'NI'
2308
- | 'NE'
2309
- | 'NG'
2310
- | 'NU'
2311
- | 'NF'
2312
- | 'MP'
2313
- | 'MK'
2314
- | 'NO'
2315
- | 'OM'
2316
- | 'PK'
2317
- | 'PW'
2318
- | 'PS'
2319
- | 'PA'
2320
- | 'PG'
2321
- | 'PY'
2322
- | 'PE'
2323
- | 'PH'
2324
- | 'PN'
2325
- | 'PL'
2326
- | 'PT'
2327
- | 'PR'
2328
- | 'QA'
2329
- | 'RE'
2330
- | 'RO'
2331
- | 'RU'
2332
- | 'RW'
2333
- | 'SH'
2334
- | 'KN'
2335
- | 'LC'
2336
- | 'PM'
2337
- | 'VC'
2338
- | 'WS'
2339
- | 'SM'
2340
- | 'ST'
2341
- | 'SA'
2342
- | 'SN'
2343
- | 'SC'
2344
- | 'SL'
2345
- | 'SG'
2346
- | 'SK'
2347
- | 'SI'
2348
- | 'SB'
2349
- | 'SO'
2350
- | 'ZA'
2351
- | 'GS'
2352
- | 'ES'
2353
- | 'LK'
2354
- | 'SD'
2355
- | 'SR'
2356
- | 'SJ'
2357
- | 'SZ'
2358
- | 'SE'
2359
- | 'CH'
2360
- | 'SY'
2361
- | 'TW'
2362
- | 'TJ'
2363
- | 'TZ'
2364
- | 'TH'
2365
- | 'TL'
2366
- | 'TG'
2367
- | 'TK'
2368
- | 'TO'
2369
- | 'TT'
2370
- | 'TN'
2371
- | 'TR'
2372
- | 'TM'
2373
- | 'TC'
2374
- | 'TV'
2375
- | 'UG'
2376
- | 'UA'
2377
- | 'AE'
2378
- | 'GB'
2379
- | 'US'
2380
- | 'UM'
2381
- | 'UY'
2382
- | 'UZ'
2383
- | 'VU'
2384
- | 'VE'
2385
- | 'VN'
2386
- | 'VG'
2387
- | 'VI'
2388
- | 'WF'
2389
- | 'EH'
2390
- | 'YE'
2391
- | 'ZM'
2392
- | 'ZW'
2393
- | 'AX'
2394
- | 'BQ'
2395
- | 'CW'
2396
- | 'GG'
2397
- | 'IM'
2398
- | 'JE'
2399
- | 'ME'
2400
- | 'BL'
2401
- | 'MF'
2402
- | 'RS'
2403
- | 'SX'
2404
- | 'SS'
2405
- | 'XK';
2406
-
2407
- /**
2408
- * Primary street address, or null if not recorded.
2409
- */
2410
- line_1: string | null;
2411
-
2412
- /**
2413
- * Secondary street address, or null if not recorded.
2414
- */
2415
- line_2: string | null;
2416
-
2417
- /**
2418
- * Postal or ZIP code, or null if not recorded.
2419
- */
2420
- postal_code: string | null;
2421
-
2422
- /**
2423
- * State, province, or region, or null if not recorded.
2424
- */
2425
- state: string | null;
2426
- }
2427
- }
2428
-
2429
- export interface CounterpartyCreateParams {
2430
- /**
2431
- * Financial address of the counterparty.
2432
- */
2433
- financial_address:
2434
- | CounterpartyCreateParams.IbanFinancialAddressRequest
2435
- | CounterpartyCreateParams.SortCodeFinancialAddress
2436
- | CounterpartyCreateParams.AbaFinancialAddress
2437
- | CounterpartyCreateParams.BicFinancialAddressRequest
2438
- | CounterpartyCreateParams.CryptoWalletFinancialAddress;
2439
-
2440
- /**
2441
- * Date of birth in YYYY-MM-DD format.
2442
- */
2443
- date_of_birth?: string;
2444
-
2445
- /**
2446
- * Whether the counterparty is a business or an individual. Defaults to business.
2447
- */
2448
- entity_type?: 'business' | 'individual';
2449
-
2450
- /**
2451
- * Whether the counterparty is self-owned. `false` if the counterparty is not owned
2452
- * by you, `true` if it is.
2453
- */
2454
- is_self_owned?: boolean;
2455
-
2456
- /**
2457
- * Set of up to 50 key-value string pairs you can attach to store structured
2458
- * information, such as correlating this resource with an object in your own
2459
- * system. Keys may be up to 40 characters and values up to 500 characters.
2460
- */
2461
- metadata?: { [key: string]: string } | null;
2462
-
2463
- /**
2464
- * Name of the counterparty.
2465
- */
2466
- name?: string;
2467
-
2468
- /**
2469
- * Physical address of the counterparty.
2470
- */
2471
- physical_address?: CounterpartyCreateParams.PhysicalAddress;
2472
- }
2473
-
2474
- export namespace CounterpartyCreateParams {
2475
2164
  export interface IbanFinancialAddressRequest {
2476
2165
  /**
2477
2166
  * Name of the account holder.
@@ -2488,13 +2177,21 @@ export namespace CounterpartyCreateParams {
2488
2177
  */
2489
2178
  type: 'iban';
2490
2179
 
2180
+ /**
2181
+ * Whether the account is a checking or a savings account. Optional; omit or send
2182
+ * null if not provided. Some destination countries require it (for example the
2183
+ * Dominican Republic, Honduras and Jamaica) and ACH uses it for the transaction
2184
+ * code. A payment to an account without one is sent as checking.
2185
+ */
2186
+ account_type?: 'checking' | 'savings' | null;
2187
+
2491
2188
  /**
2492
2189
  * Bank Identifier Code. Optional; omit or send null if not provided.
2493
2190
  */
2494
2191
  bic?: string | null;
2495
2192
  }
2496
2193
 
2497
- export interface SortCodeFinancialAddress {
2194
+ export interface SortCodeFinancialAddressRequest {
2498
2195
  /**
2499
2196
  * Name of the account holder.
2500
2197
  */
@@ -2516,28 +2213,6 @@ export namespace CounterpartyCreateParams {
2516
2213
  type: 'sort_code';
2517
2214
  }
2518
2215
 
2519
- export interface AbaFinancialAddress {
2520
- /**
2521
- * Name of the account holder.
2522
- */
2523
- account_holder_name: string;
2524
-
2525
- /**
2526
- * Bank account number.
2527
- */
2528
- account_number: string;
2529
-
2530
- /**
2531
- * ABA routing number (9 digits).
2532
- */
2533
- routing_number: string;
2534
-
2535
- /**
2536
- * Discriminator for ABA wire financial address.
2537
- */
2538
- type: 'aba';
2539
- }
2540
-
2541
2216
  export interface BicFinancialAddressRequest {
2542
2217
  /**
2543
2218
  * Name of the account holder.
@@ -2559,6 +2234,14 @@ export namespace CounterpartyCreateParams {
2559
2234
  */
2560
2235
  type: 'bic';
2561
2236
 
2237
+ /**
2238
+ * Whether the account is a checking or a savings account. Optional; omit or send
2239
+ * null if not provided. Some destination countries require it (for example the
2240
+ * Dominican Republic, Honduras and Jamaica) and ACH uses it for the transaction
2241
+ * code. A payment to an account without one is sent as checking.
2242
+ */
2243
+ account_type?: 'checking' | 'savings' | null;
2244
+
2562
2245
  /**
2563
2246
  * Domestic bank or branch code where the destination country uses one (for example
2564
2247
  * the BSB in Australia). Optional; omit or send null where the country has none.
@@ -2884,6 +2567,11 @@ export interface CounterpartyUpdateParams {
2884
2567
  */
2885
2568
  date_of_birth?: string | null;
2886
2569
 
2570
+ /**
2571
+ * New email address, or null to clear the current email address.
2572
+ */
2573
+ email?: string | null;
2574
+
2887
2575
  /**
2888
2576
  * New entity type. Omit to keep the current entity type.
2889
2577
  */
@@ -2894,11 +2582,21 @@ export interface CounterpartyUpdateParams {
2894
2582
  */
2895
2583
  is_self_owned?: boolean;
2896
2584
 
2585
+ /**
2586
+ * New legal identifier, or null to clear the current legal identifier.
2587
+ */
2588
+ legal_id?: string | null;
2589
+
2897
2590
  /**
2898
2591
  * New name, or null to clear the current name.
2899
2592
  */
2900
2593
  name?: string | null;
2901
2594
 
2595
+ /**
2596
+ * New phone number, or null to clear the current phone number.
2597
+ */
2598
+ phone?: string | null;
2599
+
2902
2600
  /**
2903
2601
  * New physical address, or null to clear the current physical address.
2904
2602
  */
@@ -3200,7 +2898,6 @@ export declare namespace Counterparties {
3200
2898
  type CounterpartyRetrieveResponse as CounterpartyRetrieveResponse,
3201
2899
  type CounterpartyUpdateResponse as CounterpartyUpdateResponse,
3202
2900
  type CounterpartyListResponse as CounterpartyListResponse,
3203
- type CounterpartyBlockResponse as CounterpartyBlockResponse,
3204
2901
  type CounterpartyListResponsesCursorPage as CounterpartyListResponsesCursorPage,
3205
2902
  type CounterpartyCreateParams as CounterpartyCreateParams,
3206
2903
  type CounterpartyUpdateParams as CounterpartyUpdateParams,