squarefi-bff-api-module 1.36.51 → 1.36.53

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.
@@ -10,7 +10,7 @@ export declare const frontend: {
10
10
  };
11
11
  issuing: {
12
12
  cards: {
13
- list: ({ status, ...params }?: API.Frontend.Issuing.Cards.List.Request) => Promise<API.Frontend.Issuing.Cards.List.Response>;
13
+ list: ({ status, ...params }: API.Frontend.Issuing.Cards.List.Request) => Promise<API.Frontend.Issuing.Cards.List.Response>;
14
14
  deposit: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Deposit.Request) => Promise<API.Frontend.Issuing.Cards.Deposit.Response>;
15
15
  withdraw: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Withdraw.Request) => Promise<API.Frontend.Issuing.Cards.Withdraw.Response>;
16
16
  getById: ({ card_id, }: API.Frontend.Issuing.Cards.Get.Request) => Promise<API.Frontend.Issuing.Cards.Get.Response>;
@@ -34,7 +34,7 @@ export declare const frontend: {
34
34
  create: (data: API.Frontend.Issuing.Cards.Create.Request) => Promise<API.Frontend.Issuing.Cards.Create.Response>;
35
35
  };
36
36
  cardholders: {
37
- list: (params?: API.Frontend.Issuing.Cardholders.List.Request) => Promise<API.Frontend.Issuing.Cardholders.List.Response>;
37
+ list: (params: API.Frontend.Issuing.Cardholders.List.Request) => Promise<API.Frontend.Issuing.Cardholders.List.Response>;
38
38
  create: (data: API.Frontend.Issuing.Cardholders.Create.Request) => Promise<API.Frontend.Issuing.Cardholders.Create.Response>;
39
39
  getById: ({ cardholder_id, ...params }: API.Frontend.Issuing.Cardholders.Get.Request) => Promise<API.Frontend.Issuing.Cardholders.Get.Response>;
40
40
  delete: ({ cardholder_id, ...params }: API.Frontend.Issuing.Cardholders.Delete.Request) => Promise<API.Frontend.Issuing.Cardholders.Delete.Response>;
@@ -48,7 +48,7 @@ export declare const frontend: {
48
48
  };
49
49
  };
50
50
  subAccounts: {
51
- getAll: (params?: API.Frontend.Issuing.SubAccounts.List.Request) => Promise<API.Frontend.Issuing.SubAccounts.List.Response>;
51
+ getAll: (params: API.Frontend.Issuing.SubAccounts.List.Request) => Promise<API.Frontend.Issuing.SubAccounts.List.Response>;
52
52
  getById: ({ sub_account_id, }: API.Frontend.Issuing.SubAccounts.Get.Request) => Promise<API.Frontend.Issuing.SubAccounts.Get.Response>;
53
53
  create: (data: API.Frontend.Issuing.SubAccounts.Create.Request) => Promise<API.Frontend.Issuing.SubAccounts.Create.Response>;
54
54
  transactions: ({ sub_account_id, ...params }: API.Frontend.Issuing.SubAccounts.Transactions.Request) => Promise<API.Frontend.Issuing.SubAccounts.Transactions.Response>;
@@ -18,7 +18,7 @@ export const frontend = {
18
18
  // `status` is a comma-separated list on the wire (`status=ACTIVE,FROZEN`). The spec types it as
19
19
  // an array, which axios would default-serialize to `status[]=ACTIVE&status[]=FROZEN` — a form
20
20
  // the endpoint does not parse — so join it here and keep the array in the public type.
21
- list: ({ status, ...params } = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/cards', {
21
+ list: ({ status, ...params }) => apiClientV1Frontend.getRequest('/frontend/issuing/cards', {
22
22
  params: status?.length ? { ...params, status: status.join(',') } : params,
23
23
  }),
24
24
  deposit: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/deposit`, { data }),
@@ -70,7 +70,7 @@ export const frontend = {
70
70
  // All write endpoints require the ADMIN role on the wallet; `wallet_id` travels as a query
71
71
  // parameter for access validation.
72
72
  cardholders: {
73
- list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/cardholders', { params }),
73
+ list: (params) => apiClientV1Frontend.getRequest('/frontend/issuing/cardholders', { params }),
74
74
  create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/cardholders', { data }),
75
75
  getById: ({ cardholder_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cardholders/${cardholder_id}`, { params }),
76
76
  delete: ({ cardholder_id, ...params }) => apiClientV1Frontend.deleteRequest(`/frontend/issuing/cardholders/${cardholder_id}`, { params }),
@@ -111,7 +111,7 @@ export const frontend = {
111
111
  // Local-first list (`fiat_accounts` + computed balances + the program embed with its
112
112
  // cardholder KYC bar). `ids` (comma-separated) makes it a targeted read of specific
113
113
  // sub-accounts — prefer that over `getById`, whose shape varies with the vendor.
114
- getAll: (params = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/sub-accounts', { params }),
114
+ getAll: (params) => apiClientV1Frontend.getRequest('/frontend/issuing/sub-accounts', { params }),
115
115
  getById: ({ sub_account_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}`),
116
116
  create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/sub-accounts', { data }),
117
117
  transactions: ({ sub_account_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/transactions`, { params }),
@@ -7,6 +7,7 @@ import { frontend } from './frontend';
7
7
  import { issuing } from './issuing';
8
8
  import { kyc } from './kyc';
9
9
  import { list } from './list';
10
+ import { massPayouts } from './mass-payouts';
10
11
  import { orders } from './orders';
11
12
  import { referrals } from './referrals';
12
13
  import { statements } from './statements';
@@ -26,6 +27,7 @@ type Api = {
26
27
  issuing: typeof issuing;
27
28
  kyc: typeof kyc;
28
29
  list: typeof list;
30
+ massPayouts: typeof massPayouts;
29
31
  orders: typeof orders;
30
32
  referrals: typeof referrals;
31
33
  statements: typeof statements;
package/dist/api/index.js CHANGED
@@ -7,6 +7,7 @@ import { frontend } from './frontend';
7
7
  import { issuing } from './issuing';
8
8
  import { kyc } from './kyc';
9
9
  import { list } from './list';
10
+ import { massPayouts } from './mass-payouts';
10
11
  import { orders } from './orders';
11
12
  import { referrals } from './referrals';
12
13
  import { statements } from './statements';
@@ -26,6 +27,7 @@ export const squarefi_bff_api_client = {
26
27
  issuing,
27
28
  kyc,
28
29
  list,
30
+ massPayouts,
29
31
  orders,
30
32
  referrals,
31
33
  statements,
@@ -0,0 +1,29 @@
1
+ import { API } from './types/types';
2
+ /**
3
+ * Mass payouts (SFI-1528). Every endpoint is scoped by the source `wallet_id` and requires an
4
+ * administrative role on that wallet. The lifecycle is DRAFT -> (edit/preview) -> submit ->
5
+ * approve; nothing moves until approval, and `templates.*` are reusable recipient lists a draft
6
+ * can be seeded from.
7
+ *
8
+ * `list` / `items` filter by a single status value (not an array), so they need none of the
9
+ * comma-joining the issuing list endpoints do.
10
+ */
11
+ export declare const massPayouts: {
12
+ list: ({ wallet_id, ...params }: API.MassPayouts.List.Request) => Promise<API.MassPayouts.List.Response>;
13
+ create: ({ wallet_id, ...data }: API.MassPayouts.Create.Request) => Promise<API.MassPayouts.Create.Response>;
14
+ getById: ({ wallet_id, id }: API.MassPayouts.GetById.Request) => Promise<API.MassPayouts.GetById.Response>;
15
+ update: ({ wallet_id, id, ...data }: API.MassPayouts.Update.Request) => Promise<API.MassPayouts.Update.Response>;
16
+ items: ({ wallet_id, id, ...params }: API.MassPayouts.Items.Request) => Promise<API.MassPayouts.Items.Response>;
17
+ preview: ({ wallet_id, id }: API.MassPayouts.Preview.Request) => Promise<API.MassPayouts.Preview.Response>;
18
+ submit: ({ wallet_id, id }: API.MassPayouts.Submit.Request) => Promise<API.MassPayouts.Submit.Response>;
19
+ approve: ({ wallet_id, id }: API.MassPayouts.Approve.Request) => Promise<API.MassPayouts.Approve.Response>;
20
+ cancel: ({ wallet_id, id }: API.MassPayouts.Cancel.Request) => Promise<API.MassPayouts.Cancel.Response>;
21
+ reportCsv: ({ wallet_id, id }: API.MassPayouts.ReportCsv.Request) => Promise<API.MassPayouts.ReportCsv.Response>;
22
+ templates: {
23
+ list: ({ wallet_id, ...params }: API.MassPayouts.Templates.List.Request) => Promise<API.MassPayouts.Templates.List.Response>;
24
+ create: ({ wallet_id, ...data }: API.MassPayouts.Templates.Create.Request) => Promise<API.MassPayouts.Templates.Create.Response>;
25
+ getById: ({ wallet_id, template_id, }: API.MassPayouts.Templates.GetById.Request) => Promise<API.MassPayouts.Templates.GetById.Response>;
26
+ update: ({ wallet_id, template_id, ...data }: API.MassPayouts.Templates.Update.Request) => Promise<API.MassPayouts.Templates.Update.Response>;
27
+ delete: ({ wallet_id, template_id, }: API.MassPayouts.Templates.Delete.Request) => Promise<API.MassPayouts.Templates.Delete.Response>;
28
+ };
29
+ };
@@ -0,0 +1,40 @@
1
+ import { apiClientV1Frontend } from '../utils/apiClientFactory';
2
+ /**
3
+ * Mass payouts (SFI-1528). Every endpoint is scoped by the source `wallet_id` and requires an
4
+ * administrative role on that wallet. The lifecycle is DRAFT -> (edit/preview) -> submit ->
5
+ * approve; nothing moves until approval, and `templates.*` are reusable recipient lists a draft
6
+ * can be seeded from.
7
+ *
8
+ * `list` / `items` filter by a single status value (not an array), so they need none of the
9
+ * comma-joining the issuing list endpoints do.
10
+ */
11
+ export const massPayouts = {
12
+ list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}`, { params }),
13
+ create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}`, { data }),
14
+ getById: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}`),
15
+ // Draft-only. `items` fully replaces the recipient list; `virtual_account_id: null` clears the
16
+ // source virtual account and `scheduled_at: null` drops the schedule.
17
+ update: ({ wallet_id, id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/mass-payouts/${wallet_id}/${id}`, {
18
+ data,
19
+ }),
20
+ items: ({ wallet_id, id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/items`, {
21
+ params,
22
+ }),
23
+ preview: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/preview`),
24
+ submit: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/submit`),
25
+ approve: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/approve`),
26
+ cancel: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/cancel`),
27
+ // `text/csv`, not the JSON envelope — the raw CSV body is resolved as a string. `responseType`
28
+ // is the repo's mechanism for non-JSON answers (see `statements.pdfByWalletUuid`); this one
29
+ // stays on the axios frontend client rather than the native fetch one because the fetch client
30
+ // has no Bearer variant and no 401-refresh, which every other `/frontend/*` call relies on.
31
+ reportCsv: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/report.csv`, { responseType: 'text' }),
32
+ templates: {
33
+ list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/templates`, { params }),
34
+ create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/templates`, { data }),
35
+ getById: ({ wallet_id, template_id, }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`),
36
+ // `items` fully replaces the row list; `virtual_account_id: null` clears the source account.
37
+ update: ({ wallet_id, template_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`, { data }),
38
+ delete: ({ wallet_id, template_id, }) => apiClientV1Frontend.deleteRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`),
39
+ },
40
+ };
@@ -1963,7 +1963,8 @@ export interface paths {
1963
1963
  };
1964
1964
  };
1965
1965
  };
1966
- /** @description Bad Request - Missing required fields */
1966
+ /** @description Bad Request — missing/invalid fields, or a `user_data_id` precondition not met (user not verified, no KYC applicant, or the applicant is unknown to the KYC provider). Code `INVALID_REQUEST`; the message names the failed precondition.
1967
+ * */
1967
1968
  400: {
1968
1969
  headers: {
1969
1970
  [name: string]: unknown;
@@ -2009,6 +2010,16 @@ export interface paths {
2009
2010
  "application/json": components["schemas"]["ApiErrorResponse"];
2010
2011
  };
2011
2012
  };
2013
+ /** @description The KYC provider failed while the dossier was being pulled for `user_data_id` (code `EXTERNAL_SERVICE_ERROR`). Retry later; the draft was not created.
2014
+ * */
2015
+ 502: {
2016
+ headers: {
2017
+ [name: string]: unknown;
2018
+ };
2019
+ content: {
2020
+ "application/json": components["schemas"]["ApiErrorResponse"];
2021
+ };
2022
+ };
2012
2023
  };
2013
2024
  };
2014
2025
  delete?: never;
@@ -2155,7 +2166,120 @@ export interface paths {
2155
2166
  };
2156
2167
  options?: never;
2157
2168
  head?: never;
2158
- patch?: never;
2169
+ /**
2170
+ * Update cardholder
2171
+ * @description Updates cardholder information (local row + vendor propagation of personal fields).
2172
+ * Same contract as `PATCH /frontend/issuing/cardholders/{cardholder_id}`.
2173
+ *
2174
+ * **Authentication**: x-api-key header required
2175
+ *
2176
+ * **Access Control**: Cardholder must belong to the authenticated wallet
2177
+ *
2178
+ */
2179
+ patch: {
2180
+ parameters: {
2181
+ query?: {
2182
+ /** @description Wallet ID (required for non-wallet-bound API keys) */
2183
+ wallet_id?: string;
2184
+ };
2185
+ header?: never;
2186
+ path: {
2187
+ /** @description The ID of the cardholder to update */
2188
+ cardholder_id: string;
2189
+ };
2190
+ cookie?: never;
2191
+ };
2192
+ requestBody: {
2193
+ content: {
2194
+ "application/json": {
2195
+ /** @description Cardholder's first name */
2196
+ first_name?: string;
2197
+ /** @description Cardholder's last name */
2198
+ last_name?: string;
2199
+ /**
2200
+ * Format: email
2201
+ * @description Cardholder's email address
2202
+ */
2203
+ email?: string;
2204
+ /** @description Cardholder's phone number */
2205
+ phone?: string;
2206
+ /**
2207
+ * @description Cardholder's nationality as ISO 3166-1 alpha-3 country code
2208
+ * @example USA
2209
+ */
2210
+ nationality?: string;
2211
+ /** @enum {string} */
2212
+ gender?: "M" | "F";
2213
+ /** @enum {string} */
2214
+ cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
2215
+ /** @enum {string} */
2216
+ gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
2217
+ /** @description Identity document number (passport / driving licence / national ID). */
2218
+ gov_id_number?: string;
2219
+ /** @description 2-3 letter uppercase country code */
2220
+ gov_id_country?: string;
2221
+ /** Format: date */
2222
+ gov_id_issuance_date?: string;
2223
+ /** Format: date */
2224
+ gov_id_expiration_date?: string;
2225
+ /** @description Tax identifier (USA + Interlace CONSUMER: SSN, 9 digits or XXX-XX-XXXX) */
2226
+ tax_identification_number?: string;
2227
+ address?: {
2228
+ line1?: string;
2229
+ line2?: string;
2230
+ city?: string;
2231
+ state?: string;
2232
+ postal_code?: string;
2233
+ country?: string;
2234
+ };
2235
+ };
2236
+ };
2237
+ };
2238
+ responses: {
2239
+ /** @description Cardholder updated successfully */
2240
+ 200: {
2241
+ headers: {
2242
+ [name: string]: unknown;
2243
+ };
2244
+ content: {
2245
+ "application/json": {
2246
+ /** @example true */
2247
+ success?: boolean;
2248
+ data?: components["schemas"]["Cardholder"];
2249
+ /** @example Cardholder updated successfully */
2250
+ message?: string;
2251
+ };
2252
+ };
2253
+ };
2254
+ /** @description Invalid request parameters */
2255
+ 400: {
2256
+ headers: {
2257
+ [name: string]: unknown;
2258
+ };
2259
+ content: {
2260
+ "application/json": components["schemas"]["ApiErrorResponse"];
2261
+ };
2262
+ };
2263
+ /** @description Access denied to this cardholder */
2264
+ 403: {
2265
+ headers: {
2266
+ [name: string]: unknown;
2267
+ };
2268
+ content: {
2269
+ "application/json": components["schemas"]["ApiErrorResponse"];
2270
+ };
2271
+ };
2272
+ /** @description Cardholder not found */
2273
+ 404: {
2274
+ headers: {
2275
+ [name: string]: unknown;
2276
+ };
2277
+ content: {
2278
+ "application/json": components["schemas"]["ApiErrorResponse"];
2279
+ };
2280
+ };
2281
+ };
2282
+ };
2159
2283
  trace?: never;
2160
2284
  };
2161
2285
  "/api/issuing/cardholders/{cardholder_id}/documents": {
@@ -4112,6 +4236,8 @@ export interface paths {
4112
4236
  * - Missing required fields
4113
4237
  * - Invalid reference_id format
4114
4238
  * - Invalid amount (must be positive number)
4239
+ * - `TOPUP_BELOW_MINIMUM` — credited amount is below the program's
4240
+ * `min_topup` threshold (`error.details.min_topup`, program currency)
4115
4241
  * */
4116
4242
  400: {
4117
4243
  headers: {
@@ -4518,7 +4644,7 @@ export interface paths {
4518
4644
  };
4519
4645
  };
4520
4646
  };
4521
- /** @description Validation error (insufficient balance, virtual account missing, etc.) */
4647
+ /** @description Validation error — invalid body, pair disabled by the exchange config, or calculated amount too small. Balance is checked only at approve. */
4522
4648
  400: {
4523
4649
  headers: {
4524
4650
  [name: string]: unknown;
@@ -4774,7 +4900,7 @@ export interface paths {
4774
4900
  };
4775
4901
  /**
4776
4902
  * Get order
4777
- * @description Retrieves a specific order by its numeric ID.
4903
+ * @description Retrieves a specific order by its `id` (UUID; equal to `order_uuid` for orders created by the current flow).
4778
4904
  *
4779
4905
  * **Authentication**: x-api-key header required
4780
4906
  *
@@ -4784,7 +4910,7 @@ export interface paths {
4784
4910
  query?: never;
4785
4911
  header?: never;
4786
4912
  path: {
4787
- order_id: number;
4913
+ order_id: string;
4788
4914
  };
4789
4915
  cookie?: never;
4790
4916
  };
@@ -4835,8 +4961,10 @@ export interface paths {
4835
4961
  * debits the funds (transaction written as `complete`) and triggers the
4836
4962
  * order execution pipeline. Exchange orders (EXCHANGE_OMNI) and internal
4837
4963
  * transfers (TRANSFER_INTERNAL / OMNIBUS_INTERNAL_TRANSFER) settle
4838
- * synchronously and land in COMPLETE. An insufficient balance fails the
4839
- * order (FAILED). Only orders with status NEW can be approved. Orders
4964
+ * synchronously and land in COMPLETE. An insufficient balance answers
4965
+ * 400 `INSUFFICIENT_FUNDS` and releases the order back to NEW; FAILED is
4966
+ * reached only when a step after the debit fails. Only orders with
4967
+ * status NEW can be approved. Orders
4840
4968
  * created with `scheduled_at` move to EXPECTED instead — no funds are
4841
4969
  * debited until execution at the requested time.
4842
4970
  *
@@ -4853,7 +4981,7 @@ export interface paths {
4853
4981
  };
4854
4982
  requestBody?: never;
4855
4983
  responses: {
4856
- /** @description Order approved and processing started */
4984
+ /** @description Order approved — PROCESSING for workflow rails, COMPLETE for exchange / internal transfers, EXPECTED for scheduled orders */
4857
4985
  200: {
4858
4986
  headers: {
4859
4987
  [name: string]: unknown;
@@ -4863,11 +4991,23 @@ export interface paths {
4863
4991
  /** @example true */
4864
4992
  success?: boolean;
4865
4993
  data?: components["schemas"]["Order"];
4866
- /** @example Order approved and processing started */
4867
- message?: string;
4868
4994
  };
4869
4995
  };
4870
4996
  };
4997
+ /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
4998
+ 400: {
4999
+ headers: {
5000
+ [name: string]: unknown;
5001
+ };
5002
+ content?: never;
5003
+ };
5004
+ /** @description Order does not belong to the API key's wallet */
5005
+ 403: {
5006
+ headers: {
5007
+ [name: string]: unknown;
5008
+ };
5009
+ content?: never;
5010
+ };
4871
5011
  /** @description Order not found */
4872
5012
  404: {
4873
5013
  headers: {
@@ -4875,7 +5015,7 @@ export interface paths {
4875
5015
  };
4876
5016
  content?: never;
4877
5017
  };
4878
- /** @description Invalid status transition (order is not in NEW status) */
5018
+ /** @description Order is not in an approvable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
4879
5019
  409: {
4880
5020
  headers: {
4881
5021
  [name: string]: unknown;
@@ -4885,7 +5025,7 @@ export interface paths {
4885
5025
  /** @example false */
4886
5026
  success?: boolean;
4887
5027
  error?: {
4888
- /** @example INVALID_STATUS_TRANSITION */
5028
+ /** @example INVALID_STATE */
4889
5029
  code?: string;
4890
5030
  message?: string;
4891
5031
  };
@@ -4952,11 +5092,16 @@ export interface paths {
4952
5092
  /** @example true */
4953
5093
  success?: boolean;
4954
5094
  data?: components["schemas"]["Order"];
4955
- /** @example Order canceled successfully */
4956
- message?: string;
4957
5095
  };
4958
5096
  };
4959
5097
  };
5098
+ /** @description Order does not belong to the API key's wallet */
5099
+ 403: {
5100
+ headers: {
5101
+ [name: string]: unknown;
5102
+ };
5103
+ content?: never;
5104
+ };
4960
5105
  /** @description Order not found */
4961
5106
  404: {
4962
5107
  headers: {
@@ -4964,7 +5109,7 @@ export interface paths {
4964
5109
  };
4965
5110
  content?: never;
4966
5111
  };
4967
- /** @description Invalid status transition */
5112
+ /** @description Order is not in a cancelable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
4968
5113
  409: {
4969
5114
  headers: {
4970
5115
  [name: string]: unknown;
@@ -5110,7 +5255,7 @@ export interface paths {
5110
5255
  /**
5111
5256
  * Crypto
5112
5257
  * @description Sends crypto from the wallet's omnibus balance to an external blockchain
5113
- * address (or another internal wallet) via a previously-created counterparty
5258
+ * address via a previously-created counterparty
5114
5259
  * destination.
5115
5260
  *
5116
5261
  * Two-phase: the order is created in `NEW` status without touching the
@@ -5121,7 +5266,7 @@ export interface paths {
5121
5266
  * only through the internal transfer endpoint.
5122
5267
  *
5123
5268
  * **Prerequisites:**
5124
- * - A counterparty destination of type `CRYPTO_EXTERNAL` or `CRYPTO_INTERNAL`
5269
+ * - A counterparty destination of type `CRYPTO_EXTERNAL`
5125
5270
  * created via `POST /api/counterparty/destinations`.
5126
5271
  * - Sufficient balance in `from_currency_id` at approve time on the wallet
5127
5272
  * bound to the API key.
@@ -5214,8 +5359,8 @@ export interface paths {
5214
5359
  * @description USD domestic Wire offramp. Funds are debited from the wallet's virtual account
5215
5360
  * and sent to the bank counterparty destination.
5216
5361
  *
5217
- * `wallet_id` is resolved from the API key. `virtual_account_id` may be
5218
- * auto-resolved when omitted.
5362
+ * `wallet_id` is resolved from the API key. `virtual_account_id` is
5363
+ * required (there is no auto-resolution).
5219
5364
  *
5220
5365
  */
5221
5366
  post: {
@@ -5301,8 +5446,8 @@ export interface paths {
5301
5446
  * ACH
5302
5447
  * @description USD ACH offramp. Cheaper than Wire but slower (T+1..T+2 business days).
5303
5448
  *
5304
- * `wallet_id` is resolved from the API key. `virtual_account_id` may be
5305
- * auto-resolved when omitted.
5449
+ * `wallet_id` is resolved from the API key. `virtual_account_id` is
5450
+ * required (there is no auto-resolution).
5306
5451
  *
5307
5452
  */
5308
5453
  post: {
@@ -5387,7 +5532,7 @@ export interface paths {
5387
5532
  /**
5388
5533
  * SEPA
5389
5534
  * @description EUR SEPA offramp (SEPA / SEPA Instant depending on counterparty support).
5390
- * The counterparty destination must be of type `BANK_SEPA`.
5535
+ * The counterparty destination must be of type `SEPA`.
5391
5536
  *
5392
5537
  */
5393
5538
  post: {
@@ -6942,7 +7087,7 @@ export type webhooks = Record<string, never>;
6942
7087
  export interface components {
6943
7088
  schemas: {
6944
7089
  /**
6945
- * @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `L2F_SWIFT_OFFRAMP` (SWIFT offramp), `OMNIBUS_CRYPTO_TRANSFER` (crypto withdrawal). Legacy `DEPOSIT_*`, `WITHDRAWAL_*` and `AUTO_CONVERT_CRYPTO` are intentionally excluded.
7090
+ * @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `BRL_WIRE_OFFRAMP` (wire offramp), `OMNIBUS_CRYPTO_TRANSFER` (crypto withdrawal). `L2F_*` ids are historical (rail retired) and cannot be used to create orders. Legacy `DEPOSIT_*`, `WITHDRAWAL_*` and `AUTO_CONVERT_CRYPTO` are intentionally excluded.
6946
7091
  * @example EXCHANGE_OMNI
6947
7092
  * @enum {string}
6948
7093
  */
@@ -7084,18 +7229,28 @@ export interface components {
7084
7229
  /** @description Per transaction amount spent */
7085
7230
  per_transaction_spent?: number;
7086
7231
  };
7087
- /** @description Sensitive card data */
7232
+ /** @description Sensitive card data, live-fetched from the vendor on every call and never persisted. */
7088
7233
  CardSensitiveData: {
7089
- /** @description Full card number */
7090
- card_number?: string;
7091
- /** @description Card security code */
7092
- cvv?: string;
7093
- /** @description Card expiration month (MM) */
7094
- expiry_month?: string;
7095
- /** @description Card expiration year (YYYY) */
7096
- expiry_year?: string;
7097
- /** @description Card PIN (if applicable) */
7098
- pin?: string;
7234
+ /**
7235
+ * @description Full card number
7236
+ * @example 4111111111111111
7237
+ */
7238
+ card_number: string;
7239
+ /**
7240
+ * @description Card expiration date, `MM/YY`
7241
+ * @example 07/29
7242
+ */
7243
+ expiry_date: string;
7244
+ /**
7245
+ * @description Card security code
7246
+ * @example 123
7247
+ */
7248
+ cvv: string;
7249
+ /**
7250
+ * @description 3-D Secure password where the vendor exposes one (Wallester); `null` otherwise.
7251
+ * @example null
7252
+ */
7253
+ security_code: string | null;
7099
7254
  };
7100
7255
  /** @description Card transaction */
7101
7256
  IssuingTransaction: {
@@ -7902,7 +8057,7 @@ export interface components {
7902
8057
  meta?: Record<string, never> | null;
7903
8058
  currency?: components["schemas"]["CurrencyRef"];
7904
8059
  };
7905
- /** @description Filtered order metadata (only public fields) */
8060
+ /** @description Order metadata. List and single-read responses reduce it to the public allowlist; create/approve/cancel responses return the stored meta minus scheduler-internal keys */
7906
8061
  OrderMeta: {
7907
8062
  /** Format: uuid */
7908
8063
  request_id?: string | null;
@@ -8021,7 +8176,7 @@ export interface components {
8021
8176
  to_currency_id?: string;
8022
8177
  /**
8023
8178
  * Format: uuid
8024
- * @description UUID of a `CRYPTO_EXTERNAL` or `CRYPTO_INTERNAL` counterparty destination previously created via `POST /api/counterparty/destinations`.
8179
+ * @description UUID of a `CRYPTO_EXTERNAL` counterparty destination previously created via `POST /api/counterparty/destinations`.
8025
8180
  * @example b2f3d8c1-4a7e-4d22-9c5f-1e6a8d0b2a44
8026
8181
  */
8027
8182
  counterparty_destination_id: string;
@@ -8072,13 +8227,13 @@ export interface components {
8072
8227
  to_currency_id?: string;
8073
8228
  /**
8074
8229
  * Format: uuid
8075
- * @description Virtual account UUID used as the funding source for the off-ramp. May be auto-resolved by the platform if omitted, but providing it explicitly is recommended.
8230
+ * @description Virtual account UUID used as the funding source for the off-ramp (required; the order type is resolved from its program).
8076
8231
  * @example 11111111-2222-3333-4444-555555555555
8077
8232
  */
8078
8233
  virtual_account_id: string;
8079
8234
  /**
8080
8235
  * Format: uuid
8081
- * @description Bank counterparty destination UUID created via `POST /api/counterparty/destinations`. The destination type must match the rail (WIRE/ACH/SEPA/SWIFT/CHAPS/FPS).
8236
+ * @description Bank counterparty destination UUID created via `POST /api/counterparty/destinations`. The destination type must match the rail (FEDWIRE for wire, ACH, SEPA, SWIFT, CHAPS, FPS).
8082
8237
  * @example b2f3d8c1-4a7e-4d22-9c5f-1e6a8d0b2a44
8083
8238
  */
8084
8239
  counterparty_destination_id: string;