squarefi-bff-api-module 1.36.88 → 1.36.90

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.
@@ -571,7 +571,116 @@ export interface paths {
571
571
  };
572
572
  };
573
573
  put?: never;
574
- post?: never;
574
+ /**
575
+ * Create destination
576
+ * @description counterparty_account_id is required in the body.
577
+ *
578
+ * **Banking types** (ACH, SWIFT, SEPA, CHAPS, FPS, FEDWIRE):
579
+ * banking_data: { account_number, routing_number, bank_name, swift_bic, iban, sort_code, note, address }
580
+ *
581
+ * **Crypto types** (CRYPTO_EXTERNAL, CRYPTO_INTERNAL):
582
+ * crypto_data: { address, currency_id, memo }
583
+ *
584
+ * **Internal type** (INTERNAL):
585
+ * internal_data: { wallet_id, description? } — receiver wallet on the same platform
586
+ *
587
+ */
588
+ post: {
589
+ parameters: {
590
+ query?: never;
591
+ header?: never;
592
+ path?: never;
593
+ cookie?: never;
594
+ };
595
+ requestBody: {
596
+ content: {
597
+ "application/json": {
598
+ /** Format: uuid */
599
+ counterparty_account_id: string;
600
+ /** @enum {string} */
601
+ type: "ACH" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
602
+ nickname?: string;
603
+ banking_data?: {
604
+ account_number?: string;
605
+ routing_number?: string;
606
+ bank_name?: string;
607
+ swift_bic?: string;
608
+ iban?: string;
609
+ /** @description Sort code (6 digits, UK banking) */
610
+ sort_code?: string;
611
+ note?: string;
612
+ address?: {
613
+ country_id?: number;
614
+ city?: string;
615
+ postcode?: string;
616
+ street1?: string;
617
+ street2?: string;
618
+ /** @description Required when the selected country has states; countries without states may omit it */
619
+ state_id?: number | null;
620
+ };
621
+ };
622
+ crypto_data?: {
623
+ address?: string;
624
+ /** Format: uuid */
625
+ currency_id?: string;
626
+ memo?: string;
627
+ /**
628
+ * @description Hosting classification of the address
629
+ * @default unknown
630
+ * @enum {string}
631
+ */
632
+ wallet_custody_type?: "custodial" | "selfhosted" | "unknown";
633
+ };
634
+ /** @description Required for type INTERNAL — points at the receiver wallet on the same platform. An account holds one INTERNAL destination per wallet; if it already has an active one to this wallet, that destination is returned instead of a new one. */
635
+ internal_data?: {
636
+ /**
637
+ * Format: uuid
638
+ * @description Target (receiver) wallet uuid on the same platform.
639
+ */
640
+ wallet_id: string;
641
+ /** @description Optional, reserved for future use. */
642
+ description?: string;
643
+ };
644
+ };
645
+ };
646
+ };
647
+ responses: {
648
+ /** @description Counterparty destination created */
649
+ 201: {
650
+ headers: {
651
+ [name: string]: unknown;
652
+ };
653
+ content: {
654
+ "application/json": {
655
+ /** @example true */
656
+ success?: boolean;
657
+ data?: {
658
+ destination?: components["schemas"]["CounterpartyDestination"];
659
+ /** @example Counterparty destination created successfully */
660
+ message?: string;
661
+ };
662
+ };
663
+ };
664
+ };
665
+ /** @description Validation error. Bank-details problems come as `VALIDATION_ERROR` with every problem in `error.details.issues` (`field`, `code`, `message`, optional `country` / `detected`).
666
+ *
667
+ * **Until 2026-10-12 00:00 UTC** the stricter bank-details rules (per-country IBAN checks, SEPA-zone IBAN, BIC details, ABA check digit, account formats) are reported by `POST /admin/counterparty/destinations/validate` but do not refuse this request; from then on they do.
668
+ * */
669
+ 400: {
670
+ headers: {
671
+ [name: string]: unknown;
672
+ };
673
+ content?: never;
674
+ };
675
+ /** @description Account not found */
676
+ 404: {
677
+ headers: {
678
+ [name: string]: unknown;
679
+ };
680
+ content?: never;
681
+ };
682
+ };
683
+ };
575
684
  delete?: never;
576
685
  options?: never;
577
686
  head?: never;
@@ -706,6 +815,76 @@ export interface paths {
706
815
  };
707
816
  trace?: never;
708
817
  };
818
+ "/admin/counterparty/destinations/validate": {
819
+ parameters: {
820
+ query?: never;
821
+ header?: never;
822
+ path?: never;
823
+ cookie?: never;
824
+ };
825
+ get?: never;
826
+ put?: never;
827
+ /**
828
+ * Validate destination details without saving
829
+ * @description Dry run of `POST /admin/counterparty/destinations`: the same body and the same checks — bank details per
830
+ * payment method, address completeness, location reference data, bank-country consistency — with nothing
831
+ * saved and no counterparty account needed. Answers `200` whether or not the details are valid;
832
+ * `valid: false` comes with every problem in `issues`.
833
+ *
834
+ * It always applies the strict bank-details rules, including before they start refusing creation on this
835
+ * surface (2026-10-12 00:00 UTC) — use it to find out what your integration sends that will be refused.
836
+ * Without an account it cannot tell whether an INTERNAL target wallet is active — creation still checks
837
+ * that. Rate limited to 60 requests per minute per tenant API key.
838
+ *
839
+ */
840
+ post: {
841
+ parameters: {
842
+ query?: never;
843
+ header?: never;
844
+ path?: never;
845
+ cookie?: never;
846
+ };
847
+ requestBody: {
848
+ content: {
849
+ "application/json": {
850
+ /** @enum {string} */
851
+ type: "ACH" | "RTP" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
852
+ /** @description Same shape as in `POST /admin/counterparty/destinations`. */
853
+ banking_data?: Record<string, never>;
854
+ crypto_data?: Record<string, never>;
855
+ internal_data?: Record<string, never>;
856
+ };
857
+ };
858
+ };
859
+ responses: {
860
+ /** @description Validation result */
861
+ 200: {
862
+ headers: {
863
+ [name: string]: unknown;
864
+ };
865
+ content: {
866
+ "application/json": {
867
+ /** @example true */
868
+ success?: boolean;
869
+ data?: components["schemas"]["DestinationValidationResult"];
870
+ };
871
+ };
872
+ };
873
+ /** @description Too many validation requests */
874
+ 429: {
875
+ headers: {
876
+ [name: string]: unknown;
877
+ };
878
+ content?: never;
879
+ };
880
+ };
881
+ };
882
+ delete?: never;
883
+ options?: never;
884
+ head?: never;
885
+ patch?: never;
886
+ trace?: never;
887
+ };
709
888
  "/admin/crypto_addresses/{wallet_id}": {
710
889
  parameters: {
711
890
  query?: never;
@@ -860,6 +1039,201 @@ export interface paths {
860
1039
  patch?: never;
861
1040
  trace?: never;
862
1041
  };
1042
+ "/admin/crypto_wallets/{wallet_id}": {
1043
+ parameters: {
1044
+ query?: never;
1045
+ header?: never;
1046
+ path?: never;
1047
+ cookie?: never;
1048
+ };
1049
+ /** List crypto wallets */
1050
+ get: {
1051
+ parameters: {
1052
+ query?: {
1053
+ /** @description Filter by exact external_id */
1054
+ external_id?: string;
1055
+ /** @description Search by name (case-insensitive, partial match) */
1056
+ name?: string;
1057
+ /** @description Filter by status (default active) */
1058
+ status?: "active" | "inactive";
1059
+ /** @description Filter wallets created after this date (ISO 8601) */
1060
+ created_after?: string;
1061
+ /** @description Filter wallets created before this date (ISO 8601) */
1062
+ created_before?: string;
1063
+ offset?: number;
1064
+ limit?: number;
1065
+ };
1066
+ header?: never;
1067
+ path: {
1068
+ wallet_id: string;
1069
+ };
1070
+ cookie?: never;
1071
+ };
1072
+ requestBody?: never;
1073
+ responses: {
1074
+ /** @description Crypto wallets listed */
1075
+ 200: {
1076
+ headers: {
1077
+ [name: string]: unknown;
1078
+ };
1079
+ content: {
1080
+ "application/json": {
1081
+ success?: boolean;
1082
+ data?: components["schemas"]["CryptoWalletListItem"][];
1083
+ pagination?: components["schemas"]["PaginationResponse"];
1084
+ };
1085
+ };
1086
+ };
1087
+ /** @description Wallet does not belong to tenant, or its KYC status does not allow the operation (`KYC_REQUIREMENTS_NOT_MET`) */
1088
+ 403: {
1089
+ headers: {
1090
+ [name: string]: unknown;
1091
+ };
1092
+ content: {
1093
+ "application/json": components["schemas"]["ErrorResponse"];
1094
+ };
1095
+ };
1096
+ /** @description Internal server error */
1097
+ 500: {
1098
+ headers: {
1099
+ [name: string]: unknown;
1100
+ };
1101
+ content: {
1102
+ "application/json": components["schemas"]["ErrorResponse"];
1103
+ };
1104
+ };
1105
+ };
1106
+ };
1107
+ put?: never;
1108
+ /** Create crypto wallet */
1109
+ post: {
1110
+ parameters: {
1111
+ query?: never;
1112
+ header?: never;
1113
+ path: {
1114
+ wallet_id: string;
1115
+ };
1116
+ cookie?: never;
1117
+ };
1118
+ requestBody: {
1119
+ content: {
1120
+ "application/json": {
1121
+ name: string;
1122
+ external_id?: string;
1123
+ /** @description Chain IDs to create addresses on. Omit or leave empty to create a wallet without addresses; the first address added later creates the custody-provider wallet. */
1124
+ chains?: number[];
1125
+ };
1126
+ };
1127
+ };
1128
+ responses: {
1129
+ /** @description Crypto wallet created */
1130
+ 201: {
1131
+ headers: {
1132
+ [name: string]: unknown;
1133
+ };
1134
+ content: {
1135
+ "application/json": {
1136
+ success?: boolean;
1137
+ data?: components["schemas"]["CryptoWallet"];
1138
+ message?: string;
1139
+ };
1140
+ };
1141
+ };
1142
+ /** @description Invalid request (missing name, invalid chains) */
1143
+ 400: {
1144
+ headers: {
1145
+ [name: string]: unknown;
1146
+ };
1147
+ content: {
1148
+ "application/json": components["schemas"]["ErrorResponse"];
1149
+ };
1150
+ };
1151
+ /** @description Wallet does not belong to tenant, or its KYC status does not allow the operation (`KYC_REQUIREMENTS_NOT_MET`) */
1152
+ 403: {
1153
+ headers: {
1154
+ [name: string]: unknown;
1155
+ };
1156
+ content: {
1157
+ "application/json": components["schemas"]["ErrorResponse"];
1158
+ };
1159
+ };
1160
+ /** @description external_id already exists for this tenant */
1161
+ 409: {
1162
+ headers: {
1163
+ [name: string]: unknown;
1164
+ };
1165
+ content: {
1166
+ "application/json": components["schemas"]["ErrorResponse"];
1167
+ };
1168
+ };
1169
+ };
1170
+ };
1171
+ delete?: never;
1172
+ options?: never;
1173
+ head?: never;
1174
+ patch?: never;
1175
+ trace?: never;
1176
+ };
1177
+ "/admin/crypto_wallets/{wallet_id}/addresses": {
1178
+ parameters: {
1179
+ query?: never;
1180
+ header?: never;
1181
+ path?: never;
1182
+ cookie?: never;
1183
+ };
1184
+ /** List crypto wallet addresses */
1185
+ get: {
1186
+ parameters: {
1187
+ query?: {
1188
+ /** @description Filter by chain ID */
1189
+ chain?: number;
1190
+ /** @description Filter by specific crypto wallet */
1191
+ crypto_wallet_id?: string;
1192
+ /** @description Search by address (case-insensitive, partial match) */
1193
+ address?: string;
1194
+ offset?: number;
1195
+ limit?: number;
1196
+ };
1197
+ header?: never;
1198
+ path: {
1199
+ wallet_id: string;
1200
+ };
1201
+ cookie?: never;
1202
+ };
1203
+ requestBody?: never;
1204
+ responses: {
1205
+ /** @description Addresses listed */
1206
+ 200: {
1207
+ headers: {
1208
+ [name: string]: unknown;
1209
+ };
1210
+ content: {
1211
+ "application/json": {
1212
+ success?: boolean;
1213
+ data?: components["schemas"]["CryptoWalletAddressListItem"][];
1214
+ pagination?: components["schemas"]["PaginationResponse"];
1215
+ };
1216
+ };
1217
+ };
1218
+ /** @description Wallet does not belong to tenant, or its KYC status does not allow the operation (`KYC_REQUIREMENTS_NOT_MET`) */
1219
+ 403: {
1220
+ headers: {
1221
+ [name: string]: unknown;
1222
+ };
1223
+ content: {
1224
+ "application/json": components["schemas"]["ErrorResponse"];
1225
+ };
1226
+ };
1227
+ };
1228
+ };
1229
+ put?: never;
1230
+ post?: never;
1231
+ delete?: never;
1232
+ options?: never;
1233
+ head?: never;
1234
+ patch?: never;
1235
+ trace?: never;
1236
+ };
863
1237
  "/admin/crypto_wallets/{wallet_id}/{crypto_wallet_id}": {
864
1238
  parameters: {
865
1239
  query?: never;
@@ -914,7 +1288,57 @@ export interface paths {
914
1288
  };
915
1289
  put?: never;
916
1290
  post?: never;
917
- delete?: never;
1291
+ /**
1292
+ * Delete crypto wallet
1293
+ * @description Soft-deletes a crypto wallet and archives it with the custody provider.
1294
+ * The wallet is marked as deleted and all addresses are deactivated.
1295
+ *
1296
+ */
1297
+ delete: {
1298
+ parameters: {
1299
+ query?: never;
1300
+ header?: never;
1301
+ path: {
1302
+ wallet_id: string;
1303
+ crypto_wallet_id: string;
1304
+ };
1305
+ cookie?: never;
1306
+ };
1307
+ requestBody?: never;
1308
+ responses: {
1309
+ /** @description Crypto wallet soft-deleted */
1310
+ 200: {
1311
+ headers: {
1312
+ [name: string]: unknown;
1313
+ };
1314
+ content: {
1315
+ "application/json": {
1316
+ success?: boolean;
1317
+ data?: components["schemas"]["CryptoWalletDeleteResponse"];
1318
+ message?: string;
1319
+ };
1320
+ };
1321
+ };
1322
+ /** @description Wallet does not belong to tenant, or its KYC status does not allow the operation (`KYC_REQUIREMENTS_NOT_MET`) */
1323
+ 403: {
1324
+ headers: {
1325
+ [name: string]: unknown;
1326
+ };
1327
+ content: {
1328
+ "application/json": components["schemas"]["ErrorResponse"];
1329
+ };
1330
+ };
1331
+ /** @description Crypto wallet not found */
1332
+ 404: {
1333
+ headers: {
1334
+ [name: string]: unknown;
1335
+ };
1336
+ content: {
1337
+ "application/json": components["schemas"]["ErrorResponse"];
1338
+ };
1339
+ };
1340
+ };
1341
+ };
918
1342
  options?: never;
919
1343
  head?: never;
920
1344
  patch?: never;
@@ -1164,46 +1588,11 @@ export interface paths {
1164
1588
  gov_id_country?: string;
1165
1589
  gov_id_type?: string;
1166
1590
  gov_id_number?: string;
1167
- /** @description URL to selfie image */
1168
- selfie_url?: string;
1169
- /** @description URL to government ID front image */
1170
- gov_id_front_url?: string;
1171
- /** @description URL to government ID back image */
1172
- gov_id_back_url?: string;
1173
- /** @description URL to hand-held government ID image */
1174
- gov_id_hand_hold_url?: string;
1175
- /** @description URL to proof of address document */
1176
- proof_of_address_url?: string;
1177
1591
  /** @description Type of proof of address document */
1178
1592
  proof_of_address_type?: string;
1179
- /** @description URL to formation document (business) */
1180
- formation_doc_url?: string;
1181
- /** @description URL to proof of ownership (business) */
1182
- proof_of_ownership_url?: string;
1183
1593
  certificate_of_registration_doc_type?: string;
1184
- /** @description URL to certificate of registration (business) */
1185
- certificate_of_registration_doc_url?: string;
1186
1594
  certificate_number?: string;
1187
- /** @description URL to business registration document */
1188
- business_registration_doc_url?: string;
1189
- /** @description URL to share structure document (business) */
1190
- share_structure_url?: string;
1191
- /** @description URL to constitution or annual report (business) */
1192
- constitution_or_annual_report_url?: string;
1193
- /** @description URL to articles of association (business) */
1194
- articles_of_association_url?: string;
1195
- /** @description URL to UBO declaration (business) */
1196
- ubo_declaration_url?: string;
1197
- /** @description URL to partnership minutes of meeting (business) */
1198
- partnership_mins_of_meeting_url?: string;
1199
- /** @description URL to partnership deed (business) */
1200
- partnership_deed_url?: string;
1201
- /** @description URL to certificate of incumbency (business) */
1202
- certificate_of_incumbency_url?: string;
1203
- /** @description URL to regulatory license (business) */
1204
- regulatory_license_url?: string;
1205
- /** @description URL to supplementary document */
1206
- supplementary_url?: string;
1595
+ documents?: components["schemas"]["KycDocumentsInput"];
1207
1596
  };
1208
1597
  };
1209
1598
  };
@@ -1371,27 +1760,10 @@ export interface paths {
1371
1760
  gov_id_country?: string;
1372
1761
  gov_id_type?: string;
1373
1762
  gov_id_number?: string;
1374
- selfie_url?: string;
1375
- gov_id_front_url?: string;
1376
- gov_id_back_url?: string;
1377
- gov_id_hand_hold_url?: string;
1378
- proof_of_address_url?: string;
1379
1763
  proof_of_address_type?: string;
1380
- formation_doc_url?: string;
1381
- proof_of_ownership_url?: string;
1382
1764
  certificate_of_registration_doc_type?: string;
1383
- certificate_of_registration_doc_url?: string;
1384
1765
  certificate_number?: string;
1385
- business_registration_doc_url?: string;
1386
- share_structure_url?: string;
1387
- constitution_or_annual_report_url?: string;
1388
- articles_of_association_url?: string;
1389
- ubo_declaration_url?: string;
1390
- partnership_mins_of_meeting_url?: string;
1391
- partnership_deed_url?: string;
1392
- certificate_of_incumbency_url?: string;
1393
- regulatory_license_url?: string;
1394
- supplementary_url?: string;
1766
+ documents?: components["schemas"]["KycDocumentsInput"];
1395
1767
  };
1396
1768
  };
1397
1769
  };
@@ -1427,6 +1799,82 @@ export interface paths {
1427
1799
  };
1428
1800
  trace?: never;
1429
1801
  };
1802
+ "/admin/kyc_entity/{entity_id}/documents/{document_id}": {
1803
+ parameters: {
1804
+ query?: never;
1805
+ header?: never;
1806
+ path?: never;
1807
+ cookie?: never;
1808
+ };
1809
+ get?: never;
1810
+ put?: never;
1811
+ post?: never;
1812
+ /**
1813
+ * Remove a KYC document
1814
+ * @description Removes one document of the KYC entity — or of one of its beneficial owners — by the `id`
1815
+ * it carries in `documents[]`. Allowed while the entity is in `UNVERIFIED` or `SOFT_REJECT`,
1816
+ * the same window as `PATCH`. Documents are added through `documents[]` of `POST` / `PATCH`.
1817
+ *
1818
+ */
1819
+ delete: {
1820
+ parameters: {
1821
+ query?: never;
1822
+ header?: never;
1823
+ path: {
1824
+ entity_id: string;
1825
+ /** @description The document `id` from `documents[]` */
1826
+ document_id: string;
1827
+ };
1828
+ cookie?: never;
1829
+ };
1830
+ requestBody?: never;
1831
+ responses: {
1832
+ /** @description Document removed */
1833
+ 200: {
1834
+ headers: {
1835
+ [name: string]: unknown;
1836
+ };
1837
+ content: {
1838
+ "application/json": {
1839
+ /** @example true */
1840
+ success?: boolean;
1841
+ data?: {
1842
+ /** Format: uuid */
1843
+ id?: string;
1844
+ /** @example formation_doc */
1845
+ type?: string;
1846
+ };
1847
+ };
1848
+ };
1849
+ };
1850
+ /** @description Entity not editable in its current status, or malformed id */
1851
+ 400: {
1852
+ headers: {
1853
+ [name: string]: unknown;
1854
+ };
1855
+ content?: never;
1856
+ };
1857
+ /** @description Entity does not belong to this tenant */
1858
+ 403: {
1859
+ headers: {
1860
+ [name: string]: unknown;
1861
+ };
1862
+ content?: never;
1863
+ };
1864
+ /** @description Entity or document not found */
1865
+ 404: {
1866
+ headers: {
1867
+ [name: string]: unknown;
1868
+ };
1869
+ content?: never;
1870
+ };
1871
+ };
1872
+ };
1873
+ options?: never;
1874
+ head?: never;
1875
+ patch?: never;
1876
+ trace?: never;
1877
+ };
1430
1878
  "/admin/kyc_entity/{entity_id}/submit": {
1431
1879
  parameters: {
1432
1880
  query?: never;
@@ -2250,7 +2698,7 @@ export interface paths {
2250
2698
  note?: string;
2251
2699
  /**
2252
2700
  * Format: date-time
2253
- * @description Optional. Schedule the transfer for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically.
2701
+ * @description Optional. Schedule the transfer for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically, once. If the balance does not cover it then, it fails with `scheduled_failure.code` INSUFFICIENT_FUNDS and is not retried. Approve at least 1 hour before scheduled_at.
2254
2702
  */
2255
2703
  scheduled_at?: string;
2256
2704
  documents?: Record<string, never>[];
@@ -2920,7 +3368,14 @@ export interface paths {
2920
3368
  * text operator, e.g. `[{"meta->>workflow_status":"PROCESSING"}]` or, to find an order by
2921
3369
  * your own reference, `[{"meta->>reference":"invoice-2026-04-001"}]`. Besides order columns
2922
3370
  * it accepts `mass_payout_id` (uuid), which narrows the result to the orders of one mass
2923
- * payout batch. Malformed JSON or a non-array value is rejected with 400.
3371
+ * payout batch, and `scheduled` — scheduled payments only: `all`, `upcoming` (approved and
3372
+ * waiting, `EXPECTED`) or `past` (any status but `NEW` and `EXPECTED`); it combines with
3373
+ * `status`. Malformed JSON or a non-array value is rejected with 400.
3374
+ *
3375
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
3376
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
3377
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
3378
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
2924
3379
  *
2925
3380
  * @example [{"status":"COMPLETE"}]
2926
3381
  */
@@ -2929,6 +3384,12 @@ export interface paths {
2929
3384
  date_from?: string;
2930
3385
  /** @description Orders created up to this date (inclusive), ISO 8601 */
2931
3386
  date_to?: string;
3387
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
3388
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
3389
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
3390
+ * `*`, `%`, `"` and `\` are ignored.
3391
+ * */
3392
+ search?: string;
2932
3393
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
2933
3394
  show_low_balance?: "true" | "false";
2934
3395
  };
@@ -2954,7 +3415,7 @@ export interface paths {
2954
3415
  };
2955
3416
  };
2956
3417
  };
2957
- /** @description Invalid `filters` (not a JSON array) or non-uuid `mass_payout_id` */
3418
+ /** @description Invalid `filters` (not a JSON array), non-uuid `mass_payout_id`, `scheduled` other than `all` / `upcoming` / `past`, or a filter with an unknown field or a value of the wrong type (`details.field` names it) */
2958
3419
  400: {
2959
3420
  headers: {
2960
3421
  [name: string]: unknown;
@@ -3123,6 +3584,9 @@ export interface paths {
3123
3584
  * status NEW can be approved. Orders
3124
3585
  * created with `scheduled_at` move to EXPECTED instead — no funds are
3125
3586
  * debited until execution at the requested time.
3587
+ * A scheduled order is approved only while its `scheduled_at` is at least
3588
+ * one hour away; a later approve answers 400 `SCHEDULED_AT_TOO_SOON`
3589
+ * (create the payment again with a new date).
3126
3590
  *
3127
3591
  */
3128
3592
  post: {
@@ -3150,7 +3614,7 @@ export interface paths {
3150
3614
  };
3151
3615
  };
3152
3616
  };
3153
- /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
3617
+ /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW), a scheduled order less than an hour before its `scheduled_at` (`SCHEDULED_AT_TOO_SOON`), or validation error */
3154
3618
  400: {
3155
3619
  headers: {
3156
3620
  [name: string]: unknown;
@@ -3583,7 +4047,10 @@ export interface paths {
3583
4047
  card_limit?: number | null;
3584
4048
  form_factor?: string | null;
3585
4049
  type?: string | null;
4050
+ /** @description At least one mobile wallet is supported; which ones — `digital_wallets` */
3586
4051
  tokenizable?: boolean | null;
4052
+ /** @description Mobile wallets cards of this program can be added to; empty when none. A program can support one without the other */
4053
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
3587
4054
  order_types?: string[] | null;
3588
4055
  kyc_rails?: {
3589
4056
  /** Format: uuid */
@@ -5205,13 +5672,14 @@ export interface paths {
5205
5672
  /**
5206
5673
  * Get wallet balance
5207
5674
  * @description Returns raw balance records with crypto metadata.
5208
- * Dust balances below `render_threshold` are hidden unless `show_low_balance=true`.
5675
+ * Dust balances — smaller than the currency threshold in absolute value — are hidden unless `show_low_balance=true`;
5676
+ * a negative balance (a debt) beyond the threshold is always returned.
5209
5677
  *
5210
5678
  */
5211
5679
  get: {
5212
5680
  parameters: {
5213
5681
  query?: {
5214
- /** @description When false (default), dust balances below threshold are hidden */
5682
+ /** @description When false (default), dust balances — smaller than the currency threshold in absolute value — are hidden */
5215
5683
  show_low_balance?: boolean;
5216
5684
  };
5217
5685
  header?: never;
@@ -5231,7 +5699,7 @@ export interface paths {
5231
5699
  "application/json": {
5232
5700
  /** @example true */
5233
5701
  success?: boolean;
5234
- /** @description Filtered by render_threshold unless show_low_balance=true; icon may be stripped from crypto.meta */
5702
+ /** @description Dust balances are left out unless show_low_balance=true; icon may be stripped from crypto.meta */
5235
5703
  data?: {
5236
5704
  /** Format: uuid */
5237
5705
  crypto_id?: string;
@@ -7011,6 +7479,12 @@ export interface paths {
7011
7479
  * @description Returns all active issuing programs available for the tenant.
7012
7480
  * Programs are enriched with group-level pricing and limits.
7013
7481
  *
7482
+ * Each program also publishes what a cardholder on it must carry
7483
+ * (`cardholder_requirements`): the KYC level, the required fields and
7484
+ * documents, and what each country changes. Read it before building the
7485
+ * cardholder form instead of hardcoding one — it can differ between
7486
+ * programs, and a sandbox program may ask for less than the production one.
7487
+ *
7014
7488
  */
7015
7489
  get: {
7016
7490
  parameters: {
@@ -7039,8 +7513,13 @@ export interface paths {
7039
7513
  /** @enum {string} */
7040
7514
  form_factor?: "virtual" | "physical" | "both";
7041
7515
  brand?: string;
7516
+ /** @description At least one mobile wallet is supported; which ones — `digital_wallets` */
7517
+ tokenizable?: boolean;
7518
+ /** @description Mobile wallets cards of this program can be added to; empty when none. A program can support one without the other */
7519
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
7042
7520
  issuing_price_usd?: number;
7043
7521
  initial_topup_usd?: number;
7522
+ cardholder_requirements?: components["schemas"]["CardholderRequirements"];
7044
7523
  }[];
7045
7524
  };
7046
7525
  };
@@ -7488,6 +7967,59 @@ export interface paths {
7488
7967
  export type webhooks = Record<string, never>;
7489
7968
  export interface components {
7490
7969
  schemas: {
7970
+ /** @description What a cardholder on this program must carry. Set per program in the vendor config, so it can change without a release — read it instead of hardcoding the form. */
7971
+ CardholderRequirements: {
7972
+ /**
7973
+ * @description Cumulative KYC level; each level includes the previous one
7974
+ * @enum {string}
7975
+ */
7976
+ level?: "minimal" | "basic" | "declared" | "full";
7977
+ /**
7978
+ * @description Required field names; address fields are dotted (address.line1). Some CONSUMER programs also list gov_id_issuance_date and gov_id_expiration_date (ISO YYYY-MM-DD).
7979
+ * @example [
7980
+ * "first_name",
7981
+ * "last_name",
7982
+ * "email",
7983
+ * "phone",
7984
+ * "birth_date",
7985
+ * "nationality"
7986
+ * ]
7987
+ */
7988
+ required?: string[];
7989
+ /** @description Documents that must be attached; empty below the full level */
7990
+ required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
7991
+ /** @description Human-readable constraints the field list cannot express — e.g. a CONSUMER program requiring tax_identification_number to be a valid SSN when nationality is USA. */
7992
+ notes?: string[];
7993
+ /** @description What each country changes, keyed by ISO 3166-1 alpha-3 with a `default` entry; empty when the vendor reviews nothing. These fields stay out of `required` because they only hold once the nationality or address country is known: read the rule for the nationality the user picked (required_by_nationality), the rule for the address country (required_by_address), and the rule for the country that issued the document (gov_id_types). */
7994
+ country_rules?: {
7995
+ [key: string]: {
7996
+ /**
7997
+ * @description gov_id_type values accepted for a document issued by this country
7998
+ * @example [
7999
+ * "passport",
8000
+ * "driving_license",
8001
+ * "id_card"
8002
+ * ]
8003
+ */
8004
+ gov_id_types?: string[];
8005
+ /**
8006
+ * @description Extra fields a person of this nationality must provide
8007
+ * @example [
8008
+ * "tax_identification_number"
8009
+ * ]
8010
+ */
8011
+ required_by_nationality?: string[];
8012
+ /**
8013
+ * @description Extra fields an address in this country must carry
8014
+ * @example [
8015
+ * "address.state"
8016
+ * ]
8017
+ */
8018
+ required_by_address?: string[];
8019
+ notes?: string[];
8020
+ };
8021
+ };
8022
+ };
7491
8023
  ErrorResponse: {
7492
8024
  /** @example false */
7493
8025
  success?: boolean;
@@ -7575,8 +8107,10 @@ export interface components {
7575
8107
  * @enum {string}
7576
8108
  */
7577
8109
  brand?: "VISA" | "MASTERCARD";
7578
- /** @description Whether card can be tokenized */
8110
+ /** @description Whether this card can be added to a mobile wallet; set when the card was issued. Which ones: `digital_wallets`. */
7579
8111
  tokenizable?: boolean;
8112
+ /** @description Mobile wallets this card can be added to: the wallets of the card's program, or none when the card's `tokenizable` is false. Left out when the program could not be read. */
8113
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
7580
8114
  /** @description Total spending cap/limit */
7581
8115
  spend_cap?: number;
7582
8116
  /** @description Total amount spent */
@@ -8256,6 +8790,35 @@ export interface components {
8256
8790
  crypto_data?: components["schemas"]["CryptoData"];
8257
8791
  internal_data?: components["schemas"]["CounterpartyInternalData"];
8258
8792
  counterparty_account?: components["schemas"]["CounterpartyAccountRef"];
8793
+ /** @description Banking destinations only: problems that make the stored bank details unpayable (an IBAN that fails its checks, an IBAN outside SEPA on a SEPA destination, a routing number that fails the ABA check). Non-empty means withdrawals to this destination are refused with `DESTINATION_INVALID` — details cannot be edited, so add a new destination. Empty for valid banking destinations; absent for crypto and internal ones. */
8794
+ validation_issues?: components["schemas"]["DestinationValidationIssue"][];
8795
+ };
8796
+ /** @description One problem with a destination payload. `field` is the request path of the offending value (`iban`, `routing_number`, `address.city`…); `message` is ready to show under that field. */
8797
+ DestinationValidationIssue: {
8798
+ /** @example iban */
8799
+ field: string;
8800
+ /**
8801
+ * @description Machine-readable reason. Bank details: `REQUIRED`, `IBAN_WRONG_FORMAT`, `IBAN_INVALID_CHARACTERS`, `IBAN_COUNTRY_NOT_SUPPORTED`, `IBAN_WRONG_LENGTH`, `IBAN_WRONG_BBAN_FORMAT`, `IBAN_WRONG_CHECKSUM`, `IBAN_WRONG_NATIONAL_CHECKSUM`, `IBAN_QR_NOT_ALLOWED`, `IBAN_NOT_SEPA`, `IBAN_BIC_COUNTRY_MISMATCH`, `BIC_WRONG_FORMAT`, `BIC_UNKNOWN_COUNTRY`, `BIC_TEST_CODE`, `ROUTING_NUMBER_INVALID`, `ACCOUNT_NUMBER_INVALID`, `SORT_CODE_INVALID`, `WRONG_IDENTIFIER_TYPE`, `INVALID_VALUE`; reference data: `BANK_COUNTRY_MISMATCH`, `VALIDATION_ERROR`; dry run only: `INVALID_TYPE`. New codes may be added — show `message` for an unknown one.
8802
+ * @example IBAN_NOT_SEPA
8803
+ */
8804
+ code: string;
8805
+ /** @example IBAN country AE is outside the SEPA zone — SEPA transfers cannot reach it */
8806
+ message: string;
8807
+ /**
8808
+ * @description ISO 3166-1 alpha-2 country the problem is about, when there is one
8809
+ * @example AE
8810
+ */
8811
+ country?: string;
8812
+ /**
8813
+ * @description For `WRONG_IDENTIFIER_TYPE`: what the value looks like (an IBAN typed into a US account-number field…)
8814
+ * @enum {string}
8815
+ */
8816
+ detected?: "IBAN" | "BIC" | "ROUTING_NUMBER";
8817
+ };
8818
+ DestinationValidationResult: {
8819
+ /** @description True when creating the destination with this payload would pass every check */
8820
+ valid: boolean;
8821
+ issues: components["schemas"]["DestinationValidationIssue"][];
8259
8822
  };
8260
8823
  /** @description Owning counterparty account, embedded on destination reads; absent on create/update. */
8261
8824
  CounterpartyAccountRef: {
@@ -8286,6 +8849,19 @@ export interface components {
8286
8849
  /** Format: date-time */
8287
8850
  updated_at?: string;
8288
8851
  };
8852
+ /** @description Documents to file for the KYC entity. Each entry is stored as a document of its type; an earlier document of the same type stays on record (several documents of one type are allowed). All entries of one request form one batch in the given order, so a multi-file document (e.g. the pages of a bank statement) is sent as several entries of the same type in one request. A document is removed through DELETE /admin/kyc_entity/{entity_id}/documents/{document_id}. */
8853
+ KycDocumentsInput: {
8854
+ /**
8855
+ * @description Document type: supplementary, gov_id_front, gov_id_back, gov_id_hand_hold, selfie, proof_of_address, auth_letter, formation_doc, proof_of_ownership, certificate_of_registration_doc, business_registration_doc, share_structure, constitution_or_annual_report, articles_of_association, ubo_declaration, partnership_mins_of_meeting, partnership_deed, certificate_of_incumbency, regulatory_license, state_registry_doc, good_standing_cert, business_proof_of_address, invoices, contracts, financial_statements, source_of_funds, business_bank_statement, source_of_wealth_ubo, customer_supplier_agreements.
8856
+ * @example formation_doc
8857
+ */
8858
+ type: string;
8859
+ /**
8860
+ * Format: uri
8861
+ * @description http(s) URL of the file.
8862
+ */
8863
+ link: string;
8864
+ }[];
8289
8865
  KycEntity: {
8290
8866
  /** Format: uuid */
8291
8867
  id?: string;
@@ -8325,48 +8901,134 @@ export interface components {
8325
8901
  gov_id_country?: string | null;
8326
8902
  gov_id_type?: string | null;
8327
8903
  gov_id_number?: string | null;
8328
- /** @description URL to selfie image */
8329
- selfie_url?: string | null;
8330
- /** @description URL to government ID front image */
8331
- gov_id_front_url?: string | null;
8332
- /** @description URL to government ID back image */
8333
- gov_id_back_url?: string | null;
8334
- /** @description URL to hand-held government ID image */
8335
- gov_id_hand_hold_url?: string | null;
8336
- /** @description URL to proof of address document */
8337
- proof_of_address_url?: string | null;
8904
+ /** @description Every KYC document of the entity and of its beneficial owners, oldest first. Several documents of one type may be on record; the current set of a type is its newest batch (files sent in one request share `batch_id`, ordered by `position`). The `*_url` fields below are deprecated copies of it. */
8905
+ documents?: {
8906
+ /** Format: uuid */
8907
+ id?: string;
8908
+ /**
8909
+ * @description Document type (see KycDocumentsInput for the list).
8910
+ * @example formation_doc
8911
+ */
8912
+ type?: string;
8913
+ /** Format: uri */
8914
+ link?: string;
8915
+ /**
8916
+ * Format: uuid
8917
+ * @description Beneficial owner the document belongs to; null for the entity itself.
8918
+ */
8919
+ ubo_id?: string | null;
8920
+ /**
8921
+ * @description Who filed the document: `admin_api` — this API, `panel` — an operator, `bff` — the client application, `kyc_provider` — received from the KYC provider, `backfill` — carried over from the former `*_url` fields.
8922
+ * @example admin_api
8923
+ * @enum {string}
8924
+ */
8925
+ source?: "admin_api" | "panel" | "bff" | "kyc_provider" | "backfill";
8926
+ /**
8927
+ * Format: uuid
8928
+ * @description Shared by the files sent in one request (one submission).
8929
+ */
8930
+ batch_id?: string;
8931
+ /** @description Order of the file within its batch, from 0. */
8932
+ position?: number;
8933
+ /** Format: date-time */
8934
+ created_at?: string;
8935
+ }[];
8936
+ /**
8937
+ * @deprecated
8938
+ * @description Deprecated — read `documents[]`. Link of the newest `selfie` document of the entity itself; null when there is none.
8939
+ */
8940
+ readonly selfie_url?: string | null;
8941
+ /**
8942
+ * @deprecated
8943
+ * @description Deprecated — read `documents[]`. Link of the newest `gov_id_front` document of the entity itself; null when there is none.
8944
+ */
8945
+ readonly gov_id_front_url?: string | null;
8946
+ /**
8947
+ * @deprecated
8948
+ * @description Deprecated — read `documents[]`. Link of the newest `gov_id_back` document of the entity itself; null when there is none.
8949
+ */
8950
+ readonly gov_id_back_url?: string | null;
8951
+ /**
8952
+ * @deprecated
8953
+ * @description Deprecated — read `documents[]`. Link of the newest `gov_id_hand_hold` document of the entity itself; null when there is none.
8954
+ */
8955
+ readonly gov_id_hand_hold_url?: string | null;
8956
+ /**
8957
+ * @deprecated
8958
+ * @description Deprecated — read `documents[]`. Link of the newest `proof_of_address` document of the entity itself; null when there is none.
8959
+ */
8960
+ readonly proof_of_address_url?: string | null;
8961
+ /**
8962
+ * @deprecated
8963
+ * @description Deprecated — read `documents[]`. Link of the newest `formation_doc` document of the entity itself; null when there is none.
8964
+ */
8965
+ readonly formation_doc_url?: string | null;
8966
+ /**
8967
+ * @deprecated
8968
+ * @description Deprecated — read `documents[]`. Link of the newest `proof_of_ownership` document of the entity itself; null when there is none.
8969
+ */
8970
+ readonly proof_of_ownership_url?: string | null;
8971
+ /**
8972
+ * @deprecated
8973
+ * @description Deprecated — read `documents[]`. Link of the newest `certificate_of_registration_doc` document of the entity itself; null when there is none.
8974
+ */
8975
+ readonly certificate_of_registration_doc_url?: string | null;
8976
+ /**
8977
+ * @deprecated
8978
+ * @description Deprecated — read `documents[]`. Link of the newest `business_registration_doc` document of the entity itself; null when there is none.
8979
+ */
8980
+ readonly business_registration_doc_url?: string | null;
8981
+ /**
8982
+ * @deprecated
8983
+ * @description Deprecated — read `documents[]`. Link of the newest `share_structure` document of the entity itself; null when there is none.
8984
+ */
8985
+ readonly share_structure_url?: string | null;
8986
+ /**
8987
+ * @deprecated
8988
+ * @description Deprecated — read `documents[]`. Link of the newest `constitution_or_annual_report` document of the entity itself; null when there is none.
8989
+ */
8990
+ readonly constitution_or_annual_report_url?: string | null;
8991
+ /**
8992
+ * @deprecated
8993
+ * @description Deprecated — read `documents[]`. Link of the newest `articles_of_association` document of the entity itself; null when there is none.
8994
+ */
8995
+ readonly articles_of_association_url?: string | null;
8996
+ /**
8997
+ * @deprecated
8998
+ * @description Deprecated — read `documents[]`. Link of the newest `ubo_declaration` document of the entity itself; null when there is none.
8999
+ */
9000
+ readonly ubo_declaration_url?: string | null;
9001
+ /**
9002
+ * @deprecated
9003
+ * @description Deprecated — read `documents[]`. Link of the newest `partnership_mins_of_meeting` document of the entity itself; null when there is none.
9004
+ */
9005
+ readonly partnership_mins_of_meeting_url?: string | null;
9006
+ /**
9007
+ * @deprecated
9008
+ * @description Deprecated — read `documents[]`. Link of the newest `partnership_deed` document of the entity itself; null when there is none.
9009
+ */
9010
+ readonly partnership_deed_url?: string | null;
9011
+ /**
9012
+ * @deprecated
9013
+ * @description Deprecated — read `documents[]`. Link of the newest `certificate_of_incumbency` document of the entity itself; null when there is none.
9014
+ */
9015
+ readonly certificate_of_incumbency_url?: string | null;
9016
+ /**
9017
+ * @deprecated
9018
+ * @description Deprecated — read `documents[]`. Link of the newest `regulatory_license` document of the entity itself; null when there is none.
9019
+ */
9020
+ readonly regulatory_license_url?: string | null;
9021
+ /**
9022
+ * @deprecated
9023
+ * @description Deprecated — read `documents[]`. Link of the newest `supplementary` document of the entity itself; null when there is none.
9024
+ */
9025
+ readonly supplementary_url?: string | null;
8338
9026
  /** @description Type of proof of address document */
8339
9027
  proof_of_address_type?: string | null;
8340
- /** @description URL to formation document (business) */
8341
- formation_doc_url?: string | null;
8342
- /** @description URL to proof of ownership document (business) */
8343
- proof_of_ownership_url?: string | null;
8344
9028
  /** @description Type of certificate of registration */
8345
9029
  certificate_of_registration_doc_type?: string | null;
8346
- /** @description URL to certificate of registration (business) */
8347
- certificate_of_registration_doc_url?: string | null;
8348
9030
  /** @description Certificate number (business) */
8349
9031
  certificate_number?: string | null;
8350
- /** @description URL to business registration document */
8351
- business_registration_doc_url?: string | null;
8352
- /** @description URL to share structure document (business) */
8353
- share_structure_url?: string | null;
8354
- /** @description URL to constitution or annual report (business) */
8355
- constitution_or_annual_report_url?: string | null;
8356
- /** @description URL to articles of association (business) */
8357
- articles_of_association_url?: string | null;
8358
- /** @description URL to UBO declaration (business) */
8359
- ubo_declaration_url?: string | null;
8360
- /** @description URL to partnership minutes of meeting (business) */
8361
- partnership_mins_of_meeting_url?: string | null;
8362
- /** @description URL to partnership deed (business) */
8363
- partnership_deed_url?: string | null;
8364
- /** @description URL to certificate of incumbency (business) */
8365
- certificate_of_incumbency_url?: string | null;
8366
- /** @description URL to regulatory license (business) */
8367
- regulatory_license_url?: string | null;
8368
- /** @description URL to supplementary document */
8369
- supplementary_url?: string | null;
8370
9032
  /** Format: uuid */
8371
9033
  kyc_address_id?: string | null;
8372
9034
  /** Format: uuid */
@@ -8666,7 +9328,7 @@ export interface components {
8666
9328
  note?: string;
8667
9329
  /**
8668
9330
  * Format: date-time
8669
- * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically.
9331
+ * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically, once: if the balance does not cover it then, it fails with `scheduled_failure.code` INSUFFICIENT_FUNDS and is not retried. Approve at least 1 hour before scheduled_at.
8670
9332
  */
8671
9333
  scheduled_at?: string;
8672
9334
  };
@@ -8695,7 +9357,7 @@ export interface components {
8695
9357
  note?: string;
8696
9358
  /**
8697
9359
  * Format: date-time
8698
- * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically.
9360
+ * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically, once: if the balance does not cover it then, it fails with `scheduled_failure.code` INSUFFICIENT_FUNDS and is not retried. Approve at least 1 hour before scheduled_at.
8699
9361
  */
8700
9362
  scheduled_at?: string;
8701
9363
  };
@@ -8752,6 +9414,16 @@ export interface components {
8752
9414
  * @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
8753
9415
  */
8754
9416
  scheduled_at?: string | null;
9417
+ /** @description Why a scheduled payment failed — set on a scheduled order in `FAILED`, null on any other scheduled order, absent on an immediate one. A scheduled payment is attempted once and never retried: `INSUFFICIENT_FUNDS` means nothing was debited and the payment can be created again; `PROVIDER_ERROR` — the payment was debited and the provider side failed; `EXECUTION_ERROR` — any other reason. */
9418
+ scheduled_failure?: {
9419
+ /** @enum {string} */
9420
+ code: "INSUFFICIENT_FUNDS" | "PROVIDER_ERROR" | "EXECUTION_ERROR";
9421
+ /**
9422
+ * @description Customer-facing text of the code.
9423
+ * @example The balance was insufficient at the scheduled time.
9424
+ */
9425
+ message: string;
9426
+ } | null;
8755
9427
  /** Format: date-time */
8756
9428
  created_at?: string;
8757
9429
  /** Format: date-time */