@zinn-digital/sdk 0.1.1960 → 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;
@@ -193734,7 +193740,7 @@ export interface operations {
193734
193740
  content: {
193735
193741
  "application/json": {
193736
193742
  /**
193737
- * @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.
193738
193744
  * @default false
193739
193745
  */
193740
193746
  save_card?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1960",
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>",