squarefi-bff-api-module 1.36.36 → 1.36.38

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.
@@ -1543,7 +1543,13 @@ export interface paths {
1543
1543
  * @description Uploads KYC files against a wallet via `multipart/form-data`, with no
1544
1544
  * cardholder involved. The form field name is the document type
1545
1545
  * (`selfie`, `gov_id_front`, `gov_id_back`); one file per type, 5MB max
1546
- * each, formats png/jpeg/pdf.
1546
+ * each, photos only (png/jpeg).
1547
+ *
1548
+ * Send the file the camera produced, unchanged: cropping, resizing or
1549
+ * re-encoding a document photo can make the vendor's tampering check
1550
+ * answer `Forgery attempt has been made.` — a verdict far worse than the
1551
+ * poor quality it was meant to fix. Too small to read means retake it
1552
+ * (card filling the frame, straight, no glare), not improve the file.
1547
1553
  *
1548
1554
  * Send one file per request to get per-file progress and retry a single
1549
1555
  * file, or send several at once. The response returns an `id` per file;
@@ -1878,11 +1884,12 @@ export interface paths {
1878
1884
  */
1879
1885
  cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
1880
1886
  /**
1881
- * @description Identity document type (KYC vendors)
1887
+ * @description Identity document type (KYC vendors). Which values are accepted depends on the country that issued the document — read cardholder_requirements.country_rules[gov_id_country].gov_id_types instead of hardcoding the list (id_card_cn is the mainland China resident ID, id_card_hk the HKID).
1888
+ *
1882
1889
  * @enum {string}
1883
1890
  */
1884
- gov_id_type?: "passport" | "id_card" | "driving_license";
1885
- /** @description Identity document number */
1891
+ gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
1892
+ /** @description Identity document number (passport / driving licence / national ID). */
1886
1893
  gov_id_number?: string;
1887
1894
  /**
1888
1895
  * @description Issuing country of the identity document (2-3 letter code)
@@ -1896,9 +1903,16 @@ export interface paths {
1896
1903
  gov_id_issuance_date?: string;
1897
1904
  /**
1898
1905
  * Format: date
1899
- * @description Identity document expiry date (YYYY-MM-DD)
1906
+ * @description Identity document expiry date (YYYY-MM-DD). Required by the vendor review even for a document issued for life (an Indonesian KTP, "SEUMUR HIDUP"), which has no expiry printed on it — send the issuance date plus 100 years.
1907
+ *
1900
1908
  */
1901
1909
  gov_id_expiration_date?: string;
1910
+ /**
1911
+ * @description Tax identifier of the cardholder, separate from the document number. Required by Interlace CONSUMER programs when nationality is USA, where it must be a valid SSN (9 digits or XXX-XX-XXXX).
1912
+ *
1913
+ * @example 123-45-6789
1914
+ */
1915
+ tax_identification_number?: string;
1902
1916
  /** @description Cardholder's address */
1903
1917
  address?: {
1904
1918
  /**
@@ -1913,7 +1927,11 @@ export interface paths {
1913
1927
  line2?: string;
1914
1928
  /** @example New York */
1915
1929
  city?: string;
1916
- /** @example NY */
1930
+ /**
1931
+ * @description Subdivision. Required for a US or Canadian address and must be the two-letter code (AL, ON); optional elsewhere.
1932
+ *
1933
+ * @example NY
1934
+ */
1917
1935
  state?: string;
1918
1936
  /** @example 10001 */
1919
1937
  postal_code?: string;
@@ -2261,6 +2279,16 @@ export interface paths {
2261
2279
  * **Retryable**: a failed submit leaves the draft untouched — complete the dossier and
2262
2280
  * call this endpoint again.
2263
2281
  *
2282
+ * **After a rejection**: a cardholder whose identity review came back
2283
+ * `review_status: REJECTED` or `REQUEST` (read it, with `reject_reason`, from
2284
+ * `GET /api/issuing/cardholders/{cardholder_id}`) may be submitted again. Fix what the
2285
+ * vendor named — `PATCH` the field, or upload a better photo and re-attach it via
2286
+ * `POST /cardholders/{cardholder_id}/documents`, which replaces the document of that
2287
+ * type — then call this endpoint once more. The review restarts on the vendor account the
2288
+ * person already has: the same document cannot be registered twice at the vendor, so a
2289
+ * fresh cardholder is NOT the way to retry. While a review is running, another submit is
2290
+ * refused with `409`.
2291
+ *
2264
2292
  * **Authentication**: x-api-key header required
2265
2293
  *
2266
2294
  */
@@ -2320,7 +2348,7 @@ export interface paths {
2320
2348
  "application/json": components["schemas"]["ApiErrorResponse"];
2321
2349
  };
2322
2350
  };
2323
- /** @description Cardholder is not a draft (already submitted) */
2351
+ /** @description Cardholder is live at the vendor, or its review is still running */
2324
2352
  409: {
2325
2353
  headers: {
2326
2354
  [name: string]: unknown;
@@ -5072,10 +5100,10 @@ export interface paths {
5072
5100
  *
5073
5101
  * Two-phase: the order is created in `NEW` status without touching the
5074
5102
  * balance; `POST /api/orders/{id}/approve` checks the balance, debits the
5075
- * funds and dispatches the on-chain send. If the destination address
5076
- * belongs to a wallet in the same tenant, the order is created as
5077
- * `OMNIBUS_INTERNAL_TRANSFER` (no on-chain transaction) — still `NEW` at
5078
- * create, debited + settled synchronously to `COMPLETE` at approve.
5103
+ * funds and dispatches the on-chain send. This endpoint is external-only:
5104
+ * the order always goes on-chain, even if the destination address belongs
5105
+ * to a wallet on this platform. Internal (off-chain) transfers are created
5106
+ * only through the internal transfer endpoint.
5079
5107
  *
5080
5108
  * **Prerequisites:**
5081
5109
  * - A counterparty destination of type `CRYPTO_EXTERNAL` or `CRYPTO_INTERNAL`
@@ -7347,6 +7375,59 @@ export interface components {
7347
7375
  type?: string;
7348
7376
  /** @description Whether cards can be tokenized */
7349
7377
  tokenizable?: boolean;
7378
+ /** @description What a cardholder on this program must carry. Set per program in the vendor config, so it can change without a release — read it instead of hardcoding the form. */
7379
+ cardholder_requirements?: {
7380
+ /**
7381
+ * @description Cumulative KYC level; each level includes the previous one
7382
+ * @enum {string}
7383
+ */
7384
+ level?: "minimal" | "basic" | "full";
7385
+ /**
7386
+ * @description Required field names; address fields are dotted (address.line1). Interlace CONSUMER also lists gov_id_issuance_date and gov_id_expiration_date (ISO YYYY-MM-DD).
7387
+ * @example [
7388
+ * "first_name",
7389
+ * "last_name",
7390
+ * "email",
7391
+ * "phone",
7392
+ * "birth_date",
7393
+ * "nationality"
7394
+ * ]
7395
+ */
7396
+ required?: string[];
7397
+ /** @description Documents that must be attached; empty below the full level */
7398
+ required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
7399
+ /** @description Human-readable constraints the field list cannot express. Interlace CONSUMER: if nationality is USA, tax_identification_number is required and must be a valid SSN. */
7400
+ notes?: string[];
7401
+ /** @description What each country changes, keyed by ISO 3166-1 alpha-3 with a `default` entry; empty when the vendor reviews nothing. These fields stay out of `required` because they only hold once the nationality or address country is known: read the rule for the nationality the user picked (required_by_nationality), the rule for the address country (required_by_address), and the rule for the country that issued the document (gov_id_types). */
7402
+ country_rules?: {
7403
+ [key: string]: {
7404
+ /**
7405
+ * @description gov_id_type values accepted for a document issued by this country
7406
+ * @example [
7407
+ * "passport",
7408
+ * "driving_license",
7409
+ * "id_card"
7410
+ * ]
7411
+ */
7412
+ gov_id_types?: string[];
7413
+ /**
7414
+ * @description Extra fields a person of this nationality must provide
7415
+ * @example [
7416
+ * "tax_identification_number"
7417
+ * ]
7418
+ */
7419
+ required_by_nationality?: string[];
7420
+ /**
7421
+ * @description Extra fields an address in this country must carry
7422
+ * @example [
7423
+ * "address.state"
7424
+ * ]
7425
+ */
7426
+ required_by_address?: string[];
7427
+ notes?: string[];
7428
+ };
7429
+ };
7430
+ };
7350
7431
  /** @description Available order types */
7351
7432
  order_types?: Record<string, never>[];
7352
7433
  /** @description KYC requirements */
@@ -7902,10 +7983,15 @@ export interface components {
7902
7983
  };
7903
7984
  ApiCryptoTransferRequest: {
7904
7985
  /**
7905
- * @description Amount to send, in `from_currency_id` units.
7986
+ * @description Amount to send, in `from_currency_id` units. With `is_reverse: true` — the amount the recipient must receive, in destination-currency units.
7906
7987
  * @example 100
7907
7988
  */
7908
7989
  amount: number;
7990
+ /**
7991
+ * @description Optional. When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
7992
+ * @default false
7993
+ */
7994
+ is_reverse: boolean;
7909
7995
  /**
7910
7996
  * Format: uuid
7911
7997
  * @description UUID of the source currency to debit from the wallet's omnibus balance. Get the list from `GET /api/reference/currencies`.
@@ -7948,10 +8034,15 @@ export interface components {
7948
8034
  };
7949
8035
  ApiOfframpOrderRequest: {
7950
8036
  /**
7951
- * @description Amount to send, in `from_currency_id` units.
8037
+ * @description Amount to send, in `from_currency_id` units. With `is_reverse: true` — the amount the recipient must receive, in destination-currency units.
7952
8038
  * @example 1000
7953
8039
  */
7954
8040
  amount: number;
8041
+ /**
8042
+ * @description Optional. When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
8043
+ * @default false
8044
+ */
8045
+ is_reverse: boolean;
7955
8046
  /**
7956
8047
  * Format: uuid
7957
8048
  * @description Source currency UUID. Get from `GET /api/reference/currencies`.
@@ -7995,10 +8086,15 @@ export interface components {
7995
8086
  };
7996
8087
  ApiExchangeOrderRequest: {
7997
8088
  /**
7998
- * @description Amount to exchange, in `from_currency_id` units.
8089
+ * @description Amount to exchange, in `from_currency_id` units. With `is_reverse: true` — the amount to receive, in `to_currency_id` units.
7999
8090
  * @example 100
8000
8091
  */
8001
8092
  amount: number;
8093
+ /**
8094
+ * @description Optional. When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
8095
+ * @default false
8096
+ */
8097
+ is_reverse: boolean;
8002
8098
  /**
8003
8099
  * Format: uuid
8004
8100
  * @description Source currency UUID. Get from `GET /api/reference/currencies`.