@augustusbank/typescript-sdk 0.27.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 (61) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/resources/accounts.d.mts +186 -114
  4. package/resources/accounts.d.mts.map +1 -1
  5. package/resources/accounts.d.ts +186 -114
  6. package/resources/accounts.d.ts.map +1 -1
  7. package/resources/counterparties.d.mts +243 -97
  8. package/resources/counterparties.d.mts.map +1 -1
  9. package/resources/counterparties.d.ts +243 -97
  10. package/resources/counterparties.d.ts.map +1 -1
  11. package/resources/counterparties.js +3 -2
  12. package/resources/counterparties.js.map +1 -1
  13. package/resources/counterparties.mjs +3 -2
  14. package/resources/counterparties.mjs.map +1 -1
  15. package/resources/payouts.d.mts +1 -1
  16. package/resources/payouts.d.ts +1 -1
  17. package/resources/payouts.js +1 -1
  18. package/resources/payouts.mjs +1 -1
  19. package/resources/simulations/account-programs.d.mts +37 -22
  20. package/resources/simulations/account-programs.d.mts.map +1 -1
  21. package/resources/simulations/account-programs.d.ts +37 -22
  22. package/resources/simulations/account-programs.d.ts.map +1 -1
  23. package/resources/simulations/account-programs.js +3 -2
  24. package/resources/simulations/account-programs.js.map +1 -1
  25. package/resources/simulations/account-programs.mjs +3 -2
  26. package/resources/simulations/account-programs.mjs.map +1 -1
  27. package/resources/simulations/accounts.d.mts +37 -22
  28. package/resources/simulations/accounts.d.mts.map +1 -1
  29. package/resources/simulations/accounts.d.ts +37 -22
  30. package/resources/simulations/accounts.d.ts.map +1 -1
  31. package/resources/simulations/accounts.js +4 -3
  32. package/resources/simulations/accounts.js.map +1 -1
  33. package/resources/simulations/accounts.mjs +4 -3
  34. package/resources/simulations/accounts.mjs.map +1 -1
  35. package/resources/simulations/deposits.d.mts +41 -20
  36. package/resources/simulations/deposits.d.mts.map +1 -1
  37. package/resources/simulations/deposits.d.ts +41 -20
  38. package/resources/simulations/deposits.d.ts.map +1 -1
  39. package/resources/simulations/deposits.js +1 -1
  40. package/resources/simulations/deposits.mjs +1 -1
  41. package/resources/transactions.d.mts +62 -38
  42. package/resources/transactions.d.mts.map +1 -1
  43. package/resources/transactions.d.ts +62 -38
  44. package/resources/transactions.d.ts.map +1 -1
  45. package/resources/webhooks.d.mts +258 -114
  46. package/resources/webhooks.d.mts.map +1 -1
  47. package/resources/webhooks.d.ts +258 -114
  48. package/resources/webhooks.d.ts.map +1 -1
  49. package/src/resources/accounts.ts +216 -126
  50. package/src/resources/counterparties.ts +286 -107
  51. package/src/resources/payouts.ts +1 -1
  52. package/src/resources/simulations/account-programs.ts +42 -25
  53. package/src/resources/simulations/accounts.ts +42 -25
  54. package/src/resources/simulations/deposits.ts +46 -22
  55. package/src/resources/transactions.ts +72 -42
  56. package/src/resources/webhooks.ts +306 -126
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. 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
  * ```
@@ -97,6 +98,11 @@ export interface CounterpartyCreateResponse {
97
98
  */
98
99
  date_of_birth: string | null;
99
100
 
101
+ /**
102
+ * Email address of the counterparty, or null if not recorded.
103
+ */
104
+ email: string | null;
105
+
100
106
  /**
101
107
  * Whether the counterparty is a business or an individual.
102
108
  */
@@ -106,9 +112,9 @@ export interface CounterpartyCreateResponse {
106
112
  * Financial address of the counterparty.
107
113
  */
108
114
  financial_address:
115
+ | CounterpartyCreateResponse.AbaFinancialAddress
109
116
  | CounterpartyCreateResponse.IbanFinancialAddress
110
117
  | CounterpartyCreateResponse.SortCodeFinancialAddress
111
- | CounterpartyCreateResponse.AbaFinancialAddress
112
118
  | CounterpartyCreateResponse.BicFinancialAddress
113
119
  | CounterpartyCreateResponse.CryptoWalletFinancialAddress;
114
120
 
@@ -118,6 +124,11 @@ export interface CounterpartyCreateResponse {
118
124
  */
119
125
  is_self_owned: boolean;
120
126
 
127
+ /**
128
+ * National tax or identity number of the counterparty, or null if not recorded.
129
+ */
130
+ legal_id: string | null;
131
+
121
132
  /**
122
133
  * Set of up to 50 key-value string pairs you can attach to store structured
123
134
  * information, such as correlating this resource with an object in your own
@@ -130,6 +141,11 @@ export interface CounterpartyCreateResponse {
130
141
  */
131
142
  name: string | null;
132
143
 
144
+ /**
145
+ * Phone number of the counterparty, or null if not recorded.
146
+ */
147
+ phone: string | null;
148
+
133
149
  /**
134
150
  * Physical address of the counterparty, or null if not recorded.
135
151
  */
@@ -142,70 +158,80 @@ export interface CounterpartyCreateResponse {
142
158
  }
143
159
 
144
160
  export namespace CounterpartyCreateResponse {
145
- export interface IbanFinancialAddress {
161
+ export interface AbaFinancialAddress {
146
162
  /**
147
163
  * Name of the account holder.
148
164
  */
149
165
  account_holder_name: string;
150
166
 
151
167
  /**
152
- * Bank Identifier Code, or null if not provided.
168
+ * Bank account number.
153
169
  */
154
- bic: string | null;
170
+ account_number: string;
155
171
 
156
172
  /**
157
- * International Bank Account Number.
173
+ * Whether the account is a checking or a savings account, or null if not provided.
158
174
  */
159
- iban: string;
175
+ account_type: 'checking' | 'savings' | null;
160
176
 
161
177
  /**
162
- * Discriminator for IBAN financial address.
178
+ * ABA routing number (9 digits).
163
179
  */
164
- type: 'iban';
180
+ routing_number: string;
181
+
182
+ /**
183
+ * Discriminator for ABA wire financial address.
184
+ */
185
+ type: 'aba';
165
186
  }
166
187
 
167
- export interface SortCodeFinancialAddress {
188
+ export interface IbanFinancialAddress {
168
189
  /**
169
190
  * Name of the account holder.
170
191
  */
171
192
  account_holder_name: string;
172
193
 
173
194
  /**
174
- * UK account number (8 digits).
195
+ * Whether the account is a checking or a savings account, or null if not provided.
175
196
  */
176
- account_number: string;
197
+ account_type: 'checking' | 'savings' | null;
177
198
 
178
199
  /**
179
- * UK sort code (6 digits).
200
+ * Bank Identifier Code, or null if not provided.
180
201
  */
181
- sort_code: string;
202
+ bic: string | null;
182
203
 
183
204
  /**
184
- * Discriminator for UK sort code financial address.
205
+ * International Bank Account Number.
185
206
  */
186
- type: 'sort_code';
207
+ iban: string;
208
+
209
+ /**
210
+ * Discriminator for IBAN financial address.
211
+ */
212
+ type: 'iban';
187
213
  }
188
214
 
189
- export interface AbaFinancialAddress {
215
+ export interface SortCodeFinancialAddress {
190
216
  /**
191
217
  * Name of the account holder.
192
218
  */
193
219
  account_holder_name: string;
194
220
 
195
221
  /**
196
- * Bank account number.
222
+ * UK account number (8 digits).
197
223
  */
198
224
  account_number: string;
199
225
 
200
226
  /**
201
- * ABA routing number (9 digits).
227
+ * UK sort code (6 digits).
202
228
  */
203
- routing_number: string;
229
+ sort_code: string;
204
230
 
205
231
  /**
206
- * Discriminator for ABA wire financial address.
232
+ * Discriminator for UK sort code financial address.
207
233
  */
208
- type: 'aba';
234
+ type: 'sort_code';
209
235
  }
210
236
 
211
237
  export interface BicFinancialAddress {
@@ -219,6 +245,11 @@ export namespace CounterpartyCreateResponse {
219
245
  */
220
246
  account_number: string;
221
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
+
222
253
  /**
223
254
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
224
255
  */
@@ -563,6 +594,11 @@ export interface CounterpartyRetrieveResponse {
563
594
  */
564
595
  date_of_birth: string | null;
565
596
 
597
+ /**
598
+ * Email address of the counterparty, or null if not recorded.
599
+ */
600
+ email: string | null;
601
+
566
602
  /**
567
603
  * Whether the counterparty is a business or an individual.
568
604
  */
@@ -572,9 +608,9 @@ export interface CounterpartyRetrieveResponse {
572
608
  * Financial address of the counterparty.
573
609
  */
574
610
  financial_address:
611
+ | CounterpartyRetrieveResponse.AbaFinancialAddress
575
612
  | CounterpartyRetrieveResponse.IbanFinancialAddress
576
613
  | CounterpartyRetrieveResponse.SortCodeFinancialAddress
577
- | CounterpartyRetrieveResponse.AbaFinancialAddress
578
614
  | CounterpartyRetrieveResponse.BicFinancialAddress
579
615
  | CounterpartyRetrieveResponse.CryptoWalletFinancialAddress;
580
616
 
@@ -584,6 +620,11 @@ export interface CounterpartyRetrieveResponse {
584
620
  */
585
621
  is_self_owned: boolean;
586
622
 
623
+ /**
624
+ * National tax or identity number of the counterparty, or null if not recorded.
625
+ */
626
+ legal_id: string | null;
627
+
587
628
  /**
588
629
  * Set of up to 50 key-value string pairs you can attach to store structured
589
630
  * information, such as correlating this resource with an object in your own
@@ -596,6 +637,11 @@ export interface CounterpartyRetrieveResponse {
596
637
  */
597
638
  name: string | null;
598
639
 
640
+ /**
641
+ * Phone number of the counterparty, or null if not recorded.
642
+ */
643
+ phone: string | null;
644
+
599
645
  /**
600
646
  * Physical address of the counterparty, or null if not recorded.
601
647
  */
@@ -608,70 +654,80 @@ export interface CounterpartyRetrieveResponse {
608
654
  }
609
655
 
610
656
  export namespace CounterpartyRetrieveResponse {
611
- export interface IbanFinancialAddress {
657
+ export interface AbaFinancialAddress {
612
658
  /**
613
659
  * Name of the account holder.
614
660
  */
615
661
  account_holder_name: string;
616
662
 
617
663
  /**
618
- * Bank Identifier Code, or null if not provided.
664
+ * Bank account number.
619
665
  */
620
- bic: string | null;
666
+ account_number: string;
621
667
 
622
668
  /**
623
- * International Bank Account Number.
669
+ * Whether the account is a checking or a savings account, or null if not provided.
624
670
  */
625
- iban: string;
671
+ account_type: 'checking' | 'savings' | null;
626
672
 
627
673
  /**
628
- * Discriminator for IBAN financial address.
674
+ * ABA routing number (9 digits).
629
675
  */
630
- type: 'iban';
676
+ routing_number: string;
677
+
678
+ /**
679
+ * Discriminator for ABA wire financial address.
680
+ */
681
+ type: 'aba';
631
682
  }
632
683
 
633
- export interface SortCodeFinancialAddress {
684
+ export interface IbanFinancialAddress {
634
685
  /**
635
686
  * Name of the account holder.
636
687
  */
637
688
  account_holder_name: string;
638
689
 
639
690
  /**
640
- * UK account number (8 digits).
691
+ * Whether the account is a checking or a savings account, or null if not provided.
641
692
  */
642
- account_number: string;
693
+ account_type: 'checking' | 'savings' | null;
643
694
 
644
695
  /**
645
- * UK sort code (6 digits).
696
+ * Bank Identifier Code, or null if not provided.
646
697
  */
647
- sort_code: string;
698
+ bic: string | null;
648
699
 
649
700
  /**
650
- * Discriminator for UK sort code financial address.
701
+ * International Bank Account Number.
651
702
  */
652
- type: 'sort_code';
703
+ iban: string;
704
+
705
+ /**
706
+ * Discriminator for IBAN financial address.
707
+ */
708
+ type: 'iban';
653
709
  }
654
710
 
655
- export interface AbaFinancialAddress {
711
+ export interface SortCodeFinancialAddress {
656
712
  /**
657
713
  * Name of the account holder.
658
714
  */
659
715
  account_holder_name: string;
660
716
 
661
717
  /**
662
- * Bank account number.
718
+ * UK account number (8 digits).
663
719
  */
664
720
  account_number: string;
665
721
 
666
722
  /**
667
- * ABA routing number (9 digits).
723
+ * UK sort code (6 digits).
668
724
  */
669
- routing_number: string;
725
+ sort_code: string;
670
726
 
671
727
  /**
672
- * Discriminator for ABA wire financial address.
728
+ * Discriminator for UK sort code financial address.
673
729
  */
674
- type: 'aba';
730
+ type: 'sort_code';
675
731
  }
676
732
 
677
733
  export interface BicFinancialAddress {
@@ -685,6 +741,11 @@ export namespace CounterpartyRetrieveResponse {
685
741
  */
686
742
  account_number: string;
687
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
+
688
749
  /**
689
750
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
690
751
  */
@@ -1029,6 +1090,11 @@ export interface CounterpartyUpdateResponse {
1029
1090
  */
1030
1091
  date_of_birth: string | null;
1031
1092
 
1093
+ /**
1094
+ * Email address of the counterparty, or null if not recorded.
1095
+ */
1096
+ email: string | null;
1097
+
1032
1098
  /**
1033
1099
  * Whether the counterparty is a business or an individual.
1034
1100
  */
@@ -1038,9 +1104,9 @@ export interface CounterpartyUpdateResponse {
1038
1104
  * Financial address of the counterparty.
1039
1105
  */
1040
1106
  financial_address:
1107
+ | CounterpartyUpdateResponse.AbaFinancialAddress
1041
1108
  | CounterpartyUpdateResponse.IbanFinancialAddress
1042
1109
  | CounterpartyUpdateResponse.SortCodeFinancialAddress
1043
- | CounterpartyUpdateResponse.AbaFinancialAddress
1044
1110
  | CounterpartyUpdateResponse.BicFinancialAddress
1045
1111
  | CounterpartyUpdateResponse.CryptoWalletFinancialAddress;
1046
1112
 
@@ -1050,6 +1116,11 @@ export interface CounterpartyUpdateResponse {
1050
1116
  */
1051
1117
  is_self_owned: boolean;
1052
1118
 
1119
+ /**
1120
+ * National tax or identity number of the counterparty, or null if not recorded.
1121
+ */
1122
+ legal_id: string | null;
1123
+
1053
1124
  /**
1054
1125
  * Set of up to 50 key-value string pairs you can attach to store structured
1055
1126
  * information, such as correlating this resource with an object in your own
@@ -1062,6 +1133,11 @@ export interface CounterpartyUpdateResponse {
1062
1133
  */
1063
1134
  name: string | null;
1064
1135
 
1136
+ /**
1137
+ * Phone number of the counterparty, or null if not recorded.
1138
+ */
1139
+ phone: string | null;
1140
+
1065
1141
  /**
1066
1142
  * Physical address of the counterparty, or null if not recorded.
1067
1143
  */
@@ -1074,70 +1150,80 @@ export interface CounterpartyUpdateResponse {
1074
1150
  }
1075
1151
 
1076
1152
  export namespace CounterpartyUpdateResponse {
1077
- export interface IbanFinancialAddress {
1153
+ export interface AbaFinancialAddress {
1078
1154
  /**
1079
1155
  * Name of the account holder.
1080
1156
  */
1081
1157
  account_holder_name: string;
1082
1158
 
1083
1159
  /**
1084
- * Bank Identifier Code, or null if not provided.
1160
+ * Bank account number.
1085
1161
  */
1086
- bic: string | null;
1162
+ account_number: string;
1087
1163
 
1088
1164
  /**
1089
- * International Bank Account Number.
1165
+ * Whether the account is a checking or a savings account, or null if not provided.
1090
1166
  */
1091
- iban: string;
1167
+ account_type: 'checking' | 'savings' | null;
1092
1168
 
1093
1169
  /**
1094
- * Discriminator for IBAN financial address.
1170
+ * ABA routing number (9 digits).
1095
1171
  */
1096
- type: 'iban';
1172
+ routing_number: string;
1173
+
1174
+ /**
1175
+ * Discriminator for ABA wire financial address.
1176
+ */
1177
+ type: 'aba';
1097
1178
  }
1098
1179
 
1099
- export interface SortCodeFinancialAddress {
1180
+ export interface IbanFinancialAddress {
1100
1181
  /**
1101
1182
  * Name of the account holder.
1102
1183
  */
1103
1184
  account_holder_name: string;
1104
1185
 
1105
1186
  /**
1106
- * UK account number (8 digits).
1187
+ * Whether the account is a checking or a savings account, or null if not provided.
1107
1188
  */
1108
- account_number: string;
1189
+ account_type: 'checking' | 'savings' | null;
1109
1190
 
1110
1191
  /**
1111
- * UK sort code (6 digits).
1192
+ * Bank Identifier Code, or null if not provided.
1112
1193
  */
1113
- sort_code: string;
1194
+ bic: string | null;
1114
1195
 
1115
1196
  /**
1116
- * Discriminator for UK sort code financial address.
1197
+ * International Bank Account Number.
1117
1198
  */
1118
- type: 'sort_code';
1199
+ iban: string;
1200
+
1201
+ /**
1202
+ * Discriminator for IBAN financial address.
1203
+ */
1204
+ type: 'iban';
1119
1205
  }
1120
1206
 
1121
- export interface AbaFinancialAddress {
1207
+ export interface SortCodeFinancialAddress {
1122
1208
  /**
1123
1209
  * Name of the account holder.
1124
1210
  */
1125
1211
  account_holder_name: string;
1126
1212
 
1127
1213
  /**
1128
- * Bank account number.
1214
+ * UK account number (8 digits).
1129
1215
  */
1130
1216
  account_number: string;
1131
1217
 
1132
1218
  /**
1133
- * ABA routing number (9 digits).
1219
+ * UK sort code (6 digits).
1134
1220
  */
1135
- routing_number: string;
1221
+ sort_code: string;
1136
1222
 
1137
1223
  /**
1138
- * Discriminator for ABA wire financial address.
1224
+ * Discriminator for UK sort code financial address.
1139
1225
  */
1140
- type: 'aba';
1226
+ type: 'sort_code';
1141
1227
  }
1142
1228
 
1143
1229
  export interface BicFinancialAddress {
@@ -1151,6 +1237,11 @@ export namespace CounterpartyUpdateResponse {
1151
1237
  */
1152
1238
  account_number: string;
1153
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
+
1154
1245
  /**
1155
1246
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
1156
1247
  */
@@ -1495,6 +1586,11 @@ export interface CounterpartyListResponse {
1495
1586
  */
1496
1587
  date_of_birth: string | null;
1497
1588
 
1589
+ /**
1590
+ * Email address of the counterparty, or null if not recorded.
1591
+ */
1592
+ email: string | null;
1593
+
1498
1594
  /**
1499
1595
  * Whether the counterparty is a business or an individual.
1500
1596
  */
@@ -1504,9 +1600,9 @@ export interface CounterpartyListResponse {
1504
1600
  * Financial address of the counterparty.
1505
1601
  */
1506
1602
  financial_address:
1603
+ | CounterpartyListResponse.AbaFinancialAddress
1507
1604
  | CounterpartyListResponse.IbanFinancialAddress
1508
1605
  | CounterpartyListResponse.SortCodeFinancialAddress
1509
- | CounterpartyListResponse.AbaFinancialAddress
1510
1606
  | CounterpartyListResponse.BicFinancialAddress
1511
1607
  | CounterpartyListResponse.CryptoWalletFinancialAddress;
1512
1608
 
@@ -1516,6 +1612,11 @@ export interface CounterpartyListResponse {
1516
1612
  */
1517
1613
  is_self_owned: boolean;
1518
1614
 
1615
+ /**
1616
+ * National tax or identity number of the counterparty, or null if not recorded.
1617
+ */
1618
+ legal_id: string | null;
1619
+
1519
1620
  /**
1520
1621
  * Set of up to 50 key-value string pairs you can attach to store structured
1521
1622
  * information, such as correlating this resource with an object in your own
@@ -1528,6 +1629,11 @@ export interface CounterpartyListResponse {
1528
1629
  */
1529
1630
  name: string | null;
1530
1631
 
1632
+ /**
1633
+ * Phone number of the counterparty, or null if not recorded.
1634
+ */
1635
+ phone: string | null;
1636
+
1531
1637
  /**
1532
1638
  * Physical address of the counterparty, or null if not recorded.
1533
1639
  */
@@ -1540,70 +1646,80 @@ export interface CounterpartyListResponse {
1540
1646
  }
1541
1647
 
1542
1648
  export namespace CounterpartyListResponse {
1543
- export interface IbanFinancialAddress {
1649
+ export interface AbaFinancialAddress {
1544
1650
  /**
1545
1651
  * Name of the account holder.
1546
1652
  */
1547
1653
  account_holder_name: string;
1548
1654
 
1549
1655
  /**
1550
- * Bank Identifier Code, or null if not provided.
1656
+ * Bank account number.
1551
1657
  */
1552
- bic: string | null;
1658
+ account_number: string;
1553
1659
 
1554
1660
  /**
1555
- * International Bank Account Number.
1661
+ * Whether the account is a checking or a savings account, or null if not provided.
1556
1662
  */
1557
- iban: string;
1663
+ account_type: 'checking' | 'savings' | null;
1558
1664
 
1559
1665
  /**
1560
- * Discriminator for IBAN financial address.
1666
+ * ABA routing number (9 digits).
1561
1667
  */
1562
- type: 'iban';
1668
+ routing_number: string;
1669
+
1670
+ /**
1671
+ * Discriminator for ABA wire financial address.
1672
+ */
1673
+ type: 'aba';
1563
1674
  }
1564
1675
 
1565
- export interface SortCodeFinancialAddress {
1676
+ export interface IbanFinancialAddress {
1566
1677
  /**
1567
1678
  * Name of the account holder.
1568
1679
  */
1569
1680
  account_holder_name: string;
1570
1681
 
1571
1682
  /**
1572
- * UK account number (8 digits).
1683
+ * Whether the account is a checking or a savings account, or null if not provided.
1573
1684
  */
1574
- account_number: string;
1685
+ account_type: 'checking' | 'savings' | null;
1575
1686
 
1576
1687
  /**
1577
- * UK sort code (6 digits).
1688
+ * Bank Identifier Code, or null if not provided.
1578
1689
  */
1579
- sort_code: string;
1690
+ bic: string | null;
1580
1691
 
1581
1692
  /**
1582
- * Discriminator for UK sort code financial address.
1693
+ * International Bank Account Number.
1583
1694
  */
1584
- type: 'sort_code';
1695
+ iban: string;
1696
+
1697
+ /**
1698
+ * Discriminator for IBAN financial address.
1699
+ */
1700
+ type: 'iban';
1585
1701
  }
1586
1702
 
1587
- export interface AbaFinancialAddress {
1703
+ export interface SortCodeFinancialAddress {
1588
1704
  /**
1589
1705
  * Name of the account holder.
1590
1706
  */
1591
1707
  account_holder_name: string;
1592
1708
 
1593
1709
  /**
1594
- * Bank account number.
1710
+ * UK account number (8 digits).
1595
1711
  */
1596
1712
  account_number: string;
1597
1713
 
1598
1714
  /**
1599
- * ABA routing number (9 digits).
1715
+ * UK sort code (6 digits).
1600
1716
  */
1601
- routing_number: string;
1717
+ sort_code: string;
1602
1718
 
1603
1719
  /**
1604
- * Discriminator for ABA wire financial address.
1720
+ * Discriminator for UK sort code financial address.
1605
1721
  */
1606
- type: 'aba';
1722
+ type: 'sort_code';
1607
1723
  }
1608
1724
 
1609
1725
  export interface BicFinancialAddress {
@@ -1617,6 +1733,11 @@ export namespace CounterpartyListResponse {
1617
1733
  */
1618
1734
  account_number: string;
1619
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
+
1620
1741
  /**
1621
1742
  * ISO 9362 Bank Identifier Code (8 or 11 characters).
1622
1743
  */
@@ -1950,9 +2071,9 @@ export interface CounterpartyCreateParams {
1950
2071
  * Financial address of the counterparty.
1951
2072
  */
1952
2073
  financial_address:
2074
+ | CounterpartyCreateParams.AbaFinancialAddressRequest
1953
2075
  | CounterpartyCreateParams.IbanFinancialAddressRequest
1954
2076
  | CounterpartyCreateParams.SortCodeFinancialAddressRequest
1955
- | CounterpartyCreateParams.AbaFinancialAddressRequest
1956
2077
  | CounterpartyCreateParams.BicFinancialAddressRequest
1957
2078
  | CounterpartyCreateParams.CryptoWalletFinancialAddress;
1958
2079
 
@@ -1961,6 +2082,12 @@ export interface CounterpartyCreateParams {
1961
2082
  */
1962
2083
  date_of_birth?: string;
1963
2084
 
2085
+ /**
2086
+ * Email address of the counterparty. Stored for operational contact only; it is
2087
+ * not sent with payments.
2088
+ */
2089
+ email?: string;
2090
+
1964
2091
  /**
1965
2092
  * Whether the counterparty is a business or an individual. Defaults to business.
1966
2093
  */
@@ -1972,6 +2099,13 @@ export interface CounterpartyCreateParams {
1972
2099
  */
1973
2100
  is_self_owned?: boolean;
1974
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;
2108
+
1975
2109
  /**
1976
2110
  * Set of up to 50 key-value string pairs you can attach to store structured
1977
2111
  * information, such as correlating this resource with an object in your own
@@ -1984,6 +2118,12 @@ export interface CounterpartyCreateParams {
1984
2118
  */
1985
2119
  name?: string;
1986
2120
 
2121
+ /**
2122
+ * Phone number of the counterparty. Stored for operational contact only; it is not
2123
+ * sent with payments.
2124
+ */
2125
+ phone?: string;
2126
+
1987
2127
  /**
1988
2128
  * Physical address of the counterparty.
1989
2129
  */
@@ -1991,70 +2131,86 @@ export interface CounterpartyCreateParams {
1991
2131
  }
1992
2132
 
1993
2133
  export namespace CounterpartyCreateParams {
1994
- export interface IbanFinancialAddressRequest {
2134
+ export interface AbaFinancialAddressRequest {
1995
2135
  /**
1996
2136
  * Name of the account holder.
1997
2137
  */
1998
2138
  account_holder_name: string;
1999
2139
 
2000
2140
  /**
2001
- * International Bank Account Number.
2141
+ * Bank account number.
2002
2142
  */
2003
- iban: string;
2143
+ account_number: string;
2004
2144
 
2005
2145
  /**
2006
- * Discriminator for IBAN financial address.
2146
+ * ABA routing number (9 digits).
2007
2147
  */
2008
- type: 'iban';
2148
+ routing_number: string;
2009
2149
 
2010
2150
  /**
2011
- * Bank Identifier Code. Optional; omit or send null if not provided.
2151
+ * Discriminator for ABA wire financial address.
2012
2152
  */
2013
- bic?: string | null;
2153
+ type: 'aba';
2154
+
2155
+ /**
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.
2160
+ */
2161
+ account_type?: 'checking' | 'savings' | null;
2014
2162
  }
2015
2163
 
2016
- export interface SortCodeFinancialAddressRequest {
2164
+ export interface IbanFinancialAddressRequest {
2017
2165
  /**
2018
2166
  * Name of the account holder.
2019
2167
  */
2020
2168
  account_holder_name: string;
2021
2169
 
2022
2170
  /**
2023
- * UK account number (8 digits).
2171
+ * International Bank Account Number.
2024
2172
  */
2025
- account_number: string;
2173
+ iban: string;
2026
2174
 
2027
2175
  /**
2028
- * UK sort code (6 digits).
2176
+ * Discriminator for IBAN financial address.
2029
2177
  */
2030
- sort_code: string;
2178
+ type: 'iban';
2031
2179
 
2032
2180
  /**
2033
- * Discriminator for UK sort code financial address.
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.
2034
2185
  */
2035
- type: 'sort_code';
2186
+ account_type?: 'checking' | 'savings' | null;
2187
+
2188
+ /**
2189
+ * Bank Identifier Code. Optional; omit or send null if not provided.
2190
+ */
2191
+ bic?: string | null;
2036
2192
  }
2037
2193
 
2038
- export interface AbaFinancialAddressRequest {
2194
+ export interface SortCodeFinancialAddressRequest {
2039
2195
  /**
2040
2196
  * Name of the account holder.
2041
2197
  */
2042
2198
  account_holder_name: string;
2043
2199
 
2044
2200
  /**
2045
- * Bank account number.
2201
+ * UK account number (8 digits).
2046
2202
  */
2047
2203
  account_number: string;
2048
2204
 
2049
2205
  /**
2050
- * ABA routing number (9 digits).
2206
+ * UK sort code (6 digits).
2051
2207
  */
2052
- routing_number: string;
2208
+ sort_code: string;
2053
2209
 
2054
2210
  /**
2055
- * Discriminator for ABA wire financial address.
2211
+ * Discriminator for UK sort code financial address.
2056
2212
  */
2057
- type: 'aba';
2213
+ type: 'sort_code';
2058
2214
  }
2059
2215
 
2060
2216
  export interface BicFinancialAddressRequest {
@@ -2078,6 +2234,14 @@ export namespace CounterpartyCreateParams {
2078
2234
  */
2079
2235
  type: 'bic';
2080
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
+
2081
2245
  /**
2082
2246
  * Domestic bank or branch code where the destination country uses one (for example
2083
2247
  * the BSB in Australia). Optional; omit or send null where the country has none.
@@ -2403,6 +2567,11 @@ export interface CounterpartyUpdateParams {
2403
2567
  */
2404
2568
  date_of_birth?: string | null;
2405
2569
 
2570
+ /**
2571
+ * New email address, or null to clear the current email address.
2572
+ */
2573
+ email?: string | null;
2574
+
2406
2575
  /**
2407
2576
  * New entity type. Omit to keep the current entity type.
2408
2577
  */
@@ -2413,11 +2582,21 @@ export interface CounterpartyUpdateParams {
2413
2582
  */
2414
2583
  is_self_owned?: boolean;
2415
2584
 
2585
+ /**
2586
+ * New legal identifier, or null to clear the current legal identifier.
2587
+ */
2588
+ legal_id?: string | null;
2589
+
2416
2590
  /**
2417
2591
  * New name, or null to clear the current name.
2418
2592
  */
2419
2593
  name?: string | null;
2420
2594
 
2595
+ /**
2596
+ * New phone number, or null to clear the current phone number.
2597
+ */
2598
+ phone?: string | null;
2599
+
2421
2600
  /**
2422
2601
  * New physical address, or null to clear the current physical address.
2423
2602
  */