@zinn-digital/sdk 0.1.1959 → 0.1.1963

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.
@@ -41966,7 +41966,7 @@ export interface paths {
41966
41966
  *
41967
41967
  * Account credit pays first, exactly as on `payOrder`: the card is asked only for the remainder, and the credit is drawn only when the card part is confirmed captured, so an abandoned or failed challenge costs no credit. When credit pays the whole order no card payment is opened and `status` is `covered_by_credit`: settle with `payOrder`.
41968
41968
  *
41969
- * Pay once is the default: the card is kept for renewals only when `save_card` is true.
41969
+ * The card is kept for renewals only when `save_card` is true AND the account's market lets a card renew unattended (`CardReuseOffer.shown`); otherwise it pays once. The pay step starts with "Renew automatically" ticked (owner, 2026-11-21). After a `payment_failed` with `recurring_refused`, opening again with `save_card` false cancels the declined card-keeping payment and opens a one-time one.
41970
41970
  *
41971
41971
  * Opens are limited per organisation and per order (each one reads the processor); over the limit the answer is `429` with `Retry-After`. A repeated call for the same order within the limit returns the same open payment.
41972
41972
  */
@@ -81025,7 +81025,7 @@ export interface components {
81025
81025
  state: "queued" | "unavailable";
81026
81026
  };
81027
81027
  /**
81028
- * @description A preference between paying once (`once`) and saving the card for automatic renewal (`save_for_renewals`). Today it is only stored as the account's preference (`card_reuse_default`): no card-payment request carries it and no payment reads it, so a card added at a signed-in card step is still saved to the account.
81028
+ * @description A preference between paying once (`once`) and saving the card for automatic renewal (`save_for_renewals`), stored as the account's preference (`card_reuse_default`). An order card payment (`startOrderCardPayment`) resolves the request's `save_card` through the same rule: the card is kept only when the request asks for it and the account's market lets a card renew unattended; otherwise the payment is one-time.
81029
81029
  * @example once
81030
81030
  * @enum {string}
81031
81031
  */
@@ -81043,7 +81043,9 @@ export interface components {
81043
81043
  */
81044
81044
  country: string;
81045
81045
  default: components["schemas"]["CardReuse"];
81046
- /** @description Whether this account's market allows an unattended card charge, so a choice to save the card could be offered. `false` in a market where it cannot be made. Informational: no screen offers the choice yet. */
81046
+ /** @description The non-card methods that can renew automatically on this platform right now (PayPal when its gateway is enabled; crypto when crypto auto-renew is switched on and NOWPayments is configured). The card step names them in its one-line warning when a card cannot renew (`shown: false`) or the bank refused the recurring mandate. */
81047
+ other_auto_renew?: ("paypal" | "crypto")[];
81048
+ /** @description Whether this account's market allows an unattended card charge, so "Renew automatically" is offered for a card. `false` in a market where it cannot be made (the `BillingMarketRule` table): the card pays once, and PayPal or crypto may still renew automatically. */
81047
81049
  shown: boolean;
81048
81050
  };
81049
81051
  Cart: {
@@ -82275,6 +82277,8 @@ export interface components {
82275
82277
  * @example paypal
82276
82278
  */
82277
82279
  gateway?: string | null;
82280
+ /** @description The customer pays with a card they enter **after** the order is placed (DAY-0718). `true`: the order is placed `pending_payment` and **nothing is charged**, not even a saved card (it wins over `payment_method_id`); a replay with the same `Idempotency-Key` charges nothing either. The browser then pays it with `createOrderCardPayment`, which handles 3-D Secure in the page and keeps the card for renewals only when the customer leaves "Renew automatically" ticked. A free order settles as before. Omitted or `false`: the behaviour described for `gateway`. ⛔ No schema `default` (a defaulted property becomes REQUIRED in the generated TypeScript). */
82281
+ new_card?: boolean;
82278
82282
  /**
82279
82283
  * Format: uuid
82280
82284
  * @description Which of the organisation's **own saved cards** pays (row 1107#10, owner 2026-11-07: *"they can save more than one card right so if so can they select it"*). An `id` from `listPaymentMethods` that is active, confirmed, unexpired and on the chosen `gateway`. The charge is pinned to that card for this order only; the account's primary and backup roles are not changed. Omit it (or send `null`) and the primary is tried first, then the backup, as before. Any other id (another organisation's, a revoked or expired card, a card on another rail) is refused `422` with `details[0].field = payment_method_id` before any order is placed.
@@ -98220,6 +98224,8 @@ export interface components {
98220
98224
  order_status?: string;
98221
98225
  /** @description The other gateways this order may be paid on (`getOrderPaymentOptions`). */
98222
98226
  other_rails?: string[];
98227
+ /** @description On `payment_failed` only. The declined payment asked to keep the card and the bank refused it in a way that can mean it refused automatic renewal (`bank_declined`, `card_unusable`). The pay step switches to a one-time payment, says why, and offers PayPal or crypto to renew automatically. */
98228
+ recurring_refused?: boolean;
98223
98229
  settled: boolean;
98224
98230
  /** @enum {string} */
98225
98231
  status: "paid" | "requires_action" | "processing" | "held" | "payment_failed";
@@ -98231,7 +98237,7 @@ export interface components {
98231
98237
  * @description What the card is asked for, in minor units (the order total less credit).
98232
98238
  */
98233
98239
  amount_minor: number;
98234
- /** @description True only when the customer ticked "save this card": the processor keeps the card for off-session renewals. False (the default) is pay once; nothing is kept. */
98240
+ /** @description True only when the customer asked to renew automatically and the market allows it: the processor keeps the card for off-session renewals. False is pay once; nothing is kept. */
98235
98241
  card_reuse_applied?: boolean;
98236
98242
  /** @description The processor's client secret, for `confirmPayment` in the browser only. Never stored or logged by the client. Absent when `status` is `covered_by_credit`. */
98237
98243
  client_token?: string;
@@ -117923,6 +117929,11 @@ export interface components {
117923
117929
  /** @description The caller's own handle, echoed back. ⛔ Must be **unique** within the request — the response is matched by `ref` rather than by position, so duplicates would collapse and render one price for two products. A repeat is a 422 rather than a silent de-duplication. */
117924
117930
  ref: string;
117925
117931
  }[];
117932
+ /**
117933
+ * Format: uuid
117934
+ * @description Signed-in route only, optional (the public route ignores it). The caller's ACTIVE organisation, as the dashboard's org switcher scopes every read: the quote is rated on that org's stored billing country and VAT status. Honoured only when the caller is a member of it; any other id is ignored (never looked up, never a 403), so a quote can never reveal another organisation's country. Without it, a caller with more than one membership is rated as a guest (CARTVAT-1121).
117935
+ */
117936
+ org_id?: string;
117926
117937
  /** @description Absent means false. Which question is asked. `false` prices a BASKET exactly as its invoice will be rounded (VAT once per rate group, leftover cents by largest remainder), so the totals are what checkout charges: use it for a cart or checkout. `true` prices a LIST of independent items, each rated as its own one-item invoice, so an item shows the same cents whatever else is in the request: use it for a price list or plan table. The totals of a `per_item` quote are a sum of standalone prices, not a basket. Only a literal `true` enables it. */
117927
117938
  per_item?: boolean;
117928
117939
  /** @description Public route only (the signed-in route prices on the stored billing profile and ignores it). The VAT number the visitor typed at checkout. It needs `country` in the body. A number that is malformed, longer than 32 characters, sent without a country, or whose prefix names another country is never sent to the registry and answers `vat_check.status: not_confirmed` (the quote itself is not refused; the checkout refuses a mismatched prefix with a `422`). The **server** asks the VAT registry (3 second cut-off; answers are cached by a hash of country and number, a confirmation for 24 hours, anything else for 10 minutes; lookups are rate-limited per visitor and per cart) and prices on its own answer: the caller never states whether the number is valid. The answer comes back as `vat_check`. */
@@ -193729,7 +193740,7 @@ export interface operations {
193729
193740
  content: {
193730
193741
  "application/json": {
193731
193742
  /**
193732
- * @description The customer ticked "save this card" for automatic renewals.
193743
+ * @description The customer left "Renew automatically" ticked (it starts ticked). Ignored where the market does not let a card renew unattended.
193733
193744
  * @default false
193734
193745
  */
193735
193746
  save_card?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1959",
3
+ "version": "0.1.1963",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",