@invonetwork/web-sdk 3.11.0 → 3.12.1
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 +42 -0
- package/README.md +68 -7
- package/dist/{chunk-ZDBU3L4T.js → chunk-5BMM5ZTW.js} +11 -4
- package/dist/index.cjs +9 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/server.cjs +18 -15
- package/dist/server.d.cts +10 -6
- package/dist/server.d.ts +10 -6
- package/dist/server.js +11 -15
- package/dist/{types-DSLGe_0Z.d.cts → types-CT0Ksonp.d.cts} +20 -4
- package/dist/{types-DSLGe_0Z.d.ts → types-CT0Ksonp.d.ts} +20 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Docs: subscription packages.
|
|
8
|
+
|
|
9
|
+
The README's Subscriptions section gains a **Subscription packages** part. A package (the API calls it a plan) is what a developer sells: a name, a price, a billing interval and the `item_id` the game checks. Packages are created, edited, closed and reopened in the INVO dashboard with the developer's own sign-in, never with the game secret or a player token, so this SDK does not wrap them and has no `packages` or `plans` namespace. That is deliberate.
|
|
10
|
+
|
|
11
|
+
Nothing about an integration changes. `server.subscriptions.create(...)` and `steamInit(...)` still subscribe a member to an `itemId`, webhooks carry the same payloads, and entitlement still comes from `subscription.renewed`. A package's subscriber counts and monthly revenue are measured per title and `item_id`, so a new package immediately shows the members already subscribed to its item. The section also covers the two counts (`subscriber_count` on basis `active`, `live_subscriber_count` on basis `live`), who a price change applies to, and that closing a package cancels nobody. Full guide: https://docs.invo.network/docs/subscriptions-packages/
|
|
12
|
+
|
|
13
|
+
Doc correction: the subscription refund daily limit. The README and the `subscriptions.refund` JSDoc said a game's daily self-serve refund limit is $500 by default. It no longer is: by default the limit is never lower than the largest single subscription charge (`25000.00` USD today), so any single period can always be refunded on its own, and if INVO raises the per-charge maximum the limit rises with it. INVO can still set a specific limit for one game, which applies as set, even if lower. Everything else about refunds is unchanged: reaching the limit exactly still runs, going over it answers HTTP 202 `pending_approval`, and approved requests do not count toward the day. The sandbox recipe now says how to see a 202 (ask INVO for a low limit on the sandbox game).
|
|
14
|
+
|
|
15
|
+
Documentation only. No export was added, removed, renamed or retyped.
|
|
16
|
+
|
|
17
|
+
## 3.12.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- The card maximum is INVO's, not the SDK's.
|
|
22
|
+
|
|
23
|
+
**INVO raised the maximum single card charge from $999.99 to $100,000.00 on 2026-09-18, and this package was refusing it.** The old limit was enforced client-side and threw before any network call, so a partner charging $50,000 failed inside the SDK and INVO never saw the request. The backend raise was invisible to every SDK user until this release. Per-customer velocity limits rose with it, to 100,000 per hour, 200,000 per day and 1,000,000 per month, all enforced by INVO.
|
|
24
|
+
|
|
25
|
+
**The design decision: the floor is a fact, the ceiling is a policy, and only facts belong in a client.**
|
|
26
|
+
|
|
27
|
+
$0.50 is the card rail's own minimum charge. Below it nothing settles in any environment, INVO holds it as a plain constant rather than a setting, and no configuration makes a smaller amount chargeable. That check stays exactly where it was and still throws before any request (`BELOW_STRIPE_MINIMUM`, `err.isBelowCardMinimum`).
|
|
28
|
+
|
|
29
|
+
The maximum is the opposite. It is a runtime setting an INVO admin edits without a deploy, and it differs between sandbox and production. Any number pinned in a published package is stale the moment somebody changes it, and the only remedy is a release, which is precisely the failure this release is repairing. So the local ceiling is **removed** rather than re-pinned at $100,000.00. It was not replaced by a fetch of the live limits either: that would turn one purchase call into two network calls, add a failure mode and a cache to a money path, and still be a snapshot rather than the truth at the moment of charge, because only the request itself is evaluated against the setting in force.
|
|
30
|
+
|
|
31
|
+
What remains is a structural bound. `usdAmount` and a card `totalPrice` must still be a positive amount with at most two decimals, and must still be at most `999999.99`, the same house ceiling every other money field in this SDK uses. That figure is deliberately **above** the largest value INVO's setting is permitted to take, so it can never refuse an amount INVO would have accepted. The invariant for anyone editing this later: the local bound must never be tighter than the server's maximum possible limit. This SDK may cost you a wasted round trip. It must never cost you a sale that a package upgrade would have allowed.
|
|
32
|
+
|
|
33
|
+
**What changed for you**
|
|
34
|
+
|
|
35
|
+
- Amounts between `999.99` and `999999.99` are now sent instead of being rejected locally. Nothing that worked before stops working; the validation only loosened.
|
|
36
|
+
- `err.isAboveCardMaximum` is unchanged and still means what it always meant, but it now arrives only from INVO (a `400`), never from the SDK. Nothing was charged.
|
|
37
|
+
- An amount above `999999.99` now throws `INVALID_INPUT` where it previously threw `ABOVE_CARD_MAXIMUM`. That range is malformed input, not a policy refusal, and INVO classifies it the same way.
|
|
38
|
+
|
|
39
|
+
**When INVO refuses an amount the SDK allowed**, catch `err.isAboveCardMaximum`. `err.message` carries the figure that was in force for that request, for example "Card purchases must be $100,000.00 or less." Do not retry it unchanged: lower the amount, split the sale, or ask INVO to raise the setting. The live figure for a tenant is also the `max_amount` of the hosted checkout's `validate-game` read, next to `min_amount`; read that if you want to show a limit in your own UI, and re-read it, because it can change under you. A velocity limit is a `429` with `err.retryAfter`, not this error.
|
|
40
|
+
|
|
41
|
+
**README: the minimum is $0.50.** The docs said only `0 < x <= 999.99` and left the floor unstated. They now state $0.50, which is what INVO advertises and what the card rail actually enforces. A $1.00 minimum was advertised by INVO's own checkout read until 2026-09-18 and was enforced nowhere; it is gone rather than enforced, because enforcing it would newly refuse charges between $0.50 and $0.99 that settle today.
|
|
42
|
+
|
|
43
|
+
No export was added, removed, renamed or retyped.
|
|
44
|
+
|
|
3
45
|
## 3.11.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -96,11 +96,13 @@ The right approval method is a property of the **client the player is sitting in
|
|
|
96
96
|
- [Before you go live](#before-you-go-live)
|
|
97
97
|
- [Configuration](#configuration)
|
|
98
98
|
- [Currency purchase (real money in)](#currency-purchase-real-money-in)
|
|
99
|
+
- [The card maximum is INVO's, not the SDK's](#the-card-maximum-is-invos-not-the-sdks)
|
|
99
100
|
- [Did the purchase go through? (the status read)](#did-the-purchase-go-through-the-status-read)
|
|
100
101
|
- [Item purchase (spend game currency)](#item-purchase-spend-game-currency)
|
|
101
102
|
- [Platform Commerce (ecommerce)](#platform-commerce-ecommerce)
|
|
102
103
|
- [Subscriptions (recurring billing)](#subscriptions-recurring-billing)
|
|
103
104
|
- [Cards for subscriptions](#cards-for-subscriptions)
|
|
105
|
+
- [Subscription packages](#subscription-packages)
|
|
104
106
|
- [Player balance](#player-balance)
|
|
105
107
|
- [Sends & transfers (move currency between players)](#sends--transfers-move-currency-between-players)
|
|
106
108
|
- [Legacy fallback: the SMS PIN (being retired)](#legacy-fallback-the-sms-pin-being-retired)
|
|
@@ -284,13 +286,41 @@ const client = new InvoClient({
|
|
|
284
286
|
|
|
285
287
|
Buy game currency with real money. Authenticated by the **payment rail**, not a passkey — there's no WebAuthn step. Two paths:
|
|
286
288
|
|
|
289
|
+
### The card maximum is INVO's, not the SDK's
|
|
290
|
+
|
|
291
|
+
**Minimum: $0.50.** That is the card rail's own floor: below it a charge cannot settle at all, so this SDK checks it locally and always will.
|
|
292
|
+
|
|
293
|
+
**Maximum: an INVO setting, $100,000.00 by default.** It is changed by an INVO admin without a deploy, and it differs between sandbox and production, so **this package does not pin it and never refuses an amount for being too large.** Your amount is sent; INVO decides.
|
|
294
|
+
|
|
295
|
+
Before 3.12.0 the SDK enforced a hard-coded $999.99 and threw before any request was made, so a partner charging $50,000 failed inside the SDK and INVO never heard about it. A pinned limit is wrong by construction here: the moment anyone edits the setting, every installed copy of the SDK is stale, and the only fix is a release. Removing the local ceiling means the SDK can waste a round trip on an amount INVO refuses; keeping it meant the SDK could block a sale INVO would have taken. Only one of those is recoverable without a package upgrade.
|
|
296
|
+
|
|
297
|
+
**When INVO refuses an amount this SDK allowed**, you get a `400` and `err.isAboveCardMaximum === true`. Nothing was charged.
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
try {
|
|
301
|
+
await server.createCheckout({ playerEmail, usdAmount: "50000.00" });
|
|
302
|
+
} catch (err) {
|
|
303
|
+
if (err.isAboveCardMaximum) {
|
|
304
|
+
// err.message carries the figure in force for THIS environment, e.g.
|
|
305
|
+
// "Card purchases must be $100,000.00 or less." Do not retry it unchanged:
|
|
306
|
+
// lower the amount, split the sale, or ask INVO to raise the setting.
|
|
307
|
+
console.warn(err.message);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
The live figure for a tenant is also the `max_amount` of the hosted checkout's `validate-game` read, alongside `min_amount`. Read it if you want to show a limit in your own UI rather than hard-coding one, and re-read it, because it can change under you.
|
|
313
|
+
|
|
314
|
+
Per-customer velocity limits sit underneath the per-charge maximum (hourly, daily and monthly, per player per game) and are INVO's too. Exceeding one is a `429`; see `err.retryAfter`.
|
|
315
|
+
|
|
287
316
|
### Hosted checkout (recommended — PCI-light, you never touch card data)
|
|
288
317
|
|
|
289
318
|
```ts
|
|
290
319
|
// SERVER
|
|
291
320
|
const { checkoutUrl, sessionId, sessionToken, expiresAt, expiresInSeconds } = await server.createCheckout({
|
|
292
321
|
playerEmail: "p@example.com",
|
|
293
|
-
usdAmount: "20.00", // USD
|
|
322
|
+
usdAmount: "20.00", // USD. Minimum $0.50. The maximum is an INVO setting
|
|
323
|
+
// ($100,000.00 by default) and is enforced on the request.
|
|
294
324
|
rail: "platform", // optional: "platform" (default) | "game" | "steam"
|
|
295
325
|
successUrl: "https://you/buy/ok",
|
|
296
326
|
cancelUrl: "https://you/buy/cancel",
|
|
@@ -603,7 +633,7 @@ const r = await server.platformCommerce.purchase({
|
|
|
603
633
|
|
|
604
634
|
### Card leg — server creates, INVO hosts the checkout
|
|
605
635
|
|
|
606
|
-
**INVO hosts the entire card checkout** — card fields, Apple Pay / Google Pay, the international billing-address collector, and 3-D Secure all live on INVO's page. There is **no billing address in the request, no card element, no processor dependency, and no client payment code to write**: the server call returns a `checkoutUrl` and you send the buyer there. `totalPrice` is **USD
|
|
636
|
+
**INVO hosts the entire card checkout** — card fields, Apple Pay / Google Pay, the international billing-address collector, and 3-D Secure all live on INVO's page. There is **no billing address in the request, no card element, no processor dependency, and no client payment code to write**: the server call returns a `checkoutUrl` and you send the buyer there. `totalPrice` is **USD**, at least **$0.50**. The maximum is an INVO setting, **$100,000.00 by default**, so it is enforced on the request and not pinned in this package.
|
|
607
637
|
|
|
608
638
|
```ts
|
|
609
639
|
// 1) server — returns a hosted-checkout session, NOT yet paid
|
|
@@ -653,8 +683,8 @@ const ref = await server.platformCommerce.refund({ orderId: r.orderId, reason: "
|
|
|
653
683
|
```
|
|
654
684
|
|
|
655
685
|
- **Idempotency on `clientRequestId`:** a duplicate BALANCE purchase throws `409` (`err.isDuplicateRequest`); a duplicate CARD purchase **replays the same checkout session** (`r.idempotentReplay === true`, same URL — never a second charge), so a lost card-leg response is safely recovered by retrying with the *same* `clientRequestId`.
|
|
656
|
-
- INVO fee: **3.5% flat** (balance) · **3.5% + $0.30** (card). Too-small amounts throw `err.isAmountBelowMinimum` / `err.isBelowCardMinimum` (card < $0.50); a card total over
|
|
657
|
-
- Client-side validation (missing fields, bad funding source, quantity outside `1..1000`, total ≠ unit×qty, card
|
|
686
|
+
- INVO fee: **3.5% flat** (balance) · **3.5% + $0.30** (card). Too-small amounts throw `err.isAmountBelowMinimum` / `err.isBelowCardMinimum` (card < $0.50); a card total over INVO's maximum single card charge comes back as `err.isAboveCardMaximum` (400) with the live figure in `err.message`.
|
|
687
|
+
- Client-side validation (missing fields, bad funding source, quantity outside `1..1000`, total ≠ unit×qty, card total under $0.50, non-E.164 `playerPhone`) throws **before** any network call. The card **maximum** is deliberately not among them: see [The card maximum is INVO's, not the SDK's](#the-card-maximum-is-invos-not-the-sdks).
|
|
658
688
|
- Fulfill on the **`platform_commerce.purchased`** webhook; handle **`platform_commerce.refunded`** for reversals.
|
|
659
689
|
|
|
660
690
|
---
|
|
@@ -996,7 +1026,7 @@ for (const w of r.warnings ?? []) log(w.code); // "REASON_RECOMMENDED"
|
|
|
996
1026
|
|
|
997
1027
|
1. **Enabled per game.** On by default for every game; INVO can turn them off for a game (`403 REFUNDS_NOT_ENABLED`, `err.isRefundsNotEnabled`).
|
|
998
1028
|
2. **30 days.** A period can be refunded for 30 days after it was charged (`409 REFUND_WINDOW_CLOSED`, `err.isRefundWindowClosed`, with `err.periodChargedAt`, `err.refundWindowDays`, `err.refundWindowClosedAt`). A retry of a refund that already ran still returns its receipt.
|
|
999
|
-
3. **A daily limit per game** (per UTC day
|
|
1029
|
+
3. **A daily limit per game** (per UTC day, in sandbox and production). By default it is never lower than the largest single subscription charge (`25000.00` USD today), so any single period can always be refunded on its own; if INVO raises the per-charge maximum, the limit rises with it. INVO can set a specific limit for your game, which applies as set, even if lower. A refund that would exceed it does **not** run: the call answers HTTP 202 with `status: "pending_approval"` and `requestId` (check with `isRefundPendingApproval(r)`), carrying every receipt field with nothing moved, and INVO reviews the request. Approved: the refund runs as if your call had (the 30 days count from when you asked), you receive `subscription.refunded`, `subscription.refund_approved` and, for a full refund, `subscription.canceled`, sent together and may arrive in any order, and a retry of your key returns the receipt. Rejected: you receive `subscription.refund_rejected` with `decision_reason`, and your key throws `409 REFUND_REQUEST_REJECTED` (`err.isRefundRequestRejected`); use a new key to try again. While a request is pending, other refunds of that period throw `409 REFUND_REQUEST_PENDING` (`err.isRefundRequestPending`, the id on `err.refundRequestId`). The same key returns the same 202 with `idempotentReplay: true`.
|
|
1000
1030
|
4. **A reason.** Recommended now, required after a notice period. Without it the refund still runs (`reason: null`) and `warnings` carries `REASON_RECOMMENDED`; a reason longer than 500 characters is cut, with `REASON_TRUNCATED` (the SDK refuses one over 500 before the network).
|
|
1001
1031
|
|
|
1002
1032
|
Your developer console session can list your refund requests (`GET /api/dev/subscriptions/refund-requests?status=pending|approved|rejected|all`); that console read is not wrapped by this SDK, which authenticates with the game key.
|
|
@@ -1024,7 +1054,7 @@ await sb.forceAuthChallenge(id); // moves it to awaiting_authenticati
|
|
|
1024
1054
|
>
|
|
1025
1055
|
> **Second credential.** Every clock call sends `X-Game-Secret-Key` *and* `X-Sandbox-Clock-Key`, a separate per-game key (`ivclk_...`). Get it from the sandbox console: open the game, **Game Settings**, the **"Sandbox clock key"** card (generated the first time you reveal it; the same card rotates it, with a 7-day grace). Pass it as `sandboxClockKey`; a missing key throws `INVALID_INPUT` before the network, a wrong one is `401 SANDBOX_CLOCK_UNAUTHORIZED` (`err.isSandboxClockUnauthorized`). Keep it out of game clients and source control. None of these calls is auto-retried: each one moves the clock or runs the engine.
|
|
1026
1056
|
|
|
1027
|
-
**Card recipe.** Make the sandbox game live and register a webhook. Save a card with `cards.createSetupSession` (open `cardSetupUrl` in a browser; the sandbox page runs against the test-mode card processor, so enter a test card there, never a real one; the sandbox recipe on the public docs site is at https://docs.invo.network/docs/subscriptions-sandbox), or, on the processor-bound path, with `cards.beginSetup` using `paymentMethodId: "pm_card_visa"` (immediate) or `"pm_card_threeDSecure2Required"` (returns `requires_action`; finish on the client, then `confirmSetup`). `subscriptions.create` with that `playerCardId`: expect `firstCharge.status: "paid"`, `subscription.periodSeq: 2`, and a `subscription.renewed` delivery with `period_seq: 1`. Replay the same input: expect `idempotentReplay: true`. Then `advanceClock` + `forceRenewal` for as many periods as you like (`engineStats.renewed: 1`, `period_seq` advancing on each `subscription.renewed`); `forceFailure` four times (or swap in `"pm_card_chargeDeclined"` through `setPaymentMethod`, then advance + force four times) to walk `past_due` to `expired` with `final_period_end`; `changeAmount` then advance + force to see the old price on that renewal and the new one on the next; `cancel({ atPeriodEnd: true })` then advance + force to get `action: "retired-at-period-end"`; `refund` a paid period (a full refund cancels the subscription, so refund a partial amount first if you want to keep testing it; the
|
|
1057
|
+
**Card recipe.** Make the sandbox game live and register a webhook. Save a card with `cards.createSetupSession` (open `cardSetupUrl` in a browser; the sandbox page runs against the test-mode card processor, so enter a test card there, never a real one; the sandbox recipe on the public docs site is at https://docs.invo.network/docs/subscriptions-sandbox), or, on the processor-bound path, with `cards.beginSetup` using `paymentMethodId: "pm_card_visa"` (immediate) or `"pm_card_threeDSecure2Required"` (returns `requires_action`; finish on the client, then `confirmSetup`). `subscriptions.create` with that `playerCardId`: expect `firstCharge.status: "paid"`, `subscription.periodSeq: 2`, and a `subscription.renewed` delivery with `period_seq: 1`. Replay the same input: expect `idempotentReplay: true`. Then `advanceClock` + `forceRenewal` for as many periods as you like (`engineStats.renewed: 1`, `period_seq` advancing on each `subscription.renewed`); `forceFailure` four times (or swap in `"pm_card_chargeDeclined"` through `setPaymentMethod`, then advance + force four times) to walk `past_due` to `expired` with `final_period_end`; `changeAmount` then advance + force to see the old price on that renewal and the new one on the next; `cancel({ atPeriodEnd: true })` then advance + force to get `action: "retired-at-period-end"`; `refund` a paid period (a full refund cancels the subscription, so refund a partial amount first if you want to keep testing it; the daily limit applies in sandbox too, and a refund over it answers `pending_approval`; at the default limit a single period always runs, so to see a `pending_approval` ask INVO to set a low limit for your sandbox game); and create one with `trialDays: 7` to see `skipped_trial` convert.
|
|
1028
1058
|
|
|
1029
1059
|
**Steam recipe.** In sandbox `steamFinalize` **does not call Steam**: it auto-approves a stand-in agreement and runs the real settlement (`fin.sandboxAutoApproved === true`), and `forceRenewal` treats the Steam charge as captured (`engineStats.steam_charged: 1, sandbox_synthetic: 1`). So sandbox proves INVO's currency path (coins, split, events, dunning), not Valve's charge: do one real Steam sandbox authorisation before launch. Credit the wallet above the price (a sandbox purchase), advance + force, and expect `funding.steam_charged_usd: "0.00"`.
|
|
1030
1060
|
|
|
@@ -1085,6 +1115,37 @@ Client-side guards (missing key, a `sub_`-prefixed key, a bad amount, a non-E.16
|
|
|
1085
1115
|
15. **Steam: finalize is your call**, the member has 24 hours, `web` needs `playerIp` and a top-level window, match the client callback on `steamOrderId`, show `amountCoins` (country-dependent, fixed at init), and `split.total_usd` on a Steam renewal is *not* the price.
|
|
1086
1116
|
16. **Sandbox does not exercise Valve.** `sandboxAutoApproved: true` means the charge was simulated.
|
|
1087
1117
|
|
|
1118
|
+
### Subscription packages
|
|
1119
|
+
|
|
1120
|
+
A package (the API calls it a plan) is what you sell: a name, a price, a billing interval and the
|
|
1121
|
+
`item_id` your game checks. Full guide:
|
|
1122
|
+
[docs.invo.network/docs/subscriptions-packages](https://docs.invo.network/docs/subscriptions-packages/).
|
|
1123
|
+
|
|
1124
|
+
- **Packages are managed in your INVO dashboard, not in this SDK.** Creating, editing, closing and
|
|
1125
|
+
reopening a package is authenticated by your dashboard sign-in, not by your game secret or a
|
|
1126
|
+
player token. This SDK has no `packages` or `plans` namespace, by design: a game secret on your
|
|
1127
|
+
server should never be able to reprice what your members pay.
|
|
1128
|
+
- **Your integration does not change.** `server.subscriptions.create(...)` and `server.subscriptions.steamInit(...)` still subscribe a member to an
|
|
1129
|
+
`itemId` with your game secret. Webhooks carry the same payloads, and entitlement still comes from
|
|
1130
|
+
`subscription.renewed`, keyed on `item_id`.
|
|
1131
|
+
- **The `item_id` is the link.** A package describes one `item_id` in one title, and only one live
|
|
1132
|
+
package may hold a given `item_id` per title (a second is refused with `ITEM_ID_IN_USE`).
|
|
1133
|
+
- **A new package adopts the members already on its item.** Subscriber counts and the monthly
|
|
1134
|
+
revenue figure are measured per title and `item_id`, so a package created over existing members
|
|
1135
|
+
shows them immediately. There is no linking step, and their subscriptions do not change.
|
|
1136
|
+
- **Two counts.** `subscriber_count` (basis `active`) is members being charged.
|
|
1137
|
+
`live_subscriber_count` (basis `live`) is everyone still subscribed, including trials and members
|
|
1138
|
+
cancelling at period end. A package whose members are all in trial shows `0` and `400`. Both are
|
|
1139
|
+
correct.
|
|
1140
|
+
- **A price change must say who it applies to.** New subscribers only is available now, and current
|
|
1141
|
+
members keep the price they are on. Moving existing subscribers too (each at their own next
|
|
1142
|
+
renewal) is not available yet and is refused with a named code rather than half-applied.
|
|
1143
|
+
Renaming a package is not a price change.
|
|
1144
|
+
- **Closing a package cancels nobody.** It stops new subscriptions only. Existing members renew and
|
|
1145
|
+
are billed exactly as before, at their own price. A package with members can be closed but never
|
|
1146
|
+
deleted, and a closed package can be reopened. If a package price and a member's price disagree,
|
|
1147
|
+
the member pays their own price.
|
|
1148
|
+
|
|
1088
1149
|
---
|
|
1089
1150
|
|
|
1090
1151
|
## Player balance
|
|
@@ -2004,7 +2065,7 @@ Helpers:
|
|
|
2004
2065
|
| `.isInsufficientBalance` | item purchase failed (400); `required_amount` + `current_balance` on `.body` |
|
|
2005
2066
|
| `.isDuplicateRequest` | idempotency-keyed request was a duplicate (409) |
|
|
2006
2067
|
| `.isNotPlatformTenant` | Platform Commerce called by a non-platform tenant (403) — use `purchaseItem`/`createCheckout` instead |
|
|
2007
|
-
| `.isAmountBelowMinimum` / `.isBelowCardMinimum` / `.isAboveCardMaximum` |
|
|
2068
|
+
| `.isAmountBelowMinimum` / `.isBelowCardMinimum` / `.isAboveCardMaximum` | amount too small for the fee to round up / card charge under $0.50 / card charge over INVO's maximum single card charge, which is a runtime setting (400) |
|
|
2008
2069
|
| `.isAlreadyRefunded` | Platform Commerce refund of an already-refunded order (409) — treat as already done |
|
|
2009
2070
|
| `.retryAfter` | seconds to back off on a 429 throttle |
|
|
2010
2071
|
| `.isEnrollmentAuthorizationRequired` | first-enrollment needs the OTP grant → `enrollmentBegin`/`enrollmentVerify` |
|
|
@@ -369,8 +369,15 @@ var InvoError = class _InvoError extends Error {
|
|
|
369
369
|
get isBelowCardMinimum() {
|
|
370
370
|
return this.code === "BELOW_CARD_MINIMUM" || this.rawCode === "BELOW_STRIPE_MINIMUM";
|
|
371
371
|
}
|
|
372
|
-
/** True if a
|
|
373
|
-
*
|
|
372
|
+
/** True if a CARD purchase exceeded INVO's maximum single card charge
|
|
373
|
+
* (`ABOVE_CARD_MAXIMUM`, 400) — split the sale or lower the amount. Do not retry it
|
|
374
|
+
* unchanged; nothing was charged.
|
|
375
|
+
*
|
|
376
|
+
* The cap is a runtime setting ($100,000.00 by default since 2026-09-18), editable by
|
|
377
|
+
* an INVO admin without a deploy and different per environment, so this SDK does not
|
|
378
|
+
* pin it and never raises this error locally. `err.message` carries the figure that was
|
|
379
|
+
* in force for the request that failed; the live figure for a tenant is also the
|
|
380
|
+
* `max_amount` of the hosted checkout's `validate-game` read. */
|
|
374
381
|
get isAboveCardMaximum() {
|
|
375
382
|
return this.code === "ABOVE_CARD_MAXIMUM";
|
|
376
383
|
}
|
|
@@ -977,5 +984,5 @@ function toDestinationsResult(raw, direction) {
|
|
|
977
984
|
}
|
|
978
985
|
|
|
979
986
|
export { Http, InvoError, assertSecureBaseUrl, toDestinationsResult };
|
|
980
|
-
//# sourceMappingURL=chunk-
|
|
981
|
-
//# sourceMappingURL=chunk-
|
|
987
|
+
//# sourceMappingURL=chunk-5BMM5ZTW.js.map
|
|
988
|
+
//# sourceMappingURL=chunk-5BMM5ZTW.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -371,8 +371,15 @@ var InvoError = class _InvoError extends Error {
|
|
|
371
371
|
get isBelowCardMinimum() {
|
|
372
372
|
return this.code === "BELOW_CARD_MINIMUM" || this.rawCode === "BELOW_STRIPE_MINIMUM";
|
|
373
373
|
}
|
|
374
|
-
/** True if a
|
|
375
|
-
*
|
|
374
|
+
/** True if a CARD purchase exceeded INVO's maximum single card charge
|
|
375
|
+
* (`ABOVE_CARD_MAXIMUM`, 400) — split the sale or lower the amount. Do not retry it
|
|
376
|
+
* unchanged; nothing was charged.
|
|
377
|
+
*
|
|
378
|
+
* The cap is a runtime setting ($100,000.00 by default since 2026-09-18), editable by
|
|
379
|
+
* an INVO admin without a deploy and different per environment, so this SDK does not
|
|
380
|
+
* pin it and never raises this error locally. `err.message` carries the figure that was
|
|
381
|
+
* in force for the request that failed; the live figure for a tenant is also the
|
|
382
|
+
* `max_amount` of the hosted checkout's `validate-game` read. */
|
|
376
383
|
get isAboveCardMaximum() {
|
|
377
384
|
return this.code === "ABOVE_CARD_MAXIMUM";
|
|
378
385
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-
|
|
1
|
+
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-CT0Ksonp.cjs';
|
|
2
|
+
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-CT0Ksonp.cjs';
|
|
3
3
|
|
|
4
4
|
/** The four device-approval flows (`begin.flow`). */
|
|
5
5
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-
|
|
1
|
+
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-CT0Ksonp.js';
|
|
2
|
+
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-CT0Ksonp.js';
|
|
3
3
|
|
|
4
4
|
/** The four device-approval flows (`begin.flow`). */
|
|
5
5
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-
|
|
2
|
-
export { InvoError } from './chunk-
|
|
1
|
+
import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-5BMM5ZTW.js';
|
|
2
|
+
export { InvoError } from './chunk-5BMM5ZTW.js';
|
|
3
3
|
|
|
4
4
|
// src/shared/webauthn.ts
|
|
5
5
|
function malformedOptions(field) {
|
package/dist/server.cjs
CHANGED
|
@@ -373,8 +373,15 @@ var InvoError = class _InvoError extends Error {
|
|
|
373
373
|
get isBelowCardMinimum() {
|
|
374
374
|
return this.code === "BELOW_CARD_MINIMUM" || this.rawCode === "BELOW_STRIPE_MINIMUM";
|
|
375
375
|
}
|
|
376
|
-
/** True if a
|
|
377
|
-
*
|
|
376
|
+
/** True if a CARD purchase exceeded INVO's maximum single card charge
|
|
377
|
+
* (`ABOVE_CARD_MAXIMUM`, 400) — split the sale or lower the amount. Do not retry it
|
|
378
|
+
* unchanged; nothing was charged.
|
|
379
|
+
*
|
|
380
|
+
* The cap is a runtime setting ($100,000.00 by default since 2026-09-18), editable by
|
|
381
|
+
* an INVO admin without a deploy and different per environment, so this SDK does not
|
|
382
|
+
* pin it and never raises this error locally. `err.message` carries the figure that was
|
|
383
|
+
* in force for the request that failed; the live figure for a tenant is also the
|
|
384
|
+
* `max_amount` of the hosted checkout's `validate-game` read. */
|
|
378
385
|
get isAboveCardMaximum() {
|
|
379
386
|
return this.code === "ABOVE_CARD_MAXIMUM";
|
|
380
387
|
}
|
|
@@ -981,7 +988,7 @@ function toDestinationsResult(raw, direction) {
|
|
|
981
988
|
}
|
|
982
989
|
|
|
983
990
|
// src/version.ts
|
|
984
|
-
var SDK_VERSION = "3.
|
|
991
|
+
var SDK_VERSION = "3.12.1";
|
|
985
992
|
|
|
986
993
|
// src/shared/types.ts
|
|
987
994
|
function isRefundPendingApproval(r) {
|
|
@@ -1153,7 +1160,7 @@ async function hmacHexSubtle(secret, message) {
|
|
|
1153
1160
|
|
|
1154
1161
|
// src/server.ts
|
|
1155
1162
|
var DEFAULT_UA = `invonetwork-web-sdk/${SDK_VERSION} (+https://invo.network)`;
|
|
1156
|
-
var MAX_USD_AMOUNT =
|
|
1163
|
+
var MAX_USD_AMOUNT = 999999.99;
|
|
1157
1164
|
var MAX_ITEM_PRICE = 999999.99;
|
|
1158
1165
|
function invalidInput(label, value, why) {
|
|
1159
1166
|
return new InvoError({
|
|
@@ -1455,7 +1462,6 @@ function requireField(value, field, raw) {
|
|
|
1455
1462
|
}
|
|
1456
1463
|
var FUNDING_SOURCES = /* @__PURE__ */ new Set(["balance", "card"]);
|
|
1457
1464
|
var CARD_MIN_USD = 0.5;
|
|
1458
|
-
var CARD_MAX_USD = 999.99;
|
|
1459
1465
|
var PlatformCommerceServer = class {
|
|
1460
1466
|
constructor(http, auth) {
|
|
1461
1467
|
this.http = http;
|
|
@@ -1472,7 +1478,10 @@ var PlatformCommerceServer = class {
|
|
|
1472
1478
|
* Send the buyer to `checkoutUrl` — INVO's hosted page owns the card form, wallets,
|
|
1473
1479
|
* billing address, and 3-D Secure (there is NO billing address in this request, and no
|
|
1474
1480
|
* client payment code to write; optionally embed via
|
|
1475
|
-
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD
|
|
1481
|
+
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD, at least $0.50;
|
|
1482
|
+
* the maximum is an INVO setting ($100,000.00 by default) and is enforced on the
|
|
1483
|
+
* request, not here, so read the live figure off `ABOVE_CARD_MAXIMUM` rather than
|
|
1484
|
+
* pinning one.
|
|
1476
1485
|
* The sale is real only on the `platform_commerce.purchased` webhook — never on the
|
|
1477
1486
|
* client return.
|
|
1478
1487
|
*
|
|
@@ -1518,13 +1527,6 @@ var PlatformCommerceServer = class {
|
|
|
1518
1527
|
status: 0
|
|
1519
1528
|
});
|
|
1520
1529
|
}
|
|
1521
|
-
if (total > CARD_MAX_USD) {
|
|
1522
|
-
throw new InvoError({
|
|
1523
|
-
message: `Card purchases must be $${CARD_MAX_USD} or less.`,
|
|
1524
|
-
code: "ABOVE_CARD_MAXIMUM",
|
|
1525
|
-
status: 0
|
|
1526
|
-
});
|
|
1527
|
-
}
|
|
1528
1530
|
}
|
|
1529
1531
|
if (input.playerPhone !== void 0) assertE164(input.playerPhone, "playerPhone");
|
|
1530
1532
|
const body = {
|
|
@@ -2210,8 +2212,9 @@ var SubscriptionsServer = class {
|
|
|
2210
2212
|
* the stored receipt with `idempotentReplay: true` and moves nothing.
|
|
2211
2213
|
*
|
|
2212
2214
|
* **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
|
|
2213
|
-
* (HTTP 202): the refund would exceed the game's daily self-serve limit
|
|
2214
|
-
*
|
|
2215
|
+
* (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
|
|
2216
|
+
* default never lower than the largest single subscription charge, so a single period
|
|
2217
|
+
* always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
|
|
2215
2218
|
* outcome arrives as `subscription.refund_approved` (sent together with
|
|
2216
2219
|
* `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
|
|
2217
2220
|
* `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
|
package/dist/server.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as ConfirmPaymentResult, ap as OrderDetailsResult, aq as SteamPacksQuery, ar as SteamPacksResult, as as SteamInitPurchaseInput, at as SteamInitPurchaseResult, au as SteamFinalizeInput, av as SteamFinalizeResult, aw as PurchaseItemInput, ax as PurchaseItemResult, ay as ItemHistoryQuery, az as ItemHistoryResult, aA as ItemOrderQuery, aB as PlayerBalanceQuery, aC as PlayerBalanceResult, aD as InboundPendingQuery, aE as InboundPendingResult, aF as LinkedIdentitiesQuery, aG as LinkedIdentitiesResult, aH as SmsVerifyResult, aI as ClaimTransferInput, aJ as ClaimResult, aK as ClaimCurrencyInput, aL as TransactionStatusResult, aM as GuardianApprovalStatusResult, aN as ServerDestinationsQuery, k as DestinationsResult, aO as PhoneShareContact, aP as PhoneShareInitiateResult, aQ as PhoneShareApproveInput, aR as PhoneShareApproveResult, aS as PhoneShareStatusResult, aT as BeginDeviceApprovalInput, aU as DeviceApprovalGrant, aV as PollDeviceApprovalInput, aW as DeviceApprovalPollResult, aX as ConfirmDeviceEnrollmentInput, aY as ConfirmDeviceEnrollmentResult, aZ as ApproveWithDeviceCodeInput, a_ as DeviceApprovalSettleResult, a$ as CompleteDeviceApprovalInput, b0 as CompleteDeviceApprovalResult } from './types-
|
|
2
|
-
export { b1 as CardSetupStatus, b2 as CurrencyBalance, p as DestinationGame, b3 as DeviceApprovalChannel, b4 as DeviceApprovalEnrollment, b5 as DeviceApprovalFlow, b6 as DeviceApprovalPollStatus, b7 as DeviceEnrollmentDecision, b8 as DeviceEnrollmentRespond, b9 as FirstCharge, ba as FirstChargeStatus, bb as FundingSource, bc as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bd as LinkedIdentityEmail, be as PlatformPurchaseStatus, w as Rail, bf as RefundInitiation, bg as RefundPendingApproval, bh as RefundProcessingFeeBasis, bi as RefundReceipt, bj as RefundRevenueShareAttribution, bk as RefundWarning, bl as SandboxClockState, bm as SavedCard, bn as SteamPack, bo as SteamUserSession, bp as Subscription, bq as SubscriptionBaseInput, br as SubscriptionConsent, bs as SubscriptionConsentInput, bt as SubscriptionFundingRail, bu as SubscriptionInterval, bv as SubscriptionRevenueShare, bw as SubscriptionRevenueShareInput, bx as SubscriptionStatus, V as VerificationMethod, by as isRefundPendingApproval } from './types-
|
|
1
|
+
import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as ConfirmPaymentResult, ap as OrderDetailsResult, aq as SteamPacksQuery, ar as SteamPacksResult, as as SteamInitPurchaseInput, at as SteamInitPurchaseResult, au as SteamFinalizeInput, av as SteamFinalizeResult, aw as PurchaseItemInput, ax as PurchaseItemResult, ay as ItemHistoryQuery, az as ItemHistoryResult, aA as ItemOrderQuery, aB as PlayerBalanceQuery, aC as PlayerBalanceResult, aD as InboundPendingQuery, aE as InboundPendingResult, aF as LinkedIdentitiesQuery, aG as LinkedIdentitiesResult, aH as SmsVerifyResult, aI as ClaimTransferInput, aJ as ClaimResult, aK as ClaimCurrencyInput, aL as TransactionStatusResult, aM as GuardianApprovalStatusResult, aN as ServerDestinationsQuery, k as DestinationsResult, aO as PhoneShareContact, aP as PhoneShareInitiateResult, aQ as PhoneShareApproveInput, aR as PhoneShareApproveResult, aS as PhoneShareStatusResult, aT as BeginDeviceApprovalInput, aU as DeviceApprovalGrant, aV as PollDeviceApprovalInput, aW as DeviceApprovalPollResult, aX as ConfirmDeviceEnrollmentInput, aY as ConfirmDeviceEnrollmentResult, aZ as ApproveWithDeviceCodeInput, a_ as DeviceApprovalSettleResult, a$ as CompleteDeviceApprovalInput, b0 as CompleteDeviceApprovalResult } from './types-CT0Ksonp.cjs';
|
|
2
|
+
export { b1 as CardSetupStatus, b2 as CurrencyBalance, p as DestinationGame, b3 as DeviceApprovalChannel, b4 as DeviceApprovalEnrollment, b5 as DeviceApprovalFlow, b6 as DeviceApprovalPollStatus, b7 as DeviceEnrollmentDecision, b8 as DeviceEnrollmentRespond, b9 as FirstCharge, ba as FirstChargeStatus, bb as FundingSource, bc as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bd as LinkedIdentityEmail, be as PlatformPurchaseStatus, w as Rail, bf as RefundInitiation, bg as RefundPendingApproval, bh as RefundProcessingFeeBasis, bi as RefundReceipt, bj as RefundRevenueShareAttribution, bk as RefundWarning, bl as SandboxClockState, bm as SavedCard, bn as SteamPack, bo as SteamUserSession, bp as Subscription, bq as SubscriptionBaseInput, br as SubscriptionConsent, bs as SubscriptionConsentInput, bt as SubscriptionFundingRail, bu as SubscriptionInterval, bv as SubscriptionRevenueShare, bw as SubscriptionRevenueShareInput, bx as SubscriptionStatus, V as VerificationMethod, by as isRefundPendingApproval } from './types-CT0Ksonp.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The package version, as sent in the server User-Agent. A test pins this to
|
|
6
6
|
* `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
|
|
7
7
|
* Bump it with the changeset flow.
|
|
8
8
|
*/
|
|
9
|
-
declare const SDK_VERSION = "3.
|
|
9
|
+
declare const SDK_VERSION = "3.12.1";
|
|
10
10
|
|
|
11
11
|
interface VerifyWebhookOptions {
|
|
12
12
|
/** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
|
|
@@ -584,7 +584,10 @@ declare class PlatformCommerceServer {
|
|
|
584
584
|
* Send the buyer to `checkoutUrl` — INVO's hosted page owns the card form, wallets,
|
|
585
585
|
* billing address, and 3-D Secure (there is NO billing address in this request, and no
|
|
586
586
|
* client payment code to write; optionally embed via
|
|
587
|
-
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD
|
|
587
|
+
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD, at least $0.50;
|
|
588
|
+
* the maximum is an INVO setting ($100,000.00 by default) and is enforced on the
|
|
589
|
+
* request, not here, so read the live figure off `ABOVE_CARD_MAXIMUM` rather than
|
|
590
|
+
* pinning one.
|
|
588
591
|
* The sale is real only on the `platform_commerce.purchased` webhook — never on the
|
|
589
592
|
* client return.
|
|
590
593
|
*
|
|
@@ -697,8 +700,9 @@ declare class SubscriptionsServer {
|
|
|
697
700
|
* the stored receipt with `idempotentReplay: true` and moves nothing.
|
|
698
701
|
*
|
|
699
702
|
* **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
|
|
700
|
-
* (HTTP 202): the refund would exceed the game's daily self-serve limit
|
|
701
|
-
*
|
|
703
|
+
* (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
|
|
704
|
+
* default never lower than the largest single subscription charge, so a single period
|
|
705
|
+
* always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
|
|
702
706
|
* outcome arrives as `subscription.refund_approved` (sent together with
|
|
703
707
|
* `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
|
|
704
708
|
* `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
|
package/dist/server.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as ConfirmPaymentResult, ap as OrderDetailsResult, aq as SteamPacksQuery, ar as SteamPacksResult, as as SteamInitPurchaseInput, at as SteamInitPurchaseResult, au as SteamFinalizeInput, av as SteamFinalizeResult, aw as PurchaseItemInput, ax as PurchaseItemResult, ay as ItemHistoryQuery, az as ItemHistoryResult, aA as ItemOrderQuery, aB as PlayerBalanceQuery, aC as PlayerBalanceResult, aD as InboundPendingQuery, aE as InboundPendingResult, aF as LinkedIdentitiesQuery, aG as LinkedIdentitiesResult, aH as SmsVerifyResult, aI as ClaimTransferInput, aJ as ClaimResult, aK as ClaimCurrencyInput, aL as TransactionStatusResult, aM as GuardianApprovalStatusResult, aN as ServerDestinationsQuery, k as DestinationsResult, aO as PhoneShareContact, aP as PhoneShareInitiateResult, aQ as PhoneShareApproveInput, aR as PhoneShareApproveResult, aS as PhoneShareStatusResult, aT as BeginDeviceApprovalInput, aU as DeviceApprovalGrant, aV as PollDeviceApprovalInput, aW as DeviceApprovalPollResult, aX as ConfirmDeviceEnrollmentInput, aY as ConfirmDeviceEnrollmentResult, aZ as ApproveWithDeviceCodeInput, a_ as DeviceApprovalSettleResult, a$ as CompleteDeviceApprovalInput, b0 as CompleteDeviceApprovalResult } from './types-
|
|
2
|
-
export { b1 as CardSetupStatus, b2 as CurrencyBalance, p as DestinationGame, b3 as DeviceApprovalChannel, b4 as DeviceApprovalEnrollment, b5 as DeviceApprovalFlow, b6 as DeviceApprovalPollStatus, b7 as DeviceEnrollmentDecision, b8 as DeviceEnrollmentRespond, b9 as FirstCharge, ba as FirstChargeStatus, bb as FundingSource, bc as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bd as LinkedIdentityEmail, be as PlatformPurchaseStatus, w as Rail, bf as RefundInitiation, bg as RefundPendingApproval, bh as RefundProcessingFeeBasis, bi as RefundReceipt, bj as RefundRevenueShareAttribution, bk as RefundWarning, bl as SandboxClockState, bm as SavedCard, bn as SteamPack, bo as SteamUserSession, bp as Subscription, bq as SubscriptionBaseInput, br as SubscriptionConsent, bs as SubscriptionConsentInput, bt as SubscriptionFundingRail, bu as SubscriptionInterval, bv as SubscriptionRevenueShare, bw as SubscriptionRevenueShareInput, bx as SubscriptionStatus, V as VerificationMethod, by as isRefundPendingApproval } from './types-
|
|
1
|
+
import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as ConfirmPaymentResult, ap as OrderDetailsResult, aq as SteamPacksQuery, ar as SteamPacksResult, as as SteamInitPurchaseInput, at as SteamInitPurchaseResult, au as SteamFinalizeInput, av as SteamFinalizeResult, aw as PurchaseItemInput, ax as PurchaseItemResult, ay as ItemHistoryQuery, az as ItemHistoryResult, aA as ItemOrderQuery, aB as PlayerBalanceQuery, aC as PlayerBalanceResult, aD as InboundPendingQuery, aE as InboundPendingResult, aF as LinkedIdentitiesQuery, aG as LinkedIdentitiesResult, aH as SmsVerifyResult, aI as ClaimTransferInput, aJ as ClaimResult, aK as ClaimCurrencyInput, aL as TransactionStatusResult, aM as GuardianApprovalStatusResult, aN as ServerDestinationsQuery, k as DestinationsResult, aO as PhoneShareContact, aP as PhoneShareInitiateResult, aQ as PhoneShareApproveInput, aR as PhoneShareApproveResult, aS as PhoneShareStatusResult, aT as BeginDeviceApprovalInput, aU as DeviceApprovalGrant, aV as PollDeviceApprovalInput, aW as DeviceApprovalPollResult, aX as ConfirmDeviceEnrollmentInput, aY as ConfirmDeviceEnrollmentResult, aZ as ApproveWithDeviceCodeInput, a_ as DeviceApprovalSettleResult, a$ as CompleteDeviceApprovalInput, b0 as CompleteDeviceApprovalResult } from './types-CT0Ksonp.js';
|
|
2
|
+
export { b1 as CardSetupStatus, b2 as CurrencyBalance, p as DestinationGame, b3 as DeviceApprovalChannel, b4 as DeviceApprovalEnrollment, b5 as DeviceApprovalFlow, b6 as DeviceApprovalPollStatus, b7 as DeviceEnrollmentDecision, b8 as DeviceEnrollmentRespond, b9 as FirstCharge, ba as FirstChargeStatus, bb as FundingSource, bc as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bd as LinkedIdentityEmail, be as PlatformPurchaseStatus, w as Rail, bf as RefundInitiation, bg as RefundPendingApproval, bh as RefundProcessingFeeBasis, bi as RefundReceipt, bj as RefundRevenueShareAttribution, bk as RefundWarning, bl as SandboxClockState, bm as SavedCard, bn as SteamPack, bo as SteamUserSession, bp as Subscription, bq as SubscriptionBaseInput, br as SubscriptionConsent, bs as SubscriptionConsentInput, bt as SubscriptionFundingRail, bu as SubscriptionInterval, bv as SubscriptionRevenueShare, bw as SubscriptionRevenueShareInput, bx as SubscriptionStatus, V as VerificationMethod, by as isRefundPendingApproval } from './types-CT0Ksonp.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The package version, as sent in the server User-Agent. A test pins this to
|
|
6
6
|
* `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
|
|
7
7
|
* Bump it with the changeset flow.
|
|
8
8
|
*/
|
|
9
|
-
declare const SDK_VERSION = "3.
|
|
9
|
+
declare const SDK_VERSION = "3.12.1";
|
|
10
10
|
|
|
11
11
|
interface VerifyWebhookOptions {
|
|
12
12
|
/** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
|
|
@@ -584,7 +584,10 @@ declare class PlatformCommerceServer {
|
|
|
584
584
|
* Send the buyer to `checkoutUrl` — INVO's hosted page owns the card form, wallets,
|
|
585
585
|
* billing address, and 3-D Secure (there is NO billing address in this request, and no
|
|
586
586
|
* client payment code to write; optionally embed via
|
|
587
|
-
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD
|
|
587
|
+
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD, at least $0.50;
|
|
588
|
+
* the maximum is an INVO setting ($100,000.00 by default) and is enforced on the
|
|
589
|
+
* request, not here, so read the live figure off `ABOVE_CARD_MAXIMUM` rather than
|
|
590
|
+
* pinning one.
|
|
588
591
|
* The sale is real only on the `platform_commerce.purchased` webhook — never on the
|
|
589
592
|
* client return.
|
|
590
593
|
*
|
|
@@ -697,8 +700,9 @@ declare class SubscriptionsServer {
|
|
|
697
700
|
* the stored receipt with `idempotentReplay: true` and moves nothing.
|
|
698
701
|
*
|
|
699
702
|
* **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
|
|
700
|
-
* (HTTP 202): the refund would exceed the game's daily self-serve limit
|
|
701
|
-
*
|
|
703
|
+
* (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
|
|
704
|
+
* default never lower than the largest single subscription charge, so a single period
|
|
705
|
+
* always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
|
|
702
706
|
* outcome arrives as `subscription.refund_approved` (sent together with
|
|
703
707
|
* `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
|
|
704
708
|
* `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
|
package/dist/server.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-
|
|
2
|
-
export { InvoError } from './chunk-
|
|
1
|
+
import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-5BMM5ZTW.js';
|
|
2
|
+
export { InvoError } from './chunk-5BMM5ZTW.js';
|
|
3
3
|
import { createHmac, timingSafeEqual } from 'crypto';
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
|
-
var SDK_VERSION = "3.
|
|
6
|
+
var SDK_VERSION = "3.12.1";
|
|
7
7
|
|
|
8
8
|
// src/shared/types.ts
|
|
9
9
|
function isRefundPendingApproval(r) {
|
|
@@ -175,7 +175,7 @@ async function hmacHexSubtle(secret, message) {
|
|
|
175
175
|
|
|
176
176
|
// src/server.ts
|
|
177
177
|
var DEFAULT_UA = `invonetwork-web-sdk/${SDK_VERSION} (+https://invo.network)`;
|
|
178
|
-
var MAX_USD_AMOUNT =
|
|
178
|
+
var MAX_USD_AMOUNT = 999999.99;
|
|
179
179
|
var MAX_ITEM_PRICE = 999999.99;
|
|
180
180
|
function invalidInput(label, value, why) {
|
|
181
181
|
return new InvoError({
|
|
@@ -477,7 +477,6 @@ function requireField(value, field, raw) {
|
|
|
477
477
|
}
|
|
478
478
|
var FUNDING_SOURCES = /* @__PURE__ */ new Set(["balance", "card"]);
|
|
479
479
|
var CARD_MIN_USD = 0.5;
|
|
480
|
-
var CARD_MAX_USD = 999.99;
|
|
481
480
|
var PlatformCommerceServer = class {
|
|
482
481
|
constructor(http, auth) {
|
|
483
482
|
this.http = http;
|
|
@@ -494,7 +493,10 @@ var PlatformCommerceServer = class {
|
|
|
494
493
|
* Send the buyer to `checkoutUrl` — INVO's hosted page owns the card form, wallets,
|
|
495
494
|
* billing address, and 3-D Secure (there is NO billing address in this request, and no
|
|
496
495
|
* client payment code to write; optionally embed via
|
|
497
|
-
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD
|
|
496
|
+
* `InvoClient.platformCommerce.mountCheckout`). `totalPrice` is USD, at least $0.50;
|
|
497
|
+
* the maximum is an INVO setting ($100,000.00 by default) and is enforced on the
|
|
498
|
+
* request, not here, so read the live figure off `ABOVE_CARD_MAXIMUM` rather than
|
|
499
|
+
* pinning one.
|
|
498
500
|
* The sale is real only on the `platform_commerce.purchased` webhook — never on the
|
|
499
501
|
* client return.
|
|
500
502
|
*
|
|
@@ -540,13 +542,6 @@ var PlatformCommerceServer = class {
|
|
|
540
542
|
status: 0
|
|
541
543
|
});
|
|
542
544
|
}
|
|
543
|
-
if (total > CARD_MAX_USD) {
|
|
544
|
-
throw new InvoError({
|
|
545
|
-
message: `Card purchases must be $${CARD_MAX_USD} or less.`,
|
|
546
|
-
code: "ABOVE_CARD_MAXIMUM",
|
|
547
|
-
status: 0
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
545
|
}
|
|
551
546
|
if (input.playerPhone !== void 0) assertE164(input.playerPhone, "playerPhone");
|
|
552
547
|
const body = {
|
|
@@ -1232,8 +1227,9 @@ var SubscriptionsServer = class {
|
|
|
1232
1227
|
* the stored receipt with `idempotentReplay: true` and moves nothing.
|
|
1233
1228
|
*
|
|
1234
1229
|
* **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
|
|
1235
|
-
* (HTTP 202): the refund would exceed the game's daily self-serve limit
|
|
1236
|
-
*
|
|
1230
|
+
* (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
|
|
1231
|
+
* default never lower than the largest single subscription charge, so a single period
|
|
1232
|
+
* always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
|
|
1237
1233
|
* outcome arrives as `subscription.refund_approved` (sent together with
|
|
1238
1234
|
* `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
|
|
1239
1235
|
* `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
|
|
@@ -296,8 +296,15 @@ declare class InvoError extends Error {
|
|
|
296
296
|
/** True if a Platform Commerce CARD purchase was below the processor's floor of $0.50
|
|
297
297
|
* (backend code `BELOW_STRIPE_MINIMUM`, 400). Neutral name; matches the wire code. */
|
|
298
298
|
get isBelowCardMinimum(): boolean;
|
|
299
|
-
/** True if a
|
|
300
|
-
*
|
|
299
|
+
/** True if a CARD purchase exceeded INVO's maximum single card charge
|
|
300
|
+
* (`ABOVE_CARD_MAXIMUM`, 400) — split the sale or lower the amount. Do not retry it
|
|
301
|
+
* unchanged; nothing was charged.
|
|
302
|
+
*
|
|
303
|
+
* The cap is a runtime setting ($100,000.00 by default since 2026-09-18), editable by
|
|
304
|
+
* an INVO admin without a deploy and different per environment, so this SDK does not
|
|
305
|
+
* pin it and never raises this error locally. `err.message` carries the figure that was
|
|
306
|
+
* in force for the request that failed; the live figure for a tenant is also the
|
|
307
|
+
* `max_amount` of the hosted checkout's `validate-game` read. */
|
|
301
308
|
get isAboveCardMaximum(): boolean;
|
|
302
309
|
/**
|
|
303
310
|
* True if a Platform Commerce refund targeted an order that was already refunded
|
|
@@ -722,6 +729,10 @@ interface InitiateResult {
|
|
|
722
729
|
}
|
|
723
730
|
interface CreateCheckoutInput {
|
|
724
731
|
playerEmail: string;
|
|
732
|
+
/** USD, two decimals. The advertised minimum is $0.50 (the card rail's own floor).
|
|
733
|
+
* The maximum is an INVO runtime setting, $100,000.00 by default, editable by an
|
|
734
|
+
* admin and different per environment, so it is enforced on the request rather than
|
|
735
|
+
* pinned here: expect a 400 carrying the live figure. */
|
|
725
736
|
usdAmount: string | number;
|
|
726
737
|
/** Which rail the hosted page presents. Default "platform" (card). The page
|
|
727
738
|
* renders the right experience per rail — all branded as INVO. */
|
|
@@ -751,6 +762,10 @@ interface CreateCheckoutResult {
|
|
|
751
762
|
}
|
|
752
763
|
interface PurchaseInput {
|
|
753
764
|
playerEmail: string;
|
|
765
|
+
/** USD, two decimals. The advertised minimum is $0.50 (the card rail's own floor).
|
|
766
|
+
* The maximum is an INVO runtime setting, $100,000.00 by default, editable by an
|
|
767
|
+
* admin and different per environment, so it is enforced on the request rather than
|
|
768
|
+
* pinned here: expect a 400 carrying the live figure. */
|
|
754
769
|
usdAmount: string | number;
|
|
755
770
|
/** Idempotency key. Required. */
|
|
756
771
|
purchaseReference: string;
|
|
@@ -961,8 +976,9 @@ interface PlatformPurchaseInput {
|
|
|
961
976
|
/** Price PER UNIT. > 0. On the CARD leg this is USD; on the BALANCE leg it is the
|
|
962
977
|
* tenant's network-currency amount. */
|
|
963
978
|
unitPrice: string | number;
|
|
964
|
-
/** Must equal unitPrice × itemQuantity (±0.01). USD on the card leg (
|
|
965
|
-
*
|
|
979
|
+
/** Must equal unitPrice × itemQuantity (±0.01). USD on the card leg (at least $0.50;
|
|
980
|
+
* the maximum is an INVO setting, $100,000.00 by default, enforced on the request);
|
|
981
|
+
* network currency on the balance leg. */
|
|
966
982
|
totalPrice: string | number;
|
|
967
983
|
playerPhone?: string;
|
|
968
984
|
itemDescription?: string;
|
|
@@ -296,8 +296,15 @@ declare class InvoError extends Error {
|
|
|
296
296
|
/** True if a Platform Commerce CARD purchase was below the processor's floor of $0.50
|
|
297
297
|
* (backend code `BELOW_STRIPE_MINIMUM`, 400). Neutral name; matches the wire code. */
|
|
298
298
|
get isBelowCardMinimum(): boolean;
|
|
299
|
-
/** True if a
|
|
300
|
-
*
|
|
299
|
+
/** True if a CARD purchase exceeded INVO's maximum single card charge
|
|
300
|
+
* (`ABOVE_CARD_MAXIMUM`, 400) — split the sale or lower the amount. Do not retry it
|
|
301
|
+
* unchanged; nothing was charged.
|
|
302
|
+
*
|
|
303
|
+
* The cap is a runtime setting ($100,000.00 by default since 2026-09-18), editable by
|
|
304
|
+
* an INVO admin without a deploy and different per environment, so this SDK does not
|
|
305
|
+
* pin it and never raises this error locally. `err.message` carries the figure that was
|
|
306
|
+
* in force for the request that failed; the live figure for a tenant is also the
|
|
307
|
+
* `max_amount` of the hosted checkout's `validate-game` read. */
|
|
301
308
|
get isAboveCardMaximum(): boolean;
|
|
302
309
|
/**
|
|
303
310
|
* True if a Platform Commerce refund targeted an order that was already refunded
|
|
@@ -722,6 +729,10 @@ interface InitiateResult {
|
|
|
722
729
|
}
|
|
723
730
|
interface CreateCheckoutInput {
|
|
724
731
|
playerEmail: string;
|
|
732
|
+
/** USD, two decimals. The advertised minimum is $0.50 (the card rail's own floor).
|
|
733
|
+
* The maximum is an INVO runtime setting, $100,000.00 by default, editable by an
|
|
734
|
+
* admin and different per environment, so it is enforced on the request rather than
|
|
735
|
+
* pinned here: expect a 400 carrying the live figure. */
|
|
725
736
|
usdAmount: string | number;
|
|
726
737
|
/** Which rail the hosted page presents. Default "platform" (card). The page
|
|
727
738
|
* renders the right experience per rail — all branded as INVO. */
|
|
@@ -751,6 +762,10 @@ interface CreateCheckoutResult {
|
|
|
751
762
|
}
|
|
752
763
|
interface PurchaseInput {
|
|
753
764
|
playerEmail: string;
|
|
765
|
+
/** USD, two decimals. The advertised minimum is $0.50 (the card rail's own floor).
|
|
766
|
+
* The maximum is an INVO runtime setting, $100,000.00 by default, editable by an
|
|
767
|
+
* admin and different per environment, so it is enforced on the request rather than
|
|
768
|
+
* pinned here: expect a 400 carrying the live figure. */
|
|
754
769
|
usdAmount: string | number;
|
|
755
770
|
/** Idempotency key. Required. */
|
|
756
771
|
purchaseReference: string;
|
|
@@ -961,8 +976,9 @@ interface PlatformPurchaseInput {
|
|
|
961
976
|
/** Price PER UNIT. > 0. On the CARD leg this is USD; on the BALANCE leg it is the
|
|
962
977
|
* tenant's network-currency amount. */
|
|
963
978
|
unitPrice: string | number;
|
|
964
|
-
/** Must equal unitPrice × itemQuantity (±0.01). USD on the card leg (
|
|
965
|
-
*
|
|
979
|
+
/** Must equal unitPrice × itemQuantity (±0.01). USD on the card leg (at least $0.50;
|
|
980
|
+
* the maximum is an INVO setting, $100,000.00 by default, enforced on the request);
|
|
981
|
+
* network currency on the balance leg. */
|
|
966
982
|
totalPrice: string | number;
|
|
967
983
|
playerPhone?: string;
|
|
968
984
|
itemDescription?: string;
|
package/package.json
CHANGED