squarefi-bff-api-module 1.36.98 → 1.36.100

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.
@@ -108,6 +108,9 @@ export declare const frontend: {
108
108
  exchangeRates: {
109
109
  list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
110
110
  };
111
+ countries: {
112
+ list: (params?: API.Frontend.Reference.Countries.List.Request) => Promise<API.Frontend.Reference.Countries.List.Response>;
113
+ };
111
114
  orderTypes: {
112
115
  list: (params?: API.Frontend.Reference.OrderTypes.List.Request) => Promise<API.Frontend.Reference.OrderTypes.List.Response>;
113
116
  };
@@ -152,7 +152,7 @@ export const frontend = {
152
152
  getAll: ({ wallet_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails`),
153
153
  getById: ({ wallet_id, rail_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`),
154
154
  // No `data` without `accepted_terms`, so both clients keep the old request (the fetch one sends no body). On a
155
- // rail with terms an empty list is a refusal, not an absence (SFI-2865).
155
+ // rail with terms an empty list is a refusal, and so is no list where the rail requires its terms (SFI-2865).
156
156
  submit: ({ wallet_id, rail_id, accepted_terms, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`, accepted_terms == null ? undefined : { data: { accepted_terms } }),
157
157
  confirmTerms: ({ wallet_id, rail_id, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}/terms-and-conditions`),
158
158
  },
@@ -196,7 +196,6 @@ export const frontend = {
196
196
  params,
197
197
  paramsSerializer: KYC_FORMS_ARRAY_PARAMS,
198
198
  }),
199
- // `accepted_terms`: all document ids of `form.terms` (`[]` if none); missing ones come back in `details.terms`.
200
199
  submit: ({ entity_id, rails, programs, wallet_id, locale, ...data }) => apiClientV1Frontend.postRequest(`/frontend/kyc/entities/${entity_id}/forms/submit`, { data, params: { rails, programs, wallet_id, locale }, paramsSerializer: KYC_FORMS_ARRAY_PARAMS }),
201
200
  },
202
201
  verification: {
@@ -228,6 +227,15 @@ export const frontend = {
228
227
  exchangeRates: {
229
228
  list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/exchange_rates', { params }),
230
229
  },
230
+ // Core's countries with `iban`: what banks of the country take as the account of an incoming SWIFT payment.
231
+ // MANDATORY — only an IBAN (label the SWIFT account field "IBAN"); OPTIONAL — an IBAN or a domestic number;
232
+ // NONE — no IBANs. Look the bank up by the BIC's country (letters 5–6), not the beneficiary's, and join to
233
+ // `list.countries` by `iso2`. The backend pages it (50 by default), so the whole list is asked for by default.
234
+ countries: {
235
+ list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/countries', {
236
+ params: { limit: 500, ...params },
237
+ }),
238
+ },
231
239
  // Only the types enabled for the tenant (a `tenant_order_type_rates` row), paged — 50 by default, 500 at most.
232
240
  orderTypes: {
233
241
  list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/order_types', { params }),
@@ -6624,6 +6624,8 @@ export interface paths {
6624
6624
  * List countries
6625
6625
  * @description Returns countries with ISO codes, phone codes, currency info, and flags.
6626
6626
  *
6627
+ * `iban` says what the country's banks take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN (a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` otherwise), `OPTIONAL` — an IBAN or a domestic account number, `NONE` — no IBANs in the country.
6628
+ *
6627
6629
  * **Authentication**: x-api-key header required
6628
6630
  *
6629
6631
  */
@@ -6653,7 +6655,12 @@ export interface paths {
6653
6655
  [name: string]: unknown;
6654
6656
  };
6655
6657
  content: {
6656
- "application/json": components["schemas"]["ApiSuccessResponse"];
6658
+ "application/json": {
6659
+ /** @example true */
6660
+ success: boolean;
6661
+ data: components["schemas"]["ReferenceCountry"][];
6662
+ pagination?: components["schemas"]["PaginationResponse"];
6663
+ };
6657
6664
  };
6658
6665
  };
6659
6666
  401: components["responses"]["Unauthorized"];
@@ -8333,7 +8340,7 @@ export interface components {
8333
8340
  /** @example iban */
8334
8341
  field: string;
8335
8342
  /**
8336
- * @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.
8343
+ * @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_REQUIRED`, `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.
8337
8344
  * @example IBAN_NOT_SEPA
8338
8345
  */
8339
8346
  code: string;
@@ -8350,6 +8357,34 @@ export interface components {
8350
8357
  */
8351
8358
  detected?: "IBAN" | "BIC" | "ROUTING_NUMBER";
8352
8359
  };
8360
+ /** @description A country of the reference. `id` is the `country_id` of addresses (bank and beneficiary address of a destination). `iban` says what banks of the country take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN, a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` for anything else; `OPTIONAL` — the country issues IBANs, its banks also take a domestic account number; `NONE` — the country issues no IBANs. */
8361
+ ReferenceCountry: {
8362
+ /** @example 231 */
8363
+ id: number;
8364
+ /** @example United Arab Emirates */
8365
+ name: string;
8366
+ /** @example AE */
8367
+ iso2: string;
8368
+ /** @example ARE */
8369
+ iso3?: string | null;
8370
+ /** @example 971 */
8371
+ phonecode?: string | null;
8372
+ /** @example AED */
8373
+ currency?: string | null;
8374
+ currency_name?: string | null;
8375
+ currency_symbol?: string | null;
8376
+ /** @example Asia */
8377
+ region?: string | null;
8378
+ /** @example Western Asia */
8379
+ subregion?: string | null;
8380
+ emoji?: string | null;
8381
+ nationality?: string | null;
8382
+ /**
8383
+ * @example MANDATORY
8384
+ * @enum {string}
8385
+ */
8386
+ iban: "MANDATORY" | "OPTIONAL" | "NONE";
8387
+ };
8353
8388
  DestinationValidationResult: {
8354
8389
  /** @description True when creating the destination with this payload would pass every check */
8355
8390
  valid: boolean;
@@ -10473,6 +10473,125 @@ export interface paths {
10473
10473
  patch?: never;
10474
10474
  trace?: never;
10475
10475
  };
10476
+ "/frontend/promo-codes/redeem": {
10477
+ parameters: {
10478
+ query?: never;
10479
+ header?: never;
10480
+ path?: never;
10481
+ cookie?: never;
10482
+ };
10483
+ get?: never;
10484
+ put?: never;
10485
+ /**
10486
+ * Apply a promo code
10487
+ * @description Moves the user to the user group (tariff) of the tenant's promo code, records the redemption and counts one use of the code. If a step fails, the earlier ones are undone and the request fails.
10488
+ * A user applies the same code once; another code can be applied later and moves the user again.
10489
+ * A code of another tenant, or a deleted one, is reported as not found.
10490
+ *
10491
+ */
10492
+ post: {
10493
+ parameters: {
10494
+ query?: never;
10495
+ header?: never;
10496
+ path?: never;
10497
+ cookie?: never;
10498
+ };
10499
+ requestBody: {
10500
+ content: {
10501
+ "application/json": {
10502
+ /**
10503
+ * @description The promo code; case does not matter, surrounding spaces are trimmed. 3–32 characters `A–Z`, `0–9`, `-`, `_`.
10504
+ * @example summer-26
10505
+ */
10506
+ code: string;
10507
+ };
10508
+ };
10509
+ };
10510
+ responses: {
10511
+ /** @description The code was applied. */
10512
+ 200: {
10513
+ headers: {
10514
+ [name: string]: unknown;
10515
+ };
10516
+ content: {
10517
+ /** @example {
10518
+ * "success": true,
10519
+ * "data": {
10520
+ * "code": "SUMMER-26",
10521
+ * "user_group": {
10522
+ * "id": "4b1c0a52-7d0e-4f0b-9a55-2f4f3c6a1e10",
10523
+ * "name": "Partners"
10524
+ * },
10525
+ * "redeemed_at": "2026-10-26T13:05:00.000Z"
10526
+ * }
10527
+ * } */
10528
+ "application/json": {
10529
+ /** @example true */
10530
+ success: boolean;
10531
+ data: components["schemas"]["PromoCodeRedemption"];
10532
+ };
10533
+ };
10534
+ };
10535
+ /** @description No `code`, or a code of the wrong format (`VALIDATION_ERROR`). */
10536
+ 400: {
10537
+ headers: {
10538
+ [name: string]: unknown;
10539
+ };
10540
+ content: {
10541
+ "application/json": components["schemas"]["ErrorResponse"];
10542
+ };
10543
+ };
10544
+ 401: components["responses"]["UnauthorizedError"];
10545
+ /** @description The tenant has no such promo code, or it was deleted (`PROMO_CODE_NOT_FOUND`). */
10546
+ 404: {
10547
+ headers: {
10548
+ [name: string]: unknown;
10549
+ };
10550
+ content: {
10551
+ "application/json": components["schemas"]["ErrorResponse"];
10552
+ };
10553
+ };
10554
+ /** @description The code cannot be applied:
10555
+ * - `PROMO_CODE_NOT_ACTIVE` — `error.details.reason` says why: `PAUSED` (paused by the operator), `EXPIRED` (past its expiry), `EXHAUSTED` (no uses left), `NO_GROUP` (its user group was deleted);
10556
+ * - `PROMO_CODE_ALREADY_REDEEMED` — the user has applied this code before;
10557
+ * - `PROMO_CODE_GROUP_ALREADY_ASSIGNED` — the user is already in the code's user group (a user without a group of their own is in the tenant's default group);
10558
+ * - `OPERATION_IN_PROGRESS` or `CONFLICT` — another application for the user, or many for the code, ran at the same moment; retry.
10559
+ * */
10560
+ 409: {
10561
+ headers: {
10562
+ [name: string]: unknown;
10563
+ };
10564
+ content: {
10565
+ /** @example {
10566
+ * "success": false,
10567
+ * "error": {
10568
+ * "code": "PROMO_CODE_NOT_ACTIVE",
10569
+ * "message": "This promo code has been used up",
10570
+ * "details": {
10571
+ * "reason": "EXHAUSTED"
10572
+ * }
10573
+ * }
10574
+ * } */
10575
+ "application/json": components["schemas"]["ErrorResponse"];
10576
+ };
10577
+ };
10578
+ /** @description More than 10 failed attempts in an hour (`RATE_LIMIT_EXCEEDED`); a successful redemption does not count. Retry after the window ends. */
10579
+ 429: {
10580
+ headers: {
10581
+ [name: string]: unknown;
10582
+ };
10583
+ content: {
10584
+ "application/json": components["schemas"]["ErrorResponse"];
10585
+ };
10586
+ };
10587
+ };
10588
+ };
10589
+ delete?: never;
10590
+ options?: never;
10591
+ head?: never;
10592
+ patch?: never;
10593
+ trace?: never;
10594
+ };
10476
10595
  "/frontend/reference/currencies": {
10477
10596
  parameters: {
10478
10597
  query?: never;
@@ -10797,6 +10916,8 @@ export interface paths {
10797
10916
  * List countries
10798
10917
  * @description Returns countries with ISO codes, phone codes, currency info.
10799
10918
  *
10919
+ * `iban` says what the country's banks take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN (a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` otherwise), `OPTIONAL` — an IBAN or a domestic account number, `NONE` — no IBANs in the country.
10920
+ *
10800
10921
  * **Authentication**: Bearer token + x-tenant-id header
10801
10922
  *
10802
10923
  */
@@ -10821,7 +10942,14 @@ export interface paths {
10821
10942
  headers: {
10822
10943
  [name: string]: unknown;
10823
10944
  };
10824
- content?: never;
10945
+ content: {
10946
+ "application/json": {
10947
+ /** @example true */
10948
+ success: boolean;
10949
+ data: components["schemas"]["ReferenceCountry"][];
10950
+ pagination?: components["schemas"]["PaginationResponse"];
10951
+ };
10952
+ };
10825
10953
  };
10826
10954
  401: components["responses"]["UnauthorizedError"];
10827
10955
  };
@@ -15900,11 +16028,9 @@ export interface paths {
15900
16028
  * (`wallet_rail.terms_confirmed`, the documents in `wallet_rail.terms_and_conditions`), and a vendor that takes
15901
16029
  * an acceptance date is sent the same time; an account the vendor already holds may keep the date it recorded
15902
16030
  * first. Without `accepted_terms` (or without a body, or `null`) the submission goes as before and the terms are
15903
- * accepted later with `POST …/terms-and-conditions`.
15904
- *
15905
- * On the KYC forms flow CORE makes this submission itself for a rail the client sent a rail or multi
15906
- * form for, once the form is accepted and the entity is `APPROVED`, when the form was sent by a wallet `admin` or `owner` and the wallet has no application
15907
- * on the rail yet; the route stays for a rail CORE could not submit and for a resubmission.
16031
+ * accepted later with `POST …/terms-and-conditions` — except on a rail that requires the terms with the
16032
+ * submission (set per rail by the operator): there it is refused (`400 TERMS_NOT_ACCEPTED`). Always send
16033
+ * `accepted_terms` to a rail with terms.
15908
16034
  *
15909
16035
  * Refused unless the rail has an onboarding implementation (retired rails never do), takes submissions,
15910
16036
  * fits the entity type, and the entity's KYC is `APPROVED` — an entity still under review
@@ -15931,7 +16057,8 @@ export interface paths {
15931
16057
  content: {
15932
16058
  "application/json": {
15933
16059
  /** @description Ids of the rail's `terms_and_conditions` the client accepted with this submission. On a rail with
15934
- * terms an empty list is a refusal (`400 TERMS_NOT_ACCEPTED`), not an absence of the field.
16060
+ * terms an empty list is a refusal (`400 TERMS_NOT_ACCEPTED`), not an absence of the field; on a
16061
+ * rail that requires the terms, so is the absence.
15935
16062
  * */
15936
16063
  accepted_terms?: string[] | null;
15937
16064
  };
@@ -15956,7 +16083,8 @@ export interface paths {
15956
16083
  * tenant of the KYC forms flow, the KYC entity misses saved values of required fields of the rail's form
15957
16084
  * (a draft does not count): `details.fields` lists their keys, open
15958
16085
  * `GET /frontend/kyc/entities/{entity_id}/forms?rails={rail_id}` and fill them; `TERMS_NOT_ACCEPTED` —
15959
- * `accepted_terms` misses an active terms document of the rail, nothing was submitted
16086
+ * `accepted_terms` misses an active terms document of the rail, or is absent on a rail that requires the
16087
+ * terms; nothing was submitted
15960
16088
  * */
15961
16089
  400: {
15962
16090
  headers: {
@@ -16451,7 +16579,7 @@ export interface paths {
16451
16579
  };
16452
16580
  /**
16453
16581
  * The form of an entity for a set of purposes
16454
- * @description Built on every call from the tenant's requirement profiles and the entity. Without `rails` and `programs` it is the base form. With one rail it is that rail's form: the base profile, the tenant's rail profile and the vendor's minimum merged: a field required by any of them is required, `review` wins over `auto`, and a field is shown when any of them shows it (one asking it without a condition — the vendor's minimum always — shows it always); profiles whose conditions read each other in a circle answer `409 KYC_FORM_CONDITIONS_CYCLE`. Sections are the groups to draw, `visible_when` the show logic, `required_by` the purposes a field is required for, the locks (`saved`, `from_document`, `pending`, `status`) what the client cannot change, `schema_version` what to echo back. Fields that come from the identity document (names, date of birth, citizenship, the document number and dates) are left out until the document is verified; the document itself is asked: its type `gov_id_type` (`PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS` — the codes `…/owners/{owner_id}/document` takes as `type` too), issuing country `gov_id_country` and photos `gov_id_front` and `gov_id_back` (shown unless a passport) — saved, and no longer asked, once it is verified; `state: complete` on a rail form means no field is left to ask. The terms of the form's rails — a rail it names and the rail of each of its card programs — come with the form in `terms`, to be accepted with the submission (`accepted_terms`). With one program and `wallet_id` it is the form before a card: the level the program's vendor demands (`minimal`: name, email, phone; `basic`: plus date of birth, citizenship, gender, identity document type and number, residential address; `declared` / `full`: plus the identity document and the face, verified after the form) merged with the tenant's binding for the program, without the base form; what the personal entity already holds is locked `saved`, so `state: complete` means the card can be asked for at once. Several rails and programs at once is the multi form: the base form, every rail and every program merged, each field once with `required_by` naming the purposes. Access: the owner of the entity, or an owner / admin of a wallet it is linked to.
16582
+ * @description Built on every call from the tenant's requirement profiles and the entity. Without `rails` and `programs` it is the base form. With one rail it is that rail's form: the base profile, the tenant's rail profile and the vendor's minimum merged: a field required by any of them is required, `review` wins over `auto`, and a field is shown when any of them shows it (one asking it without a condition — the vendor's minimum always — shows it always); profiles whose conditions read each other in a circle answer `409 KYC_FORM_CONDITIONS_CYCLE`. Sections are the groups to draw, `visible_when` the show logic, `required_by` the purposes a field is required for, the locks (`saved`, `from_document`, `pending`, `status`) what the client cannot change, `schema_version` what to echo back. Fields that come from the identity document (names, date of birth, citizenship, the document number and dates) are left out until the document is verified; the document itself is asked: its type `gov_id_type` (`PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS` — the codes `…/owners/{owner_id}/document` takes as `type` too), issuing country `gov_id_country` and photos `gov_id_front` and `gov_id_back` (shown unless a passport) — saved, and no longer asked, once it is verified; `state: complete` on a rail form means nothing is left to ask and the client goes straight to the rail's terms. With one program and `wallet_id` it is the form before a card: the level the program's vendor demands (`minimal`: name, email, phone; `basic`: plus date of birth, citizenship, gender, identity document type and number, residential address; `declared` / `full`: plus the identity document and the face, verified after the form) merged with the tenant's binding for the program, without the base form; what the personal entity already holds is locked `saved`, so `state: complete` means the card can be asked for at once. Several rails and programs at once is the multi form: the base form, every rail and every program merged, each field once with `required_by` naming the purposes. A form whose last submission is `returned` comes back with that submission's answers in `values` — its files too, as files of the draft (`saved: false`, removable by `DELETE …/forms/uploads/{upload_id}`) — until the client saves, uploads or sends again. Access: the owner of the entity, or an owner / admin of a wallet it is linked to.
16455
16583
  */
16456
16584
  get: {
16457
16585
  parameters: {
@@ -16460,7 +16588,7 @@ export interface paths {
16460
16588
  rails?: components["parameters"]["KycFormsRails"];
16461
16589
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
16462
16590
  programs?: components["parameters"]["KycFormsPrograms"];
16463
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
16591
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
16464
16592
  wallet_id?: components["parameters"]["KycFormsWalletId"];
16465
16593
  /** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
16466
16594
  locale?: components["parameters"]["KycFormsLocale"];
@@ -16486,7 +16614,7 @@ export interface paths {
16486
16614
  "application/json": components["schemas"]["KycFormsFormResponse"];
16487
16615
  };
16488
16616
  };
16489
- /** @description `VALIDATION_ERROR` — `entity_id`, `wallet_id` or an id in `rails` / `programs` is not a uuid (a message only); `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_FORM_WALLET_NOT_LINKED` — `wallet_id` of a form over rails is not a wallet of this entity; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant still runs KYC through the BFF */
16617
+ /** @description `VALIDATION_ERROR` — `entity_id`, `wallet_id` or an id in `rails` / `programs` is not a uuid (a message only); `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant still runs KYC through the BFF */
16490
16618
  400: {
16491
16619
  headers: {
16492
16620
  [name: string]: unknown;
@@ -16527,7 +16655,7 @@ export interface paths {
16527
16655
  get?: never;
16528
16656
  /**
16529
16657
  * Save the draft of a form
16530
- * @description The form is the one `rails` and `programs` name, as for `GET …/forms`. Replaces the draft as a whole with the given values of open fields. Types are checked, rules and requiredness are not — except that owner shares over 100% in total and a value whose condition reads an empty required source are refused here too. Nothing is written to the KYC entity. The terms of the form's rails (`form.terms` of `GET …/forms`) are accepted with the submission only: a draft takes no `accepted_terms` (a key of that name is ignored, nothing about the terms is stored) and its answer carries no `terms`. The first draft of a business form moves the application to `PENDING`. The entity's owner, or an owner or admin of a linked wallet.
16658
+ * @description The form is the one `rails` and `programs` name, as for `GET …/forms`. Replaces the draft as a whole with the given values of open fields; the files of the draft stay, and so do those of a `returned` last submission (they carry over into the draft, those removed excepted). Types are checked, rules and requiredness are not — except that owner shares over 100% in total, a value whose condition reads an empty required source, and a change to a saved owner the form does not allow (left out of the list, its value cleared, or changed outside a `returned` form) are refused here too, as on the submission: the draft is not saved. Nothing is written to the KYC entity. The first draft of a business form moves the application to `PENDING`. The entity's owner, or an owner or admin of a linked wallet.
16531
16659
  */
16532
16660
  put: {
16533
16661
  parameters: {
@@ -16536,7 +16664,7 @@ export interface paths {
16536
16664
  rails?: components["parameters"]["KycFormsRails"];
16537
16665
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
16538
16666
  programs?: components["parameters"]["KycFormsPrograms"];
16539
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
16667
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
16540
16668
  wallet_id?: components["parameters"]["KycFormsWalletId"];
16541
16669
  /** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
16542
16670
  locale?: components["parameters"]["KycFormsLocale"];
@@ -16578,7 +16706,7 @@ export interface paths {
16578
16706
  "application/json": components["schemas"]["ErrorResponse"];
16579
16707
  };
16580
16708
  };
16581
- /** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now (its fields or the terms documents of its rails changed), reload it (`GET …/forms`) and send again; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
16709
+ /** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now, reload it (`GET …/forms`) and send again; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
16582
16710
  409: {
16583
16711
  headers: {
16584
16712
  [name: string]: unknown;
@@ -16607,7 +16735,7 @@ export interface paths {
16607
16735
  put?: never;
16608
16736
  /**
16609
16737
  * Upload a file into a file field of a form
16610
- * @description The form is the one `rails` and `programs` name. Multipart: `field` (the key of an open file field: shown, not locked) and `file`. PDF, JPEG or PNG up to 20 MB, told by the bytes — a renamed file is refused with `DOCUMENT_REJECTED`; a field whose `file.accept` lists only images (the photos of the identity document, `gov_id_front` / `gov_id_back`) refuses a PDF the same way. A field that takes no files now — unknown, not a file field, locked (a form read-only by the application status locks every field), or hidden by its condition — is refused with `FORM_FIELD_NOT_ALLOWED`, whatever the file. The file stays in the draft until the submission is applied; a file of a field hidden by its condition stays in the draft's storage (removable by its `id`), is not listed in the form's `values` while hidden, and does not go with the submission. The photos of the identity document go to the identity provider once the submission waits on the verification. The entity's owner, or an owner or admin of a linked wallet.
16738
+ * @description The form is the one `rails` and `programs` name. Multipart: `field` (the key of an open file field: shown, not locked) and `file`. PDF, JPEG or PNG up to 20 MB, told by the bytes — a renamed file is refused with `DOCUMENT_REJECTED`; a field whose `file.accept` lists only images (the photos of the identity document, `gov_id_front` / `gov_id_back`) refuses a PDF the same way. A field that takes no files now — unknown, not a file field, locked (a form read-only by the application status locks every field), or hidden by its condition — is refused with `FORM_FIELD_NOT_ALLOWED`, whatever the file. The file stays in the draft until the submission is applied; a file of a field hidden by its condition stays in the draft's storage (removable by its `id`), is not listed in the form's `values` while hidden, and does not go with the submission. The photos of the identity document go to the identity provider once the submission waits on the verification. On a form whose last submission is `returned` the files of that submission count toward `file.max_files` of the field and carry over into the draft with the new file. The entity's owner, or an owner or admin of a linked wallet.
16611
16739
  */
16612
16740
  post: {
16613
16741
  parameters: {
@@ -16616,7 +16744,7 @@ export interface paths {
16616
16744
  rails?: components["parameters"]["KycFormsRails"];
16617
16745
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
16618
16746
  programs?: components["parameters"]["KycFormsPrograms"];
16619
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
16747
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
16620
16748
  wallet_id?: components["parameters"]["KycFormsWalletId"];
16621
16749
  /** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
16622
16750
  locale?: components["parameters"]["KycFormsLocale"];
@@ -16715,7 +16843,7 @@ export interface paths {
16715
16843
  post?: never;
16716
16844
  /**
16717
16845
  * Remove a file from the draft of a form
16718
- * @description The form is the one `rails` and `programs` name. Only a file of the draft (`saved: false`) can be removed; a document already in the KYC entity never is. The entity's owner, or an owner or admin of a linked wallet.
16846
+ * @description The form is the one `rails` and `programs` name. Only a file of the draft (`saved: false`) can be removed — a file of a returned submission is one too: the submission opens as the draft without it, its own record keeps the file; a document already in the KYC entity never is. The entity's owner, or an owner or admin of a linked wallet.
16719
16847
  */
16720
16848
  delete: {
16721
16849
  parameters: {
@@ -16724,14 +16852,14 @@ export interface paths {
16724
16852
  rails?: components["parameters"]["KycFormsRails"];
16725
16853
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
16726
16854
  programs?: components["parameters"]["KycFormsPrograms"];
16727
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
16855
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
16728
16856
  wallet_id?: components["parameters"]["KycFormsWalletId"];
16729
16857
  };
16730
16858
  header?: never;
16731
16859
  path: {
16732
16860
  /** @description `kyc_entity.id` of the caller, or of an entity linked to a wallet the caller owns or administers */
16733
16861
  entity_id: components["parameters"]["KycFormsEntityId"];
16734
- /** @description The `id` of a file in the draft (`saved: false`) */
16862
+ /** @description The `id` of a file in the draft or in the returned submission of the form (`saved: false`) */
16735
16863
  upload_id: components["parameters"]["KycFormsUploadId"];
16736
16864
  };
16737
16865
  cookie?: never;
@@ -16754,18 +16882,18 @@ export interface paths {
16754
16882
  };
16755
16883
  };
16756
16884
  };
16757
- /** @description `VALIDATION_ERROR` — an id (`entity_id`, `upload_id`, `wallet_id`, `rails`, `programs`) is not a uuid; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_FORMS_NOT_ENABLED`. */
16885
+ /** @description `VALIDATION_ERROR` — an id (`entity_id`, `upload_id`, `wallet_id`, `rails`, `programs`) is not a uuid (a message only); `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant still runs KYC through the BFF. */
16758
16886
  400: {
16759
16887
  headers: {
16760
16888
  [name: string]: unknown;
16761
16889
  };
16762
16890
  content: {
16763
- "application/json": components["schemas"]["ErrorResponse"];
16891
+ "application/json": components["schemas"]["KycFormsErrorResponse"];
16764
16892
  };
16765
16893
  };
16766
16894
  401: components["responses"]["UnauthorizedError"];
16767
16895
  403: components["responses"]["KycFormsAccessDenied"];
16768
- /** @description The entity does not exist or belongs to another tenant, or the upload is not in the draft of this form — a saved document is never removed here (`NOT_FOUND`). */
16896
+ /** @description `NOT_FOUND` — the entity does not exist or belongs to another tenant, a rail / program of the query does not exist for the tenant, or the upload is not in the draft or in the returned submission of this form — a saved document is never removed here. */
16769
16897
  404: {
16770
16898
  headers: {
16771
16899
  [name: string]: unknown;
@@ -16774,6 +16902,7 @@ export interface paths {
16774
16902
  "application/json": components["schemas"]["ErrorResponse"];
16775
16903
  };
16776
16904
  };
16905
+ 409: components["responses"]["KycFormsConditionsCycle"];
16777
16906
  };
16778
16907
  };
16779
16908
  options?: never;
@@ -16792,7 +16921,7 @@ export interface paths {
16792
16921
  put?: never;
16793
16922
  /**
16794
16923
  * Send a form
16795
- * @description The form is the one `rails` and `programs` name. The full check of every open field (all errors in one `VALIDATION_ERROR`) and of the terms — a form with terms documents (`form.terms`) is sent only with every one of their ids in `accepted_terms` (`400 KYC_TERMS_NOT_ACCEPTED` otherwise, nothing written) — then a submission: `awaiting_verification` when the identity document and face are still needed, `applied` when every profile of the form writes the answers into the KYC entity at once, `in_review` when compliance decides (any profile of the form in review mode). Answers `200` with the form in its new state. One submission of a form at a time. A form over rails or programs that brings nothing new — no value and no file, every required field already saved in the entity (not just waiting in another submission under review) — is `applied` at once whatever the review mode: there is nothing for compliance to decide. A rail form does not change the application status. A card form is `auto` unless a profile of it says otherwise and never changes the application status. A multi form moves the application like the base form it includes; once applied, every rail and program of the set is satisfied from the shared data. Once a rail, card or multi form is accepted (`applied`, or `approved` by compliance) and the wallet's KYC is `APPROVED` — whichever comes second — when the form was sent by an owner or admin of the wallet (the role those routes ask for), CORE submits the wallet itself: to each rail of the form the wallet has no application on yet — only for a form of the wallet's own KYC entity, a member's form never puts the wallet on a rail — (as `POST /frontend/wallets/{wallet_id}/kyc-rails/{rail_id}` would; it then shows in `GET …/kyc-rails`), and to each program the member has no cardholder in yet (as `POST /frontend/issuing/cardholders` with `user_data_id` and its submit would). The latest form sent for a rail or program decides: returned, rejected or still in review, nothing is submitted. A rail opened so, or opened before with its terms unconfirmed — a rail of the form, or the rail of one of its programs — gets its terms confirmed (`terms_confirmed: true`) at the time the form was sent, when the form accepted every terms document the application holds; terms changed since the form was sent are left for the client to confirm with `POST …/kyc-rails/{rail_id}/terms-and-conditions`. A submission CORE could not make — refused by the rail or the vendor, a program at its limit, a form sent by a member without that role — is left for the client to make with those routes, as before. The entity's owner, or an owner or admin of a linked wallet.
16924
+ * @description The form is the one `rails` and `programs` name. The full check of every open field (all errors in one `VALIDATION_ERROR`), then a submission: `awaiting_verification` when the identity document and face are still needed, `applied` when every profile of the form writes the answers into the KYC entity at once, `in_review` when compliance decides (any profile of the form in review mode). Answers `200` with the form in its new state. One submission of a form at a time. A rail form does not change the application status; once its submission is approved, the rail is submitted through the wallet's existing `POST /frontend/wallets/{wallet_id}/kyc-rails/{rail_id}`. A card form is `auto` unless a profile of it says otherwise and never changes the application status; once applied, the cardholder is created through `POST /frontend/issuing/cardholders` with `user_data_id`. A multi form moves the application like the base form it includes; once applied, every rail and program of the set is satisfied from the shared data. A `returned` submission sent again keeps its files that were not removed. A saved beneficial owner (an item of `beneficial_owners` with an `id`) is the entity's: a list without one, a changed saved value outside a `returned` form, and a saved value sent empty are refused with `VALIDATION_ERROR`, as in the draft. The entity's owner, or an owner or admin of a linked wallet.
16796
16925
  */
16797
16926
  post: {
16798
16927
  parameters: {
@@ -16801,7 +16930,7 @@ export interface paths {
16801
16930
  rails?: components["parameters"]["KycFormsRails"];
16802
16931
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
16803
16932
  programs?: components["parameters"]["KycFormsPrograms"];
16804
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
16933
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
16805
16934
  wallet_id?: components["parameters"]["KycFormsWalletId"];
16806
16935
  /** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
16807
16936
  locale?: components["parameters"]["KycFormsLocale"];
@@ -16818,7 +16947,7 @@ export interface paths {
16818
16947
  };
16819
16948
  requestBody: {
16820
16949
  content: {
16821
- "application/json": components["schemas"]["KycFormsSubmitRequest"];
16950
+ "application/json": components["schemas"]["KycFormsAnswersRequest"];
16822
16951
  };
16823
16952
  };
16824
16953
  responses: {
@@ -16831,7 +16960,7 @@ export interface paths {
16831
16960
  "application/json": components["schemas"]["KycFormsFormResponse"];
16832
16961
  };
16833
16962
  };
16834
- 400: components["responses"]["KycFormsSubmitErrors"];
16963
+ 400: components["responses"]["KycFormsFieldErrors"];
16835
16964
  401: components["responses"]["UnauthorizedError"];
16836
16965
  403: components["responses"]["KycFormsAccessDenied"];
16837
16966
  /** @description `NOT_FOUND` — the entity does not exist or belongs to another tenant, or a rail / program of the query does not exist for the tenant */
@@ -16843,7 +16972,7 @@ export interface paths {
16843
16972
  "application/json": components["schemas"]["ErrorResponse"];
16844
16973
  };
16845
16974
  };
16846
- /** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now (its fields or the terms documents of its rails changed), reload it (`GET …/forms`) and send again; `OPERATION_IN_PROGRESS` — a submission of this form is already running; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
16975
+ /** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now, reload it (`GET …/forms`) and send again; `OPERATION_IN_PROGRESS` — a submission of this form is already running; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
16847
16976
  409: {
16848
16977
  headers: {
16849
16978
  [name: string]: unknown;
@@ -17759,7 +17888,7 @@ export interface components {
17759
17888
  /** @example iban */
17760
17889
  field: string;
17761
17890
  /**
17762
- * @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.
17891
+ * @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_REQUIRED`, `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.
17763
17892
  * @example IBAN_NOT_SEPA
17764
17893
  */
17765
17894
  code: string;
@@ -17776,6 +17905,34 @@ export interface components {
17776
17905
  */
17777
17906
  detected?: "IBAN" | "BIC" | "ROUTING_NUMBER";
17778
17907
  };
17908
+ /** @description A country of the reference. `id` is the `country_id` of addresses (bank and beneficiary address of a destination). `iban` says what banks of the country take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN, a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` for anything else; `OPTIONAL` — the country issues IBANs, its banks also take a domestic account number; `NONE` — the country issues no IBANs. */
17909
+ ReferenceCountry: {
17910
+ /** @example 231 */
17911
+ id: number;
17912
+ /** @example United Arab Emirates */
17913
+ name: string;
17914
+ /** @example AE */
17915
+ iso2: string;
17916
+ /** @example ARE */
17917
+ iso3?: string | null;
17918
+ /** @example 971 */
17919
+ phonecode?: string | null;
17920
+ /** @example AED */
17921
+ currency?: string | null;
17922
+ currency_name?: string | null;
17923
+ currency_symbol?: string | null;
17924
+ /** @example Asia */
17925
+ region?: string | null;
17926
+ /** @example Western Asia */
17927
+ subregion?: string | null;
17928
+ emoji?: string | null;
17929
+ nationality?: string | null;
17930
+ /**
17931
+ * @example MANDATORY
17932
+ * @enum {string}
17933
+ */
17934
+ iban: "MANDATORY" | "OPTIONAL" | "NONE";
17935
+ };
17779
17936
  DestinationValidationResult: {
17780
17937
  /** @description True when creating the destination with this payload would pass every check */
17781
17938
  valid: boolean;
@@ -19984,6 +20141,25 @@ export interface components {
19984
20141
  category: "TRANSACTIONS" | "COMPLIANCE" | "ANNOUNCEMENTS" | "SYSTEM" | "SECURITY";
19985
20142
  enabled: boolean;
19986
20143
  };
20144
+ PromoCodeRedemption: {
20145
+ /**
20146
+ * @description The code as stored — upper case.
20147
+ * @example SUMMER-26
20148
+ */
20149
+ code: string;
20150
+ /** @description The user group (tariff) the user is in now. */
20151
+ user_group: {
20152
+ /** Format: uuid */
20153
+ id: string;
20154
+ /** @example Partners */
20155
+ name: string;
20156
+ };
20157
+ /**
20158
+ * Format: date-time
20159
+ * @description When the code was applied.
20160
+ */
20161
+ redeemed_at: string;
20162
+ };
19987
20163
  ReferralLevelRate: {
19988
20164
  /** @example TRANSFER_CARD_SUBACCOUNT */
19989
20165
  order_type?: string;
@@ -20532,11 +20708,11 @@ export interface components {
20532
20708
  file_name: string | null;
20533
20709
  /** Format: date-time */
20534
20710
  uploaded_at: string;
20535
- /** @description false — in the draft, deletable; true — already a KYC document, never removed here. */
20711
+ /** @description false — in the draft (a returned submission's files included until it is sent again), deletable; true — already a KYC document, never removed here. */
20536
20712
  saved: boolean;
20537
20713
  };
20538
20714
  /**
20539
- * @description One item of a `list` field (`beneficial_owners`): an object keyed by the `item.fields[].key` of the field, each value shaped by that item field's `type` (an item field never takes files). `id` is set on a row already saved in the KYC entity (for an owner, the `owner_id` of the owner routes); send it back to keep the row, leave it out for a new one.
20715
+ * @description One item of a `list` field (`beneficial_owners`): an object keyed by the `item.fields[].key` of the field, each value shaped by that item field's `type` (an item field never takes files). `id` is set on a row already saved in the KYC entity (for an owner, the `owner_id` of the owner routes); send it back to keep the row, leave it out for a new one. A saved row is the entity's: the client never removes it — a list (or a draft's list, an empty or `null` one included) without an `id` the form gave is refused with `VALIDATION_ERROR` on the list key, «A saved beneficial owner cannot be removed; contact support»; compliance removes one. Nor does its `owner_type` change, nor is a saved value of it cleared (sent empty: `VALIDATION_ERROR` on the item field, «A saved value cannot be cleared; correct it or contact support»; left out of the item: kept). On a `returned` form the client corrects the other values of the item fields the form asks; outside a return a changed saved value is refused (`VALIDATION_ERROR`, «A saved value cannot be changed; contact support»). Messages come in the language of the form. Do not offer to delete an item with an `id`, nor to change its type.
20540
20716
  * @example {
20541
20717
  * "id": "2d7c1b9e-4f30-4a8c-9e21-7b6a5c4d3e2f",
20542
20718
  * "owner_type": "individual",
@@ -20552,7 +20728,7 @@ export interface components {
20552
20728
  KycFormsListItemValue: {
20553
20729
  /**
20554
20730
  * Format: uuid
20555
- * @description The saved row; absent on an item that is not saved yet.
20731
+ * @description The saved row — not removable by the client; absent on an item that is not saved yet, which the client adds and removes freely.
20556
20732
  */
20557
20733
  id?: string;
20558
20734
  } & {
@@ -20635,23 +20811,6 @@ export interface components {
20635
20811
  add_label: string;
20636
20812
  };
20637
20813
  };
20638
- /** @description The terms of one rail of the form: a rail the form names, or the rail of one of its card programs — one group per rail, the programs that go through it listed with it. Draw one checkbox per group that accepts all of its `items`; send their ids in `accepted_terms` of `POST …/forms/submit`. */
20639
- KycFormsTerms: {
20640
- /** Format: uuid */
20641
- rail_id: string;
20642
- /** @description The card programs of the form that go through this rail; empty when only the rail itself is named. */
20643
- program_ids: string[];
20644
- /** @description The rail's active terms documents in display order; empty when the rail has none — nothing to accept. */
20645
- items: {
20646
- /** Format: uuid */
20647
- id: string;
20648
- /** @example Cardholder Agreement */
20649
- title: string;
20650
- description: string | null;
20651
- /** @example https://example.com/terms.pdf */
20652
- link: string | null;
20653
- }[];
20654
- };
20655
20814
  KycFormsForm: {
20656
20815
  /**
20657
20816
  * @description What the form is for: the base form, a rail, a card program (`card`), or one form over several rails and programs (`multi`).
@@ -20664,7 +20823,7 @@ export interface components {
20664
20823
  programs: string[];
20665
20824
  /**
20666
20825
  * Format: uuid
20667
- * @description The wallet the form is built for: the `wallet_id` of the query for a form over card programs or rails; otherwise the entity's first linked wallet (main wallet first), null when the entity is linked to none. The draft and the submission carry it.
20826
+ * @description The wallet the form is built for: the `wallet_id` of the query for a form over card programs; for any other form the entity's first linked wallet (main wallet first), null when the entity is linked to none. The draft and the submission carry it.
20668
20827
  */
20669
20828
  wallet_id: string | null;
20670
20829
  /** @enum {string} */
@@ -20675,7 +20834,7 @@ export interface components {
20675
20834
  */
20676
20835
  locale: string;
20677
20836
  /**
20678
- * @description Hash of the form composition (keys, requiredness, conditions, list item fields, the ids of the terms documents in `terms`; not the texts); echo it back in the draft and the submission. It can change between the load and the send: `409 FORM_OUTDATED`.
20837
+ * @description Hash of the form composition (keys, requiredness, conditions, list item fields; not the texts); echo it back in the draft and the submission. It can change between the load and the send: `409 FORM_OUTDATED`.
20679
20838
  * @example b3f1c2a9
20680
20839
  */
20681
20840
  schema_version: string;
@@ -20704,31 +20863,6 @@ export interface components {
20704
20863
  description: string | null;
20705
20864
  fields: components["schemas"]["KycFormsField"][];
20706
20865
  }[];
20707
- /**
20708
- * @description The terms the client accepts with the form, one group per rail of the form: the rails named first, then the rail of each card program. Empty for the base form; a program without a rail adds none. The documents are those in force now: a change after the load answers the submission `409 FORM_OUTDATED`.
20709
- * @example [
20710
- * {
20711
- * "rail_id": "a38b9a0c-5d1e-4f2a-8b3c-4d5e6f708192",
20712
- * "program_ids": [
20713
- * "d94ef320-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
20714
- * ],
20715
- * "items": [
20716
- * {
20717
- * "id": "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
20718
- * "title": "Cardholder Agreement",
20719
- * "description": null,
20720
- * "link": "https://example.com/terms.pdf"
20721
- * }
20722
- * ]
20723
- * },
20724
- * {
20725
- * "rail_id": "c1d7fac1-2b3c-4d5e-9f60-718293a4b5c6",
20726
- * "program_ids": [],
20727
- * "items": []
20728
- * }
20729
- * ]
20730
- */
20731
- terms: components["schemas"]["KycFormsTerms"][];
20732
20866
  };
20733
20867
  KycFormsFormResponse: {
20734
20868
  /** @example true */
@@ -20774,16 +20908,6 @@ export interface components {
20774
20908
  [key: string]: components["schemas"]["KycFormsAnswerValue"];
20775
20909
  };
20776
20910
  };
20777
- KycFormsSubmitRequest: components["schemas"]["KycFormsAnswersRequest"] & {
20778
- /**
20779
- * @description The ids of every terms document of the form (`form.terms[].items[].id`) — the client ticked the checkbox of each group. Required in full when the form has any: one left out answers `400 KYC_TERMS_NOT_ACCEPTED`, an id that is not a uuid or not of this form `400 VALIDATION_ERROR`. A form without terms documents is sent without it. The terms are checked after the fields: while a field is wrong, only the `VALIDATION_ERROR` comes back.
20780
- * @default []
20781
- * @example [
20782
- * "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5"
20783
- * ]
20784
- */
20785
- accepted_terms: string[];
20786
- };
20787
20911
  KycFormsDraftSaved: {
20788
20912
  /** @example true */
20789
20913
  success: boolean;
@@ -20811,11 +20935,19 @@ export interface components {
20811
20935
  saved: boolean;
20812
20936
  };
20813
20937
  };
20814
- /** @description The base form in the overview. */
20938
+ /** @description The base form in the overview, with the newest submission of the application. `state` and `missing_required` are the base form's own; `submission` and `target` may come from a multi form over it. */
20815
20939
  KycFormsFormSummary: {
20816
20940
  state: components["schemas"]["KycFormsFormState"];
20817
20941
  missing_required: number;
20818
- submission: components["schemas"]["KycFormsSubmission"];
20942
+ /** @description The newest submission of the application: of the base form or of a multi form over it, whatever set it was sent under. `target` names that form. */
20943
+ submission: components["schemas"]["KycFormsSubmission"] | null;
20944
+ /** @description The form the application was last sent under: open `GET …/forms` with these `rails`, `programs` and `wallet_id` to show a returned submission with its `comment` on any device, and send it again under the same set to close the return. Empty `rails` and `programs` are the base form (also when nothing was sent yet: then `wallet_id` is null). `wallet_id` is the wallet the submission was sent for, the entity's first linked wallet when no other was asked for, so it is not null for a base form of an entity linked to a wallet; pass it through as it is. To anyone but the owner of the entity — an admin of a linked wallet — only `rails` are named (`programs` empty, `wallet_id` null): like `cards[]`, which wallets the application was sent in and for which cards is the owner's to see; a form over rails alone opens the same without `wallet_id`. */
20945
+ target: {
20946
+ rails: string[];
20947
+ programs: string[];
20948
+ /** Format: uuid */
20949
+ wallet_id: string | null;
20950
+ };
20819
20951
  };
20820
20952
  KycFormsOverview: {
20821
20953
  /** @example true */
@@ -20833,6 +20965,11 @@ export interface components {
20833
20965
  * "id": "7b0f3c52-1d2e-4a6b-8f90-3c4d5e6f7a81",
20834
20966
  * "status": "awaiting_verification",
20835
20967
  * "comment": null
20968
+ * },
20969
+ * "target": {
20970
+ * "rails": [],
20971
+ * "programs": [],
20972
+ * "wallet_id": null
20836
20973
  * }
20837
20974
  * },
20838
20975
  * "verification": {
@@ -20850,7 +20987,7 @@ export interface components {
20850
20987
  entity_type: "individual" | "business";
20851
20988
  status: components["schemas"]["KycFormsEntityStatus"];
20852
20989
  /**
20853
- * @description Build the screen by this, not by `status`. `not_required` — the tenant asks nothing of this client type (`base_form` is null); `not_started` — the base form was not started; `incomplete` — a draft exists; `action_required` — the client's move: pass the identity check (`next_step: verification`), or, for a business, get the owners through theirs (`next_step: owners`); `in_review` — the identity provider or compliance is looking; `resubmit` — returned by compliance, the form is open again with `submission.comment`; `on_hold` — frozen by compliance; `verified` — approved; `expired` — no activity on the application for over three months: a passed identity check brings it back (`next_step: verification`), then compliance looks again; `rejected` — refused, the form is read-only; `offboarded` — compliance ended the relationship, final; `unknown` — a status this contract does not know. The stage of each `status`: `APPROVED` → `verified`; `REJECT`, `DECLINED`, `DOUBLE` → `rejected`; `OFFBOARDED` → `offboarded`; `EXPIRED` → `expired`; `HOLD` → `on_hold`; `WAITING_ON_REVIEW` → `in_review`; `NEEDS_ATTENTION` → `resubmit`; `WAITING_ON_UBOS` → `action_required` while an owner other than the filler's row has a check to start, finish or redo (`next_step: owners`), else `in_review`; `UNVERIFIED`, `PENDING`, `SOFT_REJECT` → by the base form and the identity check: `not_required` (no base form), `not_started`, `incomplete` (a draft), `action_required` (the check is the move), `in_review` (sent, with compliance or the provider), `resubmit` (the latest submission was returned) — the forms flow never sets `SOFT_REJECT`, one left by the old flow shows the screen of its form like `PENDING`; `PROCESSING` → `unknown` (the forms flow never sets it, an old-flow vendor sync may leave it).
20990
+ * @description Build the screen by this, not by `status`. `not_required` — the tenant asks nothing of this client type (`base_form` is null); `not_started` — the base form was not started; `incomplete` — a draft exists; `action_required` — the client's move: pass the identity check (`next_step: verification`), or, for a business, get the owners through theirs (`next_step: owners`); `in_review` — the identity provider or compliance is looking; `resubmit` — returned by compliance, the form is open again with `submission.comment` (open it with `base_form.target`); `on_hold` — frozen by compliance; `verified` — approved; `expired` — no activity on the application for over three months: a passed identity check brings it back (`next_step: verification`), then compliance looks again; `rejected` — refused, the form is read-only; `offboarded` — compliance ended the relationship, final; `unknown` — a status this contract does not know. The stage of each `status`: `APPROVED` → `verified`; `REJECT`, `DECLINED`, `DOUBLE` → `rejected`; `OFFBOARDED` → `offboarded`; `EXPIRED` → `expired`; `HOLD` → `on_hold`; `WAITING_ON_REVIEW` → `in_review`; `NEEDS_ATTENTION` → `resubmit`; `WAITING_ON_UBOS` → `action_required` while an owner other than the filler's row has a check to start, finish or redo (`next_step: owners`), else `in_review`; `UNVERIFIED`, `PENDING`, `SOFT_REJECT` → by the base form and the identity check: `not_required` (no base form), `not_started`, `incomplete` (a draft), `action_required` (the check is the move), `in_review` (sent, with compliance or the provider), `resubmit` (the latest submission was returned) — the forms flow never sets `SOFT_REJECT`, one left by the old flow shows the screen of its form like `PENDING`; `PROCESSING` → `unknown` (the forms flow never sets it, an old-flow vendor sync may leave it).
20854
20991
  * @enum {string}
20855
20992
  */
20856
20993
  stage: "not_required" | "not_started" | "incomplete" | "action_required" | "in_review" | "resubmit" | "on_hold" | "verified" | "expired" | "rejected" | "offboarded" | "unknown";
@@ -21091,18 +21228,11 @@ export interface components {
21091
21228
  }[];
21092
21229
  };
21093
21230
  };
21094
- /** @description The structured payload of an error that carries one (absent otherwise — an invalid uuid or a malformed body is a message only). `VALIDATION_ERROR`: `fields` is a map from the field key to its messages (a list item field is `beneficial_owners[0].role`, the list as a whole `beneficial_owners`). `FORM_FIELD_NOT_ALLOWED`, `KYC_FORM_CONDITIONS_CYCLE`: `fields` is a list of keys. `KYC_TERMS_NOT_ACCEPTED`: `terms` — and no `fields`. */
21231
+ /** @description The structured payload of an error that carries one (absent otherwise — an invalid uuid or a malformed body is a message only). `VALIDATION_ERROR`: `fields` is a map from the field key to its messages (a list item field is `beneficial_owners[0].role`, the list as a whole `beneficial_owners`). `FORM_FIELD_NOT_ALLOWED`, `KYC_FORM_CONDITIONS_CYCLE`: `fields` is a list of keys. */
21095
21232
  KycFormsErrorDetails: {
21096
- fields?: {
21233
+ fields: {
21097
21234
  [key: string]: string[];
21098
21235
  } | string[];
21099
- /**
21100
- * @description The ids of the terms documents of the form left out of `accepted_terms`.
21101
- * @example [
21102
- * "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5"
21103
- * ]
21104
- */
21105
- terms?: string[];
21106
21236
  };
21107
21237
  /** @description The error envelope of the KYC forms: `ErrorResponse` with the `details` of the field errors spelled out. */
21108
21238
  KycFormsErrorResponse: components["schemas"]["ErrorResponse"] & {
@@ -21189,7 +21319,7 @@ export interface components {
21189
21319
  "application/json": components["schemas"]["ErrorResponse"];
21190
21320
  };
21191
21321
  };
21192
- /** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_FORM_WALLET_NOT_LINKED` — `wallet_id` of a form over rails is not a wallet of this entity; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
21322
+ /** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a saved beneficial owner (an item with an `id`) left out of the list — an empty or `null` list included — comes back under `beneficial_owners`, a saved value of it changed outside a `returned` form, or sent empty, under `beneficial_owners[i].<field>`, and nothing is saved; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
21193
21323
  KycFormsFieldErrors: {
21194
21324
  headers: {
21195
21325
  [name: string]: unknown;
@@ -21198,15 +21328,6 @@ export interface components {
21198
21328
  "application/json": components["schemas"]["KycFormsErrorResponse"];
21199
21329
  };
21200
21330
  };
21201
- /** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object, `accepted_terms` not a list of at most 200 uuids), an id in `accepted_terms` that is not a terms document of this form, and a path id that is not a uuid; `KYC_TERMS_NOT_ACCEPTED` — `accepted_terms` leaves out a terms document of the form, `details.terms` lists the ids left out, nothing is written; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_FORM_WALLET_NOT_LINKED` — `wallet_id` of a form over rails is not a wallet of this entity; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
21202
- KycFormsSubmitErrors: {
21203
- headers: {
21204
- [name: string]: unknown;
21205
- };
21206
- content: {
21207
- "application/json": components["schemas"]["KycFormsErrorResponse"];
21208
- };
21209
- };
21210
21331
  /** @description `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle (`details.fields` lists the keys); nothing the client can fix, report it to support */
21211
21332
  KycFormsConditionsCycle: {
21212
21333
  headers: {
@@ -21313,11 +21434,11 @@ export interface components {
21313
21434
  KycFormsRails: string[];
21314
21435
  /** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
21315
21436
  KycFormsPrograms: string[];
21316
- /** @description The wallet the form is filled for; the draft and the submission carry it, and CORE puts this wallet on the form's rails and programs once the form is accepted and the KYC is `APPROVED`. Required when `programs` are named (`400 INVALID_REQUEST` without it): the entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. Optional when only `rails` are named: a rail is opened per wallet, so it must be a wallet of this entity (`400 KYC_FORM_WALLET_NOT_LINKED` otherwise) with the same membership rule; without it the entity's main wallet. Ignored on the base form. Not a uuid: `400 VALIDATION_ERROR`. */
21437
+ /** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
21317
21438
  KycFormsWalletId: string;
21318
21439
  /** @description The wallet the rails and the card programs are read for. Optional: without it the first linked wallet (main wallet first) that the entity's owner and the caller are both members of is used; when there is none — no linked wallet, or none the two share — the answer has `wallet_id: null` and empty `rails` and `programs`. With it, the entity's owner must be an active member of the wallet, and so must the caller when it is someone else, else `403 ACCESS_DENIED`. */
21319
21440
  KycFormsTargetsWalletId: string;
21320
- /** @description The `id` of a file in the draft (`saved: false`) */
21441
+ /** @description The `id` of a file in the draft or in the returned submission of the form (`saved: false`) */
21321
21442
  KycFormsUploadId: string;
21322
21443
  /** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
21323
21444
  KycFormsLocale: string;
@@ -2409,77 +2409,6 @@ export interface paths {
2409
2409
  patch?: never;
2410
2410
  trace?: never;
2411
2411
  };
2412
- "/orders/WITHDRAW_CARD_PREPAID": {
2413
- parameters: {
2414
- query?: never;
2415
- header?: never;
2416
- path?: never;
2417
- cookie?: never;
2418
- };
2419
- get?: never;
2420
- put?: never;
2421
- /**
2422
- * Withdraw funds from prepaid card to wallet
2423
- * @description Withdraw funds from a closed prepaid card back to crypto wallet. Currency is automatically determined from card's fiat_account.
2424
- */
2425
- post: {
2426
- parameters: {
2427
- query?: never;
2428
- header?: never;
2429
- path?: never;
2430
- cookie?: never;
2431
- };
2432
- requestBody: {
2433
- content: {
2434
- "application/json": {
2435
- /**
2436
- * @description Amount to withdraw
2437
- * @example 100
2438
- */
2439
- amount: number;
2440
- /**
2441
- * @description Destination wallet UUID
2442
- * @example 8205c701-cd41-4929-910f-fccbb949729a
2443
- */
2444
- wallet_uuid: string;
2445
- /**
2446
- * @description Card ID to withdraw from (must be closed)
2447
- * @example a60e477a-2ebb-4158-91ee-2f39ade8d883
2448
- */
2449
- card_id: string;
2450
- };
2451
- };
2452
- };
2453
- responses: {
2454
- /** @description Order successfully created */
2455
- 200: {
2456
- headers: {
2457
- [name: string]: unknown;
2458
- };
2459
- content?: never;
2460
- };
2461
- /** @description Bad request - validation error or card not closed */
2462
- 400: {
2463
- headers: {
2464
- [name: string]: unknown;
2465
- };
2466
- content?: never;
2467
- };
2468
- /** @description Server error */
2469
- 500: {
2470
- headers: {
2471
- [name: string]: unknown;
2472
- };
2473
- content?: never;
2474
- };
2475
- };
2476
- };
2477
- delete?: never;
2478
- options?: never;
2479
- head?: never;
2480
- patch?: never;
2481
- trace?: never;
2482
- };
2483
2412
  "/v2/orders/order_types": {
2484
2413
  parameters: {
2485
2414
  query?: never;
@@ -4431,6 +4431,8 @@ export interface paths {
4431
4431
  * List countries
4432
4432
  * @description Returns all countries with complete data including timezones, translations, coordinates.
4433
4433
  *
4434
+ * `iban` says what the country's banks take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN (a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` otherwise), `OPTIONAL` — an IBAN or a domestic account number, `NONE` — no IBANs in the country.
4435
+ *
4434
4436
  */
4435
4437
  get: {
4436
4438
  parameters: {
@@ -4449,13 +4451,18 @@ export interface paths {
4449
4451
  };
4450
4452
  requestBody?: never;
4451
4453
  responses: {
4452
- /** @description Countries retrieved successfully */
4454
+ /** @description Countries retrieved successfully — every column of the reference row, `iban` included */
4453
4455
  200: {
4454
4456
  headers: {
4455
4457
  [name: string]: unknown;
4456
4458
  };
4457
4459
  content: {
4458
- "application/json": components["schemas"]["TenantSuccessResponse"];
4460
+ "application/json": {
4461
+ /** @example true */
4462
+ success: boolean;
4463
+ data: components["schemas"]["ReferenceCountry"][];
4464
+ pagination?: components["schemas"]["PaginationResponse"];
4465
+ };
4459
4466
  };
4460
4467
  };
4461
4468
  /** @description Internal server error */
@@ -8854,7 +8861,7 @@ export interface components {
8854
8861
  /** @example iban */
8855
8862
  field: string;
8856
8863
  /**
8857
- * @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.
8864
+ * @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_REQUIRED`, `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.
8858
8865
  * @example IBAN_NOT_SEPA
8859
8866
  */
8860
8867
  code: string;
@@ -8871,6 +8878,34 @@ export interface components {
8871
8878
  */
8872
8879
  detected?: "IBAN" | "BIC" | "ROUTING_NUMBER";
8873
8880
  };
8881
+ /** @description A country of the reference. `id` is the `country_id` of addresses (bank and beneficiary address of a destination). `iban` says what banks of the country take as the account of an incoming SWIFT payment: `MANDATORY` — only an IBAN, a SWIFT destination to such a bank is refused with `IBAN_REQUIRED` for anything else; `OPTIONAL` — the country issues IBANs, its banks also take a domestic account number; `NONE` — the country issues no IBANs. */
8882
+ ReferenceCountry: {
8883
+ /** @example 231 */
8884
+ id: number;
8885
+ /** @example United Arab Emirates */
8886
+ name: string;
8887
+ /** @example AE */
8888
+ iso2: string;
8889
+ /** @example ARE */
8890
+ iso3?: string | null;
8891
+ /** @example 971 */
8892
+ phonecode?: string | null;
8893
+ /** @example AED */
8894
+ currency?: string | null;
8895
+ currency_name?: string | null;
8896
+ currency_symbol?: string | null;
8897
+ /** @example Asia */
8898
+ region?: string | null;
8899
+ /** @example Western Asia */
8900
+ subregion?: string | null;
8901
+ emoji?: string | null;
8902
+ nationality?: string | null;
8903
+ /**
8904
+ * @example MANDATORY
8905
+ * @enum {string}
8906
+ */
8907
+ iban: "MANDATORY" | "OPTIONAL" | "NONE";
8908
+ };
8874
8909
  DestinationValidationResult: {
8875
8910
  /** @description True when creating the destination with this payload would pass every check */
8876
8911
  valid: boolean;
@@ -1046,6 +1046,7 @@ export interface components {
1046
1046
  schemas: {
1047
1047
  InviteDto: {
1048
1048
  invite_code?: string;
1049
+ promo_code?: string;
1049
1050
  referrer?: string;
1050
1051
  };
1051
1052
  UserDataRefEntity: {
@@ -1126,6 +1127,7 @@ export interface components {
1126
1127
  };
1127
1128
  SignUpByTypeDto: {
1128
1129
  invite_code?: string;
1130
+ promo_code?: string;
1129
1131
  referrer?: string;
1130
1132
  /** @enum {string} */
1131
1133
  type: "email" | "phone";
@@ -1166,6 +1168,7 @@ export interface components {
1166
1168
  auth_date: string;
1167
1169
  hash: string;
1168
1170
  invite_code?: string;
1171
+ promo_code?: string;
1169
1172
  referrer?: string;
1170
1173
  };
1171
1174
  TelegramSignInByTgIdDto: {
@@ -1174,12 +1177,14 @@ export interface components {
1174
1177
  };
1175
1178
  SignInByEmailDto: {
1176
1179
  invite_code?: string;
1180
+ promo_code?: string;
1177
1181
  referrer?: string;
1178
1182
  email: string;
1179
1183
  redirect_url?: string;
1180
1184
  };
1181
1185
  SignInByPhoneDto: {
1182
1186
  invite_code?: string;
1187
+ promo_code?: string;
1183
1188
  referrer?: string;
1184
1189
  phone: string;
1185
1190
  };
@@ -4211,7 +4216,7 @@ export interface operations {
4211
4216
  "application/json": components["schemas"]["WalletKycRailTypeDto"];
4212
4217
  };
4213
4218
  };
4214
- /** @description KYC verification already processed */
4219
+ /** @description KYC verification already processed; or TERMS_NOT_ACCEPTED — the rail requires its terms with the submission (kyc_rails.terms_required), submit it with CORE POST /frontend/wallets/{wallet_id}/kyc-rails/{rail_id} and accepted_terms */
4215
4220
  400: {
4216
4221
  headers: {
4217
4222
  [name: string]: unknown;
@@ -919,8 +919,6 @@ export declare namespace API {
919
919
  export type Form = Schemas['KycFormsForm'];
920
920
  export type FormScope = Form['scope'];
921
921
  export type FormSection = Form['sections'][number];
922
- export type Terms = Schemas['KycFormsTerms'];
923
- export type TermsItem = Terms['items'][number];
924
922
  export type FormState = Schemas['KycFormsFormState'];
925
923
  export type Field = Schemas['KycFormsField'];
926
924
  export type FieldType = Field['type'];
@@ -1034,6 +1032,17 @@ export declare namespace API {
1034
1032
  }
1035
1033
  export {};
1036
1034
  }
1035
+ namespace Countries {
1036
+ type CountriesRoot = pathsV1Frontend['/frontend/reference/countries'];
1037
+ export type Country = componentsV1Frontend['schemas']['ReferenceCountry'];
1038
+ /** What the country's banks take as the account of an incoming SWIFT payment. */
1039
+ export type IbanRequirement = Country['iban'];
1040
+ export namespace List {
1041
+ type Request = NonNullable<CountriesRoot['get']['parameters']['query']>;
1042
+ type Response = CountriesRoot['get']['responses'][200]['content']['application/json'];
1043
+ }
1044
+ export {};
1045
+ }
1037
1046
  namespace OrderTypes {
1038
1047
  type OrderTypesRoot = pathsV1Frontend['/frontend/reference/order_types'];
1039
1048
  export type OrderType = componentsV1Frontend['schemas']['ReferenceOrderType'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.98",
3
+ "version": "1.36.100",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",