@invonetwork/web-sdk 3.35.0 → 3.37.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.
@@ -12,6 +12,7 @@ the app.
12
12
 
13
13
  - [How it works in one paragraph](#how-it-works-in-one-paragraph)
14
14
  - [Prerequisites](#prerequisites)
15
+ - [In-App Purchase API key](#in-app-purchase-api-key)
15
16
  - [The purchase flow](#the-purchase-flow)
16
17
  - [When to call Transaction.finish()](#when-to-call-transactionfinish)
17
18
  - [Errors](#errors)
@@ -63,10 +64,50 @@ StoreKit keeps redelivering it, and every redelivery is a safe retry.
63
64
  `notification_url`. In App Store Connect (App Information, App Store Server Notifications),
64
65
  set the **Production** server URL to the URL shown in the live console, and the **Sandbox**
65
66
  server URL to the URL shown in the test console for your sandbox game. INVO uses these for
66
- refunds and to verify that you own the app.
67
-
68
- No App Store Server API key is needed: a StoreKit 2 transaction verifies against Apple's
69
- public root certificate.
67
+ refunds. Do this before adding the key: INVO refuses a key for an app with no notification
68
+ URL (`APPLE_NOTIFICATION_URL_MISSING`).
69
+
70
+ 6. **Your In-App Purchase API key in the INVO console.** Required to sell on the live App Store.
71
+ See [In-App Purchase API key](#in-app-purchase-api-key).
72
+
73
+ ## In-App Purchase API key
74
+
75
+ Selling on the live App Store requires your App Store Server API key (App Store Connect calls it
76
+ an In-App Purchase key) on the game in the live INVO console. INVO does not ask for access to
77
+ your App Store Connect account. With the key, INVO checks transactions with Apple independently,
78
+ reconciles refunds whose notification never arrived (every 6 hours, for purchases from the last
79
+ 120 days), and verifies your app without a support step. Each purchase is still checked against Apple's signature; the key is not used to credit one.
80
+
81
+ This is a console action. There is nothing to call in the SDK.
82
+
83
+ 1. In App Store Connect, as the Account Holder or an Admin, open **Users and Access**, then
84
+ **Integrations**, then **In-App Purchase**, and **Generate** a key. Note the **Issuer ID** and
85
+ the **Key ID**, and download the `.p8` file (App Store Connect offers the download once).
86
+ 2. In the INVO console, save the game's Apple configuration and set the notification URLs in
87
+ App Store Connect (prerequisite 5) first, then paste the Issuer ID, the
88
+ Key ID and the full contents of the `.p8` file (including the `BEGIN` and `END` lines). Only
89
+ the account owner can do this.
90
+ 3. On save, INVO checks the key with Apple (it asks Apple to send a test notification). A key
91
+ Apple refuses is never stored. Apple accepts only a key from the account that owns the app,
92
+ so acceptance is the proof of ownership: **the app is verified at once**, with nothing to wait
93
+ for. The console shows `APPLE_KEY_ACCEPTED` ("Key accepted. Apple confirmed it belongs to this
94
+ app, and the app is verified.").
95
+
96
+ The key is stored encrypted and never shown again; the console shows only the Issuer ID, the Key
97
+ ID and when it was last checked. To rotate, save a new key (it replaces the old one only once
98
+ Apple accepts it), then revoke the old one in App Store Connect. Removing the key in the console
99
+ stops INVO using it at once; purchases keep crediting. Changing the bundle id clears the key;
100
+ upload it again.
101
+
102
+ | Code | HTTP | Meaning |
103
+ |---|---|---|
104
+ | `APPLE_ISSUER_ID_INVALID` | 400 | not an Issuer ID (a UUID) |
105
+ | `APPLE_KEY_ID_INVALID` | 400 | not a Key ID (10 capital letters and digits) |
106
+ | `APPLE_KEY_INVALID` | 400 | the `.p8` contents could not be read; paste the whole file |
107
+ | `APPLE_KEY_REJECTED` | 400 | Apple refused the key for this app; nothing was stored |
108
+ | `APPLE_NOTIFICATION_URL_MISSING` | 400 | App Store Connect has no notification URL for the app; paste INVO's URL first, then save the key again |
109
+ | `APPLE_NOT_CONFIGURED` | 409 | save the Apple configuration before the key |
110
+ | other | 502 / 503 | Apple or INVO could not complete the check; try again |
70
111
 
71
112
  ## The purchase flow
72
113
 
@@ -260,12 +301,13 @@ the Sandbox notification URL, so production does not take those coins back.
260
301
  Production sells only once INVO has confirmed you own the App Store app (`APPLE_NOT_VERIFIED`
261
302
  until then). The first genuine, recent App Store Server Notification INVO receives at your
262
303
  production `notification_url` verifies it, because only the app's owner in App Store Connect can
263
- point Apple's notifications there. To trigger one, call the App Store Server API's "Request a
264
- Test Notification" endpoint for production with your own App Store Server API key, or wait for
265
- the first real notification. The console
266
- shows `verified` and `verified_at`. INVO can also verify an app by hand on request.
304
+ point Apple's notifications there. The normal, self-serve path is to add your
305
+ [In-App Purchase API key](#in-app-purchase-api-key): Apple accepting the key proves ownership,
306
+ so the app is verified immediately. The console shows `verified` and `verified_at`. If you cannot
307
+ add the key, or the app is still not verified after you do, ask INVO support; that is the
308
+ fallback.
267
309
 
268
- Changing the bundle id before the game has sold through Apple clears verification; after the
310
+ Changing the bundle id before the game has sold through Apple clears verification and the key; after the
269
311
  first sale the bundle id cannot change (`APPLE_BUNDLE_LOCKED`). Each bundle id has one verified
270
312
  owner across INVO (`APPLE_BUNDLE_ALREADY_REGISTERED`).
271
313
 
@@ -375,7 +417,8 @@ launch.
375
417
  - Consumable products exist in App Store Connect and in the INVO console with the same ids.
376
418
  - The game's iOS key shows the Apple rail in the console.
377
419
  - Billing is set up, and `appleProducts()` on production shows `canSell: true`.
378
- - Both notification URLs are set in App Store Connect, and production shows `verified`.
420
+ - Both notification URLs are set in App Store Connect.
421
+ - Your In-App Purchase API key is saved in the live console, and production shows `verified`.
379
422
  - The App Review email is on the game's App Review list and in your review notes.
380
423
  - The app asks `appleProducts()` before showing the store, offers only `available` products,
381
424
  verifies from your server, and finishes only when `finish` is `true`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invonetwork/web-sdk",
3
- "version": "3.35.0",
3
+ "version": "3.37.0",
4
4
  "description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var SDK_VERSION = "3.34.1";
3
-
4
- export { SDK_VERSION };
5
- //# sourceMappingURL=chunk-6763YM7P.js.map
6
- //# sourceMappingURL=chunk-6763YM7P.js.map