@invonetwork/web-sdk 3.5.0 → 3.7.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,175 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Device approval grant (RFC 8628) is now a first-class server surface — including **the
8
+ step that moves the money**.
9
+
10
+ An integrator followed the README, polled a grant to `approved`, and stopped. Nothing
11
+ moved: an approved grant is a _factor_, and the transaction sat at
12
+ `pending_pin_verification` until it expired and was refunded. The README's section ended
13
+ at the poll and neither package had a method for the step after it. Both halves of that
14
+ are fixed here.
15
+
16
+ New on `InvoServer` (all authenticate with the **player token** — on a console the game
17
+ server holds the token it minted, and the game secret is never sent):
18
+
19
+ - `beginDeviceApproval({ playerToken, transactionId, flow, channel? })` → the RFC 8628
20
+ §3.2 grant (`deviceCode`, `userCode`, `verificationUriComplete`, `expiresIn`,
21
+ `interval`, `channel`). `channel: "popup"` is refused before the network — it is
22
+ browser-only (`InvoClient.approveHosted`).
23
+ - `pollDeviceApproval({ playerToken, deviceCode })` → a typed outcome
24
+ (`authorization_pending` / `slow_down` / `approved` / `access_denied` /
25
+ `expired_token`), plus the `enrollment` object while a first-time phone waits on the
26
+ game screen. `invalid_grant` throws.
27
+ - `confirmDeviceEnrollment({ playerToken, deviceCode, decision })` → answers the
28
+ on-screen match-code prompt (`"approve"` | `"deny"`).
29
+ - **`approveWithDeviceCode({ playerToken, transactionId, flow, deviceCode })` — the money
30
+ step.** Routes by flow: `send` → `/api/sdk/send/{id}/approve`, `transfer` →
31
+ `/api/sdk/transfers/{id}/approve`, `send_receipt` →
32
+ `/api/sdk/send/{id}/confirm-receipt`, `transfer_receipt` →
33
+ `/api/sdk/transfers/{id}/confirm-receipt`. Never auto-retried.
34
+ - `completeDeviceApproval(...)` — convenience loop: polls honouring `interval` and
35
+ `slow_down`, surfaces the enrollment prompt, then calls `approveWithDeviceCode`.
36
+
37
+ **`TRANSACTION_NOT_PENDING` is a result, not a throw.** `approveWithDeviceCode` returns
38
+ `{ status: "not_pending", alreadySettled, currentStatus }` so "your earlier attempt
39
+ already landed" is distinguishable from a real refusal **without string-matching** — the
40
+ difference between "the guard worked" and "her currency is stuck". Every other refusal
41
+ stays a typed thrown `InvoError`.
42
+
43
+ `alreadySettled` is **flow-aware and fails closed**. The four endpoints gate on different
44
+ status sets — the sender approves accept `pending_pin_verification` /
45
+ `pending_verification`, the two receipt endpoints accept `pending_claim` / `verified` — so
46
+ a receipt settle landing on `pending_pin_verification` means the SENDER has not approved
47
+ yet (possibly held at a guardian 202). That is _before_ the step, not past it, and calling
48
+ it settled would tell a game to hand over goods for value never credited. It is an
49
+ allow-list per flow rather than a "not expired/failed" deny-list, so a status INVO adds
50
+ later answers `alreadySettled: false` with `currentStatus` set — go read the transaction —
51
+ instead of defaulting to "the money moved" in already-deployed copies of this SDK.
52
+
53
+ Older backend bodies that carried only the message ("Transaction not pending…", "…cannot
54
+ be confirmed…") with no machine code are matched too, but narrowly: HTTP 400, one of those
55
+ two phrases, **and** a readable `(current status: …)` / `(status: …)` clause. "cannot be
56
+ confirmed" is ordinary English, so a phrase match alone can never assert that money moved.
57
+
58
+ New `InvoError` predicates: `isTransactionNotPending`, `currentTransactionStatus`,
59
+ `isDeviceApprovalNotApproved`, `isDeviceApprovalAlreadyPending`,
60
+ `deviceApprovalExpiresAt`, `isSettleFault`, `errorRef`. The RFC 8628 §3.5 tokens are
61
+ promoted onto `err.code`.
62
+
63
+ Two safety fixes in `completeDeviceApproval`: `transactionId` is validated **before** the
64
+ loop (an empty id used to poll for minutes, let the player approve, and only then throw —
65
+ an approved grant with nothing settled), and the `respond` callable handed to
66
+ `onEnrollment` now resolves quietly for every "the prompt is moot" refusal
67
+ (`expired_token`, `invalid_grant`, and the two enrollment 409s) instead of rejecting. A
68
+ prompt on a TV routinely outlives its ten-minute grant, callers fire `respond` without
69
+ awaiting it, and an unhandled rejection exits a Node process.
70
+
71
+ README: the console section is rewritten around begin → show the QR → poll → **call
72
+ `approveWithDeviceCode`** → webhooks, with the supersede-vs-409 begin semantics corrected
73
+ and "consumed when used" replaced by _when_ the code is spent. A new top-level **Sends and
74
+ transfers, stage by stage** section covers both flows and both sides with a
75
+ call-order table, an error table, and a common-mistakes box led by "polling to `approved`
76
+ and stopping". The error tables now also carry the receipt-flow-only refusals a console
77
+ recipient meets (`receiver_not_enrolled_use_claim_code`, `not_intended_receiver`, the
78
+ phone-share 409, `RECIPIENT_IDENTITY_PENDING` / `_DECLINED`) and a warning that a settle
79
+ FAILURE is ambiguous about the money — INVO commits and then reads the transaction back to
80
+ build its 200, so a `*_FAILED` or a timeout can both describe money that already moved:
81
+ read the transaction status before telling the player it failed, and never auto-start a
82
+ replacement. SMS is now confined to a clearly-labelled legacy-fallback subsection.
83
+
84
+ ## 3.6.0
85
+
86
+ ### Minor Changes
87
+
88
+ - New: `InvoClient.approveHosted({ transactionId, flow })` — web games approve on INVO's
89
+ hosted identity page. The browser is the RFC 8628 client: with the player token it already
90
+ holds, the SDK calls `POST /api/sdk/approvals/device/begin` with `channel: "popup"` (INVO
91
+ records the page's `Origin` as the popup's opener), opens the hosted page in a popup
92
+ (synchronously, inside your click handler), polls `poll` honouring `interval` and
93
+ `slow_down` (+5 s), drives the INVO-branded match-code prompt from the poll's `enrollment`
94
+ object ("Set up INVO on iPhone? Code 48-27. Say Yes only if the phone you just
95
+ scanned/opened shows this code." → `confirm-enrollment`; `confirmed` shows "Finishing on
96
+ iPhone… / Stop it, wrong code"; a 409 already-decided takes it down quietly), and when the
97
+ poll says `approved` calls the flow's approve endpoint with the `device_code` —
98
+ `transfers/{id}/approve`, `send/{id}/approve`, `send/{id}/confirm-receipt`,
99
+ `transfers/{id}/confirm-receipt`. Resolves `{ status: "approved", approval }` (the same
100
+ `ApproveResult` / `ConfirmReceiptResult` the in-app calls return) or `denied` / `expired` /
101
+ `closed` / `blocked` / `redirected`; rejects with `InvoError` when the backend refuses.
102
+ `device_code` lives in the call's closure only — never on the result, never logged. The
103
+ page's `postMessage` is a wake-up that triggers an immediate poll (accepted only from the
104
+ hosted page's https origin and only from the popup the SDK opened), never a result. A
105
+ popup blocked by the browser resolves `blocked` before anything is started (default);
106
+ `popupBlocked: "redirect"` opts in to a full-tab redirect. A page sending
107
+ `Cross-Origin-Opener-Policy: same-origin` is detected and reported as `blocked` with a
108
+ hint. Your server does nothing new; its `device_approval.approved` webhook still fires.
109
+ In-app partner-domain passkeys are unchanged and remain supported. `onEnrollment(e,
110
+ respond)` + `renderPrompt:false` let a game draw its own prompt.
111
+
112
+ Docs: new "Web games — approving on INVO's hosted page" section; the console-flow poll
113
+ example now shows `match_code`. Test-only devDependency added: `happy-dom`.
114
+
115
+ Docs (hosted identity pages, Phase 7): the console section documents `channel` on
116
+ `begin` (`qr` default | `popup` — the browser must call `begin` itself, its https `Origin`
117
+ becomes the popup's opener, server-to-server callers are refused | `app_browser` — the
118
+ mobile plugins; the return scheme `invo-sdk-<game_id>` is derived server-side), the echoed
119
+ `channel` on the begin body, `recovery` on the poll's `enrollment` object, the hosted
120
+ passkey-recovery flow (screen confirm + emailed single-use link → old INVO passkeys
121
+ deactivated, `identity.passkey_reset` webhook, 24-hour `PASSKEY_RECOVERY_COOLDOWN` on
122
+ money out; receiving unaffected), the mobile auto-confirm note (`app_browser` enrolment is
123
+ confirmed by INVO, no prompt), and `ENROLLMENT_REQUIRES_PROOF` on the page. Sends &
124
+ transfers: guardian approval now goes by email first (`consent_channel` and
125
+ `resend_endpoint` on the raw 202 `guardian_approval` block; `decision_source: "email_link"`),
126
+ the once-per-approval `POST /api/sdk/approvals/guardian/{approvalId}/resend` `{channel:"sms"}`
127
+ contract (initiator's token; 403/409/410/503 codes), and phone-share / recipient-identity
128
+ consents on the same hosted page (unchanged 409 / 202 codes, `consent_channel` on the
129
+ phone-share body). Passkeys: the partner-domain freeze — new titles have nothing to verify
130
+ (`409 PARTNER_RP_FROZEN`; `WEBAUTHN_NOT_ENABLED_FOR_TENANT` is the expected state, use
131
+ `approveHosted`), tenants with a domain verified before the freeze keep it, removal is
132
+ irreversible. The "SMS first, then email" fallback sentence corrected to "email first, SMS
133
+ on request". Documentation only.
134
+
135
+ ### Patch Changes
136
+
137
+ - Docs: the device-approval page (RFC 8628, consoles / TVs / native Steam and desktop
138
+ clients) now enrols the player's INVO passkey on the **first** scan, and the proof is the
139
+ game screen: the phone says "confirm on your game screen", the game shows "Set up INVO on
140
+ this phone: iPhone?", the player presses Yes on the console, and the phone's biometric
141
+ creates the passkey and approves — no code to type, no SMS; every later scan is scan,
142
+ biometric, done. The "the player needs an INVO passkey" bullet is replaced accordingly.
143
+ Documents the two integrator-facing additions: the `enrollment` object
144
+ (`state` / `device_label` / `requested_at`) on the `authorization_pending` poll body while
145
+ a phone is waiting, and `POST /api/sdk/approvals/device/confirm-enrollment`
146
+ (`{device_code, decision: "approve" | "deny"}`, same auth as begin/poll; deny ends the
147
+ grant with `access_denied`), plus the backup email. Also documents two backend
148
+ behaviours: `begin` extends the transaction's own approval window past the code's expiry
149
+ (`transfer` / `send`), and `begin` may be called again for the same transaction once an
150
+ approved code's window has passed. Documentation only — no code or type changes; the
151
+ `begin`/`poll` endpoints, the `device_approval.approved` webhook and its `method` value
152
+ are unchanged.
153
+
154
+ Also on the send side: the claim SMS now carries a link to a hosted INVO claim page where
155
+ a recipient without the game collects with one email + an emailed code + their phone's
156
+ passkey (in-game claim unchanged; `transfer.received` fires the same); documents the
157
+ sender-token REST call `POST /api/sdk/send/{transactionId}/resend-claim` (30-second
158
+ cooldown, 10 per transaction per hour — no SDK method); and that an uncollected send is
159
+ still refunded at 24 hours but the sender is now emailed and the recipient texted, with
160
+ `transfer.claim_expired` / `transfer.refunded` as the source of truth. The `transfer.*`
161
+ rows were added to the event-types table.
162
+
163
+ - df2efe9: Docs: add an explicit per-platform verification/approval recommendation. The
164
+ "gold standard" section now spells out which method fits which client — a passkey
165
+ directly on mobile app/web and desktop web, and the QR device-approval flow
166
+ (RFC 8628) on consoles **and** on native Steam / desktop game clients (Mac &
167
+ Windows), where it is the embedded game client, not the OS, that can't invoke the
168
+ platform authenticator. Also documents the SMS-first-then-email fallback for
169
+ remote approvals with no passkey path. Documentation only — no code or type
170
+ changes; the `VerificationMethod` union and the device-approval REST flow are
171
+ unchanged.
172
+
3
173
  All notable changes to `@invonetwork/web-sdk` are documented here. This project follows
4
174
  [Semantic Versioning](https://semver.org/). Releases are managed with
5
175
  [changesets](https://github.com/changesets/changesets).
@@ -8,17 +178,17 @@ All notable changes to `@invonetwork/web-sdk` are documented here. This project
8
178
 
9
179
  **The Steam purchase flow is now first-class SDK surface: `steamPacks()`, `steamInitPurchase()`, `steamFinalizePurchase()`** — plus browser-based checkout for platforms where the Steam overlay does not render, a finalize-poller error taxonomy, and webhook `channel` typing. No breaking changes.
10
180
 
11
- Until now the SDK only *steered away* from Steam (`purchaseCurrency` fails fast on `rail: "steam"`); the dedicated endpoints had to be called by hand. All three are typed methods now, and the fail-fast message names them.
181
+ Until now the SDK only _steered away_ from Steam (`purchaseCurrency` fails fast on `rail: "steam"`); the dedicated endpoints had to be called by hand. All three are typed methods now, and the fail-fast message names them.
12
182
 
13
183
  ### Added
14
184
 
15
185
  - **`InvoServer.steamPacks(query?)`** — the pack catalogue. `currencyAmount` is per-player (VAT and the storefront's revenue share come out of the sticker before currency is derived — a $4.99 pack yields 34, not 50, units at $1 = 10). Render it verbatim; never compute currency from price and never cache one answer for all players.
16
186
  - **`InvoServer.steamInitPurchase(input)`** — start the purchase. Idempotent on `purchaseReference` (retries, including manual retries after a 409, MUST reuse it). New authorization modes:
17
187
  - `usersession: "client"` (default, unchanged): Steam overlay in-game. The SDK sends **no** `usersession` key at all in this mode, pinned by test, so existing behaviour cannot shift.
18
- - `usersession: "web"`: for platforms where the overlay does not render (observed: Electron on macOS). Requires `playerIp` — the PLAYER's address, never your server's; refused client-side before the network without it. Returns `steamCheckoutUrl`: Steam's own hosted approval page, which must open as a **top-level tab** (it cannot be iframed). *Note: Steam's sandbox issues checkout URLs its production host will not serve, so web-session approval is provable only against production; the rest of the flow is identical to client-session.*
188
+ - `usersession: "web"`: for platforms where the overlay does not render (observed: Electron on macOS). Requires `playerIp` — the PLAYER's address, never your server's; refused client-side before the network without it. Returns `steamCheckoutUrl`: Steam's own hosted approval page, which must open as a **top-level tab** (it cannot be iframed). _Note: Steam's sandbox issues checkout URLs its production host will not serve, so web-session approval is provable only against production; the rest of the flow is identical to client-session._
19
189
  - `metadata` — echoed on the `purchase.completed` webhook (`data.metadata`) — the way to correlate your own player/order ids. The Steam rail merges its own context keys (`steam_wallet_currency`, `steam_country`, `steam_account_status`, `vat_rate_pct`) into the echoed object; avoid those names in yours.
20
190
  - **`InvoServer.steamFinalizePurchase({orderId})`** — capture + credit. Idempotent: a replay returns `alreadyProcessed: true` and never credits twice.
21
- - **Finalize poller taxonomy on `InvoError`** — because *not every 409 means "not yet"*, and a poller that assumes so polls a dead order forever:
191
+ - **Finalize poller taxonomy on `InvoError`** — because _not every 409 means "not yet"_, and a poller that assumes so polls a dead order forever:
22
192
  - `isSteamAuthorizationPending` — player has not approved yet (Steam reports `Init`). The normal wait state; poll again.
23
193
  - `isSteamAuthorizationDead` — any settled status — `Cancelled`, `Failed`, `Refunded`, `Chargedback`, and every other non-Init outcome (pending is the CLOSED set: only `Init` means "not yet"). Stop; no later call can succeed.
24
194
  - The two are mutually exclusive by construction, and a test pins that they can never both answer true.
@@ -85,14 +255,14 @@ client library understands the responses.
85
255
  player approves on their phone; your **server** polls
86
256
  `POST /api/sdk/approvals/device/poll` until it hears back.
87
257
  - **One approval authorises one transaction.** Unlike the plain RFC 8628 grant,
88
- which authorises a *client*, an INVO device code is bound to the transaction
258
+ which authorises a _client_, an INVO device code is bound to the transaction
89
259
  you named and is consumed when used — it cannot approve anything else and
90
260
  cannot be reused.
91
261
  - `user_code` is meant to be seen; `device_code` is not. Poll from your backend.
92
262
  - Subscribe to `device_approval.approved` to learn the moment an approval lands
93
263
  instead of waiting for the next poll. Polling still works alone.
94
264
  - Available to every title with nothing to configure — the constraint is a
95
- property of the *device*, not the game, so a title with a website and a
265
+ property of the _device_, not the game, so a title with a website and a
96
266
  console build uses the normal ceremony in the browser and this one on console.
97
267
  - Currency purchases on a console go through that console's store, as the
98
268
  platform holder requires; this flow is for approving transfers and sends.
@@ -109,7 +279,7 @@ the 3.2.2 Steam snippets that made them fail if copied.
109
279
  - **Base path.** The snippets said `/api/enhanced-purchase/...`. The routes are
110
280
  mounted at **`/api/currency-purchases/...`** -- `enhanced_purchase_api` is the
111
281
  module name, not the mount point. Copying 3.2.2 returned `404 Resource not
112
- found`, which reads like the Steam rail is unavailable rather than like a
282
+ found`, which reads like the Steam rail is unavailable rather than like a
113
283
  wrong URL.
114
284
  - **Auth header.** The snippets sent `X-Game-Secret`. The header is
115
285
  **`X-Game-Secret-Key`**, as it is everywhere else in this document. An unknown
@@ -202,9 +372,8 @@ one exists (`STRIPE_ERROR` becomes `PROCESSOR_ERROR`), and the literal wire valu
202
372
  `err.rawCode` for anyone already matching it. Refund reads prefer
203
373
  `processor_refund_reference` over the vendor-named field, with a fallback.
204
374
 
205
-
206
375
  **Storefront keys are still server-side keys.** A storefront key names where the
207
- *purchase* came from, not where the key lives. It belongs in your backend exactly like
376
+ _purchase_ came from, not where the key lives. It belongs in your backend exactly like
208
377
  your original key -- never in a game client, an app bundle, or browser code.
209
378
 
210
379
  ## [3.1.0] — 2026-08-04
@@ -220,6 +389,7 @@ verification options; they are not, and the docs said so in a way that produced
220
389
  integrations.
221
390
 
222
391
  ### Added — error-contract classifiers
392
+
223
393
  Three 403s that previously arrived as a generic `InvoError` (correct `status`/`code`/`message`,
224
394
  but no typed branch) now have classifiers:
225
395
 
@@ -239,6 +409,7 @@ Note the backend splits field names across these: the `*_GAME_NOT_LIVE` pair use
239
409
  already read both, so `err.code` is populated either way — the new tests pin both shapes.
240
410
 
241
411
  ### Clarified — the SDK does not, and did not, collapse non-2xx into transport errors
412
+
242
413
  Following a report of a `403` being debugged as a network outage: verified end-to-end that a
243
414
  non-2xx always surfaces with its real `status`, `code`, and `message`, and that `status: 0` is
244
415
  reserved for a genuine absence of an HTTP response. **No fix was needed in the SDK** — the loss
@@ -248,36 +419,40 @@ anti-pattern and the correct handler, and a note that `409` is a retryable not-r
248
419
  rather than a failure.
249
420
 
250
421
  ### Deprecated
422
+
251
423
  - **`InvoServer.verifySmsTransfer` / `InvoServer.verifySmsSend`** — marked `@deprecated`. They
252
424
  still work exactly as before and still hit the same endpoints. A **future major version will
253
425
  remove them**; no date is committed yet. Keep them only as a genuine last resort for users who
254
426
  cannot enroll a passkey (unsupported device, no platform authenticator) or who decline.
255
427
  **Migration:** when `initiateSend`/`initiateTransfer` returns `verificationMethod: "sms"`, read
256
- it as *"this sender has no passkey"* — prompt `InvoClient.enrollPasskey()` and then
428
+ it as _"this sender has no passkey"_ — prompt `InvoClient.enrollPasskey()` and then
257
429
  `InvoClient.approveSend` / `approveTransfer`, instead of routing to a PIN pad.
258
430
 
259
431
  ### Changed (documentation only)
432
+
260
433
  - New README section — **"Passkeys are the gold standard — don't build on SMS"** — with the
261
434
  do/don't table, the deprecation notice, and an explicit list of the OTP surfaces that are
262
435
  **not** discouraged.
263
436
  - `VerificationMethod`, `InitiateResult.verificationMethod` and `SmsVerifyResult` doc comments
264
437
  reframed: `"in_app"` and `"sms"` are no longer presented as peer options.
265
- - "Before you go live" now stresses configuring RP ID / origins *before* launch, since an
438
+ - "Before you go live" now stresses configuring RP ID / origins _before_ launch, since an
266
439
  unconfigured tenant silently drops every sender onto the deprecated path.
267
440
  - **New "Prerequisite: passkeys are dark until your tenant verifies a domain" subsection.**
268
441
  Recommending passkeys without saying what unlocks them would send developers straight into a
269
442
  `403` on their first `enrollPasskey()` call — with 0/3 prod tenants configured, that is
270
- currently *everyone*. The deprecation carries no removal date for the same reason.
443
+ currently _everyone_. The deprecation carries no removal date for the same reason.
271
444
  - Stability section corrected — it still claimed `2.0.0` was the only major, which `3.0.0`
272
445
  made false.
273
446
  - Design doc: `docs/features/passkey-first-authentication.md`.
274
447
 
275
448
  ### Not affected — still recommended
449
+
276
450
  `enrollmentBegin`/`enrollmentVerify`, `recoveryBegin`/`recoveryComplete`, and
277
- `phoneShareInitiate`/`phoneShareApprove` all involve a one-time code but are the on-ramp *to* a
451
+ `phoneShareInitiate`/`phoneShareApprove` all involve a one-time code but are the on-ramp _to_ a
278
452
  passkey (or phone-ownership consent), not a substitute for one. They are **not** deprecated.
279
453
 
280
454
  ### Upgrade note
455
+
281
456
  The only way this release can surface in a pipeline is a lint rule that treats `@deprecated`
282
457
  usage as an error (e.g. `deprecation/deprecation` with `--max-warnings 0`). That is a lint-level
283
458
  signal, not a build or runtime break, and it is the intended notice.
@@ -292,6 +467,7 @@ on the `platform_commerce.purchased` webhook. Note: the card leg is pending fina
292
467
  the backend (sandbox payment test) — the balance leg is fully live.
293
468
 
294
469
  ### Migration from 2.5.x (card leg only — balance/status/refund/webhooks unchanged)
470
+
295
471
  - `platformCommerce.purchase({ fundingSource: "card" })`: **remove `billingAddress`** (the type
296
472
  is gone; the hosted page collects it) and optionally pass `successUrl` / `cancelUrl` /
297
473
  `metadata`. The result now carries `checkoutUrl` / `sessionId` / `expiresAt` (unix seconds) /
@@ -305,6 +481,7 @@ the backend (sandbox payment test) — the balance leg is fully live.
305
481
  the same checkout session** (`idempotentReplay: true`), so a lost response is recoverable.
306
482
 
307
483
  ### Added
484
+
308
485
  - `PlatformPurchaseInput.successUrl/cancelUrl/metadata`; result fields
309
486
  `sessionId/checkoutUrl/expiresAt/idempotentReplay`.
310
487
  - `InvoClient.platformCommerce.mountCheckout(el, checkoutUrl, opts)` → `{ iframe, destroy() }`.
@@ -313,6 +490,7 @@ the backend (sandbox payment test) — the balance leg is fully live.
313
490
  - Card `requires_payment` responses without a `checkout_url` fail closed (`INVALID_RESPONSE`).
314
491
 
315
492
  ### Removed
493
+
316
494
  - `confirmCardPayment`, `mountCardPayment`, `commercePublishableKey`, `BillingAddress`, and the
317
495
  card-element/processor types + the runtime CDN script loader (no more processor touchpoints
318
496
  in this SDK at all).
@@ -323,6 +501,7 @@ Hardening patch from a second, independent post-release audit (correctness vs th
323
501
  blueprint + security red-team) of the 2.5.0 Platform Commerce feature. No API breaks.
324
502
 
325
503
  ### Fixed
504
+
326
505
  - **Card-confirm script loader could hang forever on retry.** After a transient CDN failure
327
506
  (or a pre-existing processor `<script>` tag whose events already fired), the next
328
507
  `mountCardPayment`/`confirmCardPayment` attached listeners to a dead tag and never settled —
@@ -348,6 +527,7 @@ blueprint + security red-team) of the 2.5.0 Platform Commerce feature. No API br
348
527
  (`{status,error_code,message}` / bare `{message}`), not idealized shapes.
349
528
 
350
529
  ### Docs
530
+
351
531
  - Card-leg lost-response caveat on `purchase` (duplicate 409 can strand a `clientSecret`-less
352
532
  pending order — reconcile via webhook/`getStatus`, retry with a NEW `clientRequestId`).
353
533
  - `confirmCardPayment`: bank-redirect return-leg guidance + remount-after-decline note;
@@ -358,7 +538,7 @@ blueprint + security red-team) of the 2.5.0 Platform Commerce feature. No API br
358
538
  **Platform Commerce (ecommerce).** A new flow for **platform** tenants (non-game apps: vertical
359
539
  video, creator merch, marketplace) to sell items funded by **INVO balance or a real card**, with
360
540
  INVO as merchant of record and full refunds. This is **distinct from item purchase** — that is a
361
- *game* tenant spending a player's *existing game currency* on an *in-game* item (balance only, no
541
+ _game_ tenant spending a player's _existing game currency_ on an _in-game_ item (balance only, no
362
542
  card, no refund). Additive; only platform tenants can call it (a game tenant gets `403
363
543
  NOT_A_PLATFORM_TENANT`). (Backend handoff: BE-PIP-009 `PLATFORM_COMMERCE_SDK.md`.)
364
544
 
@@ -373,7 +553,7 @@ NOT_A_PLATFORM_TENANT`). (Backend handoff: BE-PIP-009 `PLATFORM_COMMERCE_SDK.md`
373
553
  - **Browser** (`InvoClient.platformCommerce`):
374
554
  - `confirmCardPayment(clientSecret, { mount, publishableKey?, returnUrl?, submit? })` — mounts
375
555
  the card element and confirms; returns `{ status: "succeeded" | "requires_action" |
376
- "processing" | "failed" }`. The processor JS is **lazy-loaded from its CDN — no bundled
556
+ "processing" | "failed" }`. The processor JS is **lazy-loaded from its CDN — no bundled
377
557
  dependency**; pass its publishable key (or set `commercePublishableKey` on the client config).
378
558
  - `mountCardPayment(clientSecret, opts)` — the primitive: `{ element, confirm(), destroy() }`
379
559
  to confirm from your own Pay button.