@zinn-digital/sdk 0.1.2044 → 0.1.2047

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.
@@ -45257,6 +45257,28 @@ export interface paths {
45257
45257
  patch?: never;
45258
45258
  trace?: never;
45259
45259
  };
45260
+ "/v1/payment-methods/stripe/confirm": {
45261
+ parameters: {
45262
+ query?: never;
45263
+ header?: never;
45264
+ path?: never;
45265
+ cookie?: never;
45266
+ };
45267
+ get?: never;
45268
+ put?: never;
45269
+ /**
45270
+ * Save a confirmed card now, without waiting for Stripe's webhook.
45271
+ * @description Re-reads the SetupIntent from **Stripe** and stores the mandate it confirmed. The browser only names the intent: an intent that has not succeeded, that belongs to another organization, or that was opened on a public door is refused with a 422 and nothing is stored.
45272
+ *
45273
+ * Idempotent, and it deliberately races Stripe's `setup_intent.succeeded` webhook: whichever arrives first writes the mandate and the other converges on it. The dashboard calls it when its wait for the webhook runs out, so a lost or late webhook still saves the card while the customer is on the page.
45274
+ */
45275
+ post: operations["confirmStripeMandateSetup"];
45276
+ delete?: never;
45277
+ options?: never;
45278
+ head?: never;
45279
+ patch?: never;
45280
+ trace?: never;
45281
+ };
45260
45282
  "/v1/payment-options": {
45261
45283
  parameters: {
45262
45284
  query?: never;
@@ -82519,6 +82541,11 @@ export interface components {
82519
82541
  default: components["schemas"]["CardReuse"];
82520
82542
  /** @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. */
82521
82543
  other_auto_renew?: ("paypal" | "crypto")[];
82544
+ /**
82545
+ * @description Why a card cannot renew when `shown` is false: `market` (this country's rule) or `reseller` (the account buys under an active reseller, so no mandate is kept). Empty when `shown` is true. Display only: it decides nothing about the payment.
82546
+ * @enum {string}
82547
+ */
82548
+ reason?: "" | "market" | "reseller";
82522
82549
  /** @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. */
82523
82550
  shown: boolean;
82524
82551
  };
@@ -84353,6 +84380,11 @@ export interface components {
84353
84380
  gateway?: string;
84354
84381
  /** @description Your own replay key. Optional; when absent the server mints one, so a double-submit is at worst a second deliberate-looking top-up rather than a silent double charge. */
84355
84382
  idempotency_key?: string;
84383
+ /**
84384
+ * Format: uuid
84385
+ * @description The saved card to charge: the `id` `POST /v1/payment-methods/stripe/confirm` returned for the card the customer just added (TOPUPCAP r10). That card is charged and nothing else. A 422 `refusal.commerce.paymentMethodCannotUsed` before anything is written or charged when it is not one of your chargeable Stripe cards, when `gateway` is not the card rail, or on a reseller's client wallet (the provider's gateway cannot charge a card saved with Zinn®). Omit it to charge your primary card.
84386
+ */
84387
+ payment_method_id?: string | null;
84356
84388
  };
84357
84389
  ClientWalletTopUpList: components["schemas"]["ClientWalletTopUp"][];
84358
84390
  /** @description What closing an organization would do, computed **before** anything is done and by the same function the closure runs. */
@@ -119179,6 +119211,15 @@ export interface components {
119179
119211
  items: components["schemas"]["StoreSupportTicket"][];
119180
119212
  next_before: string | null;
119181
119213
  };
119214
+ StripeMandateConfirmRequest: {
119215
+ /**
119216
+ * Format: uuid
119217
+ * @description Organization to attach the mandate to. The caller must hold `billing.payment.manage` in **that** organization, and Stripe's own answer must name the same organization.
119218
+ */
119219
+ org_id?: string;
119220
+ /** @description The `setup_intent_id` returned by `POST /v1/payment-methods`. */
119221
+ setup_intent_id: string;
119222
+ };
119182
119223
  /** @description An organization's subscription to a plan version. It pins the exact version and carries the **captured** price + entitlements — a purchase-time snapshot that later catalog or FX changes never alter (docs/05 §1). */
119183
119224
  Subscription: {
119184
119225
  /** @description What is still owed and what the last payment covered; `null` when nothing is owed. */
@@ -201387,6 +201428,36 @@ export interface operations {
201387
201428
  503: components["responses"]["ServiceUnavailable"];
201388
201429
  };
201389
201430
  };
201431
+ confirmStripeMandateSetup: {
201432
+ parameters: {
201433
+ query?: never;
201434
+ header?: never;
201435
+ path?: never;
201436
+ cookie?: never;
201437
+ };
201438
+ requestBody: {
201439
+ content: {
201440
+ "application/json": components["schemas"]["StripeMandateConfirmRequest"];
201441
+ };
201442
+ };
201443
+ responses: {
201444
+ /** @description The stored payment method. */
201445
+ 201: {
201446
+ headers: {
201447
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
201448
+ [name: string]: unknown;
201449
+ };
201450
+ content: {
201451
+ "application/json": components["schemas"]["PaymentMethod"];
201452
+ };
201453
+ };
201454
+ 401: components["responses"]["Unauthorized"];
201455
+ 403: components["responses"]["Forbidden"];
201456
+ 409: components["responses"]["Conflict"];
201457
+ 422: components["responses"]["UnprocessableEntity"];
201458
+ 429: components["responses"]["TooManyRequests"];
201459
+ };
201460
+ };
201390
201461
  getPaymentOptions: {
201391
201462
  parameters: {
201392
201463
  query: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2044",
3
+ "version": "0.1.2047",
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>",