@invonetwork/web-sdk 3.2.2 → 3.2.3
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 +22 -0
- package/README.md +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to `@invonetwork/web-sdk` are documented here. This project
|
|
|
4
4
|
[Semantic Versioning](https://semver.org/). Releases are managed with
|
|
5
5
|
[changesets](https://github.com/changesets/changesets).
|
|
6
6
|
|
|
7
|
+
## [3.2.3] - 2026-08-28
|
|
8
|
+
|
|
9
|
+
**Documentation only. No code changes, no API changes.** Corrects two errors in
|
|
10
|
+
the 3.2.2 Steam snippets that made them fail if copied.
|
|
11
|
+
|
|
12
|
+
- **Base path.** The snippets said `/api/enhanced-purchase/...`. The routes are
|
|
13
|
+
mounted at **`/api/currency-purchases/...`** -- `enhanced_purchase_api` is the
|
|
14
|
+
module name, not the mount point. Copying 3.2.2 returned `404 Resource not
|
|
15
|
+
found`, which reads like the Steam rail is unavailable rather than like a
|
|
16
|
+
wrong URL.
|
|
17
|
+
- **Auth header.** The snippets sent `X-Game-Secret`. The header is
|
|
18
|
+
**`X-Game-Secret-Key`**, as it is everywhere else in this document. An unknown
|
|
19
|
+
header is ignored, so the request arrived unauthenticated.
|
|
20
|
+
|
|
21
|
+
Both were confined to the Steam section added in 3.2.2; every other snippet was
|
|
22
|
+
correct. The Steam flow itself is unchanged -- pack catalogue, `pack_id`,
|
|
23
|
+
VAT-aware amounts, all exactly as 3.2.2 describes.
|
|
24
|
+
|
|
25
|
+
The paths and header are now pinned by a test against this file, because the
|
|
26
|
+
Steam section is the one snippet with no SDK method behind it and so was the one
|
|
27
|
+
thing no test could see.
|
|
28
|
+
|
|
7
29
|
## [3.2.2] - 2026-08-28
|
|
8
30
|
|
|
9
31
|
**Documentation only. No code changes, no API changes.**
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
First-party TypeScript SDK for integrating **INVO** into partner **web** platforms (storefronts, web games, dashboards). It wraps INVO's web money flows behind a typed, versioned API — the web analog of the Unity/Unreal plugins.
|
|
4
4
|
|
|
5
|
-
> **Status:** `v3.
|
|
5
|
+
> **Status:** `v3.2.3` — stable, published on npm. The backend it wraps is **live** on sandbox + production. The API is covered by a [stability commitment](#stability): no breaking changes without a major bump. Recent highlights: **3.2.3** corrects the base path and auth header in the Steam snippets (`/api/currency-purchases`, `X-Game-Secret-Key`) — 3.2.2 published both wrong, and copying them returned a 404; **3.2.x** documents **Steam currency purchases on a pack model** — INVO owns the catalogue, you pass a `pack_id` and never a price, and the currency inside a pack varies by country because Steam prices are VAT-inclusive; **3.1.0** makes the authentication guidance explicit — **[passkeys are the gold standard](#passkeys-are-the-gold-standard-dont-build-on-sms)** and the SMS-PIN completion (`verifySmsTransfer`/`verifySmsSend`) is **deprecated and being phased out** (documentation only — no behavior change, no runtime warnings); **3.0.0** moves the Platform Commerce card leg to **INVO's hosted checkout** — the server `purchase()` now returns a `checkoutUrl` and the browser just sends the buyer there (redirect or `mountCheckout` iframe); the 2.5.x card-element surface (`confirmCardPayment`/`mountCardPayment`, `billingAddress`, `commercePublishableKey`) is **removed** — see the [CHANGELOG](CHANGELOG.md) migration note; **2.5.0** added **Platform Commerce** (ecommerce) — a platform tenant selling items funded by balance **or** card, with `invo.platformCommerce.purchase/getStatus/refund` (server) and the `platform_commerce.*` webhooks; **2.4.0** adds Steam transfer-policy handling (`isSteamValueNonTransferable`/`isNonSteamValueIntoSteamBlocked` + `DestinationGame.acceptsSteamOriginValue`); **2.3.0** surfaces the claim-time phone-share `409` on `confirmReceipt*`/`claim*` (+ `err.phoneShareLast4`). Full history in the [CHANGELOG](CHANGELOG.md).
|
|
6
6
|
> Canonical partner reference: **https://docs.invo.network/docs/currency-purchase** and **https://docs.invo.network/docs/game-developer-integration**.
|
|
7
7
|
|
|
8
8
|
## What it does
|
|
@@ -333,16 +333,16 @@ pass a `pack_id` back.
|
|
|
333
333
|
```ts
|
|
334
334
|
// 1. The catalogue, priced for THIS player. Always pass steamid.
|
|
335
335
|
const res = await fetch(
|
|
336
|
-
`${INVO_BASE}/api/
|
|
337
|
-
{ headers: { "X-Game-Secret": GAME_SECRET } },
|
|
336
|
+
`${INVO_BASE}/api/currency-purchases/steam/packs?steamid=${steamId}`,
|
|
337
|
+
{ headers: { "X-Game-Secret-Key": GAME_SECRET } },
|
|
338
338
|
);
|
|
339
339
|
const { country, vat_rate_pct, packs } = await res.json();
|
|
340
340
|
// packs: [{ pack_id, label, price_usd, currency_amount }, ...]
|
|
341
341
|
|
|
342
342
|
// 2. Start the purchase with the pack the player chose.
|
|
343
|
-
const init = await fetch(`${INVO_BASE}/api/
|
|
343
|
+
const init = await fetch(`${INVO_BASE}/api/currency-purchases/steam/init-purchase`, {
|
|
344
344
|
method: "POST",
|
|
345
|
-
headers: { "X-Game-Secret": GAME_SECRET, "Content-Type": "application/json" },
|
|
345
|
+
headers: { "X-Game-Secret-Key": GAME_SECRET, "Content-Type": "application/json" },
|
|
346
346
|
body: JSON.stringify({
|
|
347
347
|
player_email: "player@example.com",
|
|
348
348
|
steamid: steamId,
|
package/package.json
CHANGED