@invonetwork/web-sdk 3.22.0 → 3.24.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/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.22.0`, 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.22.0** follows INVO's 2026-10 pricing: the Open card fee is **3.5% + $0.30** (was 4.5%), Merchant of Record stays **5.5% + $0.50**; the **chargeback guarantee** is a Merchant of Record term (Open-tier card payments made before November 8, 2026 keep it); payouts to your bank carry a **1% fee, capped at $500 per payout**. New reads: `getPlayerActivity()` / `iteratePlayerActivity()` (one merged list of a player's purchases, sends and transfers) and `platformCommerce.getPurchaseHistory()` / `iteratePurchaseHistory()`; `expiryReason` on `getTransferStatus()` / `getSendStatus()`; typed `transfer.*` and `payout.status_changed` webhook fields; new additive `err.publicCode` (the neutral twin of a code), set to `"BELOW_CARD_MINIMUM"` on the local card-floor refusal, whose `err.code` is unchanged (see [Tiers](#tiers) for the pricing); and the **[player-confirmed phone change](#player-confirmed-phone-change)**: `requestPhoneChange()` / `getPhoneChange()` on the server, `listPhoneChangeApprovals()` / `approvePhoneChange()` on the player's enrolled device, the typed `player.phone_changed` webhook, `err.changeRequestEndpoint` and new phone change error helpers; **3.18.0** follows INVO's 2026-09 card pricing: on card purchases **you pay INVO's card fee** (**4.5% + $0.30** on Open, **5.5% + $0.50** on Merchant of Record, plus **1.5%** on a card issued outside the US) and the player pays the listed price and gets the listed coins; fraud screening and a **chargeback guarantee** are included; minimum card purchase **$2.99** from 2026-10-27. New `partnerFeeUsd`, `internationalCardFeeUsd`, `minPurchaseWarning`, `feeTakenFrom: "partner"`, `err.minUsd` / `err.enforcedFrom` on `err.isBelowCardMinimum`, `minPurchaseWarning` on `createCheckout()`, `country` / `subdivision` on `purchaseCurrency()` with `err.isTaxPlaceUnavailable`, `cardFeeChargedToPartnerUsd` / `partnerDebitedUsd` on Platform Commerce card refunds, and the `partner_fee_usd` / `international_card_fee_usd` / `guarantee_covered` / `card_fee_charged_to_partner_usd` / `partner_debited_usd` webhook fields, all additive; an unacknowledged $10.00 coin purchase now credits 100.00 coins, not 93.70 (see **[Tiers](#tiers)**); **3.17.0** types the Steam fields on `purchase.refunded` / `purchase.disputed` (`rail`, `steam_transid`, nullable card-only ids): Steam chargebacks now arrive as `purchase.disputed`; **3.16.0** adds `warnings` on `createCheckout()` (item metadata on a coin session), `err.isDuplicateClientRequestId`, `err.isTrialAmountBelowFeeFloor` and `err.isIdentityCheckUnavailable`; **3.14.0** adds `credited` / `reasonCode` on `confirmPayment()` and `steamFinalizePurchase()`, Merchant of Record receipt fields, Platform Commerce card refunds in parts, and updates the **[tiers](#tiers)**: subscription card rates and chargeback handling by tier (the rates are superseded by 3.18.0), and Merchant of Record is applied for from the console; **3.13.0** documents the two **[tiers](#tiers)** (Open by default, Merchant of Record by application), adds **[INVO's card fee on coin purchases](#invos-card-fee-quote-show-acknowledge)** (rates superseded by 3.18.0): `quoteCurrencyPurchase()`, `acknowledgedTotalUsd` on `purchaseCurrency()`, the new `processingFeeUsd` / `feeTakenFrom` / `coinsCredited` / `chargeTotalUsd` fields and `err.isAmountBelowFee` / `err.isQuoteStale`, states the coin refund rule (only unspent coins), and adds **[paid trials](#paid-trials)** on card subscriptions (`trialAmountUsd`, the disclosed trial consent fields, `is_trial` / `expire_cause` on the events, `err.isPaymentMethodRequired` and the `isTrialAmount*` helpers); **3.12.0** removes the SDK's own card maximum (INVO's is a runtime setting, $100,000.00 by default); **3.11.0** adds the **[purchase status read](#did-the-purchase-go-through-the-status-read)**, where `invo.checkout.getPurchaseStatus()` / `waitForPurchase()` (and the standalone `CheckoutClient`) answer what happened to a hosted-checkout purchase in six words, four of them terminal, so a buyer is never shown a page that closes on nothing; stopping is decided by INVO's `terminal` and never re-derived from `status`, `nothingWasCharged()` says when a **Try again** is safe, `createCheckout()` now also returns `sessionToken`, and the subscription fee is corrected (it is its own rate; item purchases stay at 10/90; see [Tiers](#tiers) for the current rate); **3.10.0** documents **card-only subscriptions** (the card pays the full price every period, the coin wallet never pays; `walletOnly` deprecated; new `failure_code` `wallet_negative`; a renewal's `purchase.completed` is not a purchase) and the **[subscription refund limits](#refunds)**: `subscriptions.refund` can now return a 202 `pending_approval` refund request (`isRefundPendingApproval`), with `warnings`, the processor fee you bear, `subscriptionCanceled` (a full refund cancels), new classifiers (`isRefundsNotEnabled`, `isRefundWindowClosed`, `isRefundRequestPending`, `isRefundRequestRejected`, `isConcurrentRequest`, `isRefundMismatch`) and typed `subscription.refund_requested` / `refund_approved` / `refund_rejected` events, all additive; **3.9.0** adds the **[INVO-hosted card page for subscriptions](#cards-for-subscriptions)**, `invo.cards.createSetupSession`: mint a 10-minute link server-side, send the member to it, read the card back from `cards.list`, with no browser code and no card processor named anywhere (`beginSetup`/`confirmSetup` remain as the processor-bound alternative), plus the `isPlayerNotFound`, `isInvalidPlayerEmail` and `isInvalidInput` classifiers and a fix that makes `includePlayer` reads actually surface `playerEmail`/`playerName`; **3.8.0** adds **[Subscriptions](#subscriptions-recurring-billing)** as a first-class server surface on both rails: `invo.subscriptions.create/get/listForPlayer/cancel/changeAmount/setPaymentMethod/refund/steamInit/steamFinalize`, the off-session card capture (`invo.cards.beginSetup/confirmSetup/list`), the sandbox clock tools (`invo.sandbox.subscriptions.*`, which post to `/subscriptions/<id>/...` **relative to the sandbox base, not under `/api`**, with the new `sandboxClockKey`), typed `data` for all seven `subscription.*` webhook events, and eleven new error classifiers; **3.7.0** makes the **device approval grant a first-class SDK surface**: `beginDeviceApproval`, `pollDeviceApproval`, `confirmDeviceEnrollment` and, the step that actually moves the money, **`approveWithDeviceCode`** (plus the optional `completeDeviceApproval` loop); a grant that is polled to `approved` and left there settles **nothing**, which is the failure this release exists to make impossible, and `TRANSACTION_NOT_PENDING` now comes back as a typed `status: "not_pending"` result with `alreadySettled` rather than a thrown error you would have to string-match; **3.4.0** documents that a Steam title now bills through **its own Steam application**: the studio registers their appid + publisher Web API key and keeps a payment method on file, because Valve pays the studio and INVO settles afterwards (new `isSteamNotConfigured`, `isPartnerBillingNotSetUp`, `isPartnerSettlementUnavailable`, `isSteamAppChanged` error helpers); **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).
5
+ > **Status:** `v3.23.0`, 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.23.0** types two optional fields on the `purchase.disputed` close: `dispute_fee_usd` and `dispute_fee_charged_to_partner` (from November 8, 2026 the card dispute fee on Open-tier card sales is passed through to you at cost); **3.22.0** follows INVO's 2026-10 pricing: the Open card fee is **3.5% + $0.30** (was 4.5%), Merchant of Record stays **5.5% + $0.50**; the **chargeback guarantee** is a Merchant of Record term (Open-tier card payments made before November 8, 2026 keep it); payouts to your bank carry a **1% fee, capped at $500 per payout**. New reads: `getPlayerActivity()` / `iteratePlayerActivity()` (one merged list of a player's purchases, sends and transfers) and `platformCommerce.getPurchaseHistory()` / `iteratePurchaseHistory()`; `expiryReason` on `getTransferStatus()` / `getSendStatus()`; typed `transfer.*` and `payout.status_changed` webhook fields; new additive `err.publicCode` (the neutral twin of a code), set to `"BELOW_CARD_MINIMUM"` on the local card-floor refusal, whose `err.code` is unchanged (see [Tiers](#tiers) for the pricing); and the **[player-confirmed phone change](#player-confirmed-phone-change)**: `requestPhoneChange()` / `getPhoneChange()` on the server, `listPhoneChangeApprovals()` / `approvePhoneChange()` on the player's enrolled device, the typed `player.phone_changed` webhook, `err.changeRequestEndpoint` and new phone change error helpers; **3.18.0** follows INVO's 2026-09 card pricing: on card purchases **you pay INVO's card fee** (**4.5% + $0.30** on Open, **5.5% + $0.50** on Merchant of Record, plus **1.5%** on a card issued outside the US) and the player pays the listed price and gets the listed coins; fraud screening and a **chargeback guarantee** are included; minimum card purchase **$2.99** from 2026-10-27. New `partnerFeeUsd`, `internationalCardFeeUsd`, `minPurchaseWarning`, `feeTakenFrom: "partner"`, `err.minUsd` / `err.enforcedFrom` on `err.isBelowCardMinimum`, `minPurchaseWarning` on `createCheckout()`, `country` / `subdivision` on `purchaseCurrency()` with `err.isTaxPlaceUnavailable`, `cardFeeChargedToPartnerUsd` / `partnerDebitedUsd` on Platform Commerce card refunds, and the `partner_fee_usd` / `international_card_fee_usd` / `guarantee_covered` / `card_fee_charged_to_partner_usd` / `partner_debited_usd` webhook fields, all additive; an unacknowledged $10.00 coin purchase now credits 100.00 coins, not 93.70 (see **[Tiers](#tiers)**); **3.17.0** types the Steam fields on `purchase.refunded` / `purchase.disputed` (`rail`, `steam_transid`, nullable card-only ids): Steam chargebacks now arrive as `purchase.disputed`; **3.16.0** adds `warnings` on `createCheckout()` (item metadata on a coin session), `err.isDuplicateClientRequestId`, `err.isTrialAmountBelowFeeFloor` and `err.isIdentityCheckUnavailable`; **3.14.0** adds `credited` / `reasonCode` on `confirmPayment()` and `steamFinalizePurchase()`, Merchant of Record receipt fields, Platform Commerce card refunds in parts, and updates the **[tiers](#tiers)**: subscription card rates and chargeback handling by tier (the rates are superseded by 3.18.0), and Merchant of Record is applied for from the console; **3.13.0** documents the two **[tiers](#tiers)** (Open by default, Merchant of Record by application), adds **[INVO's card fee on coin purchases](#invos-card-fee-quote-show-acknowledge)** (rates superseded by 3.18.0): `quoteCurrencyPurchase()`, `acknowledgedTotalUsd` on `purchaseCurrency()`, the new `processingFeeUsd` / `feeTakenFrom` / `coinsCredited` / `chargeTotalUsd` fields and `err.isAmountBelowFee` / `err.isQuoteStale`, states the coin refund rule (only unspent coins), and adds **[paid trials](#paid-trials)** on card subscriptions (`trialAmountUsd`, the disclosed trial consent fields, `is_trial` / `expire_cause` on the events, `err.isPaymentMethodRequired` and the `isTrialAmount*` helpers); **3.12.0** removes the SDK's own card maximum (INVO's is a runtime setting, $100,000.00 by default); **3.11.0** adds the **[purchase status read](#did-the-purchase-go-through-the-status-read)**, where `invo.checkout.getPurchaseStatus()` / `waitForPurchase()` (and the standalone `CheckoutClient`) answer what happened to a hosted-checkout purchase in six words, four of them terminal, so a buyer is never shown a page that closes on nothing; stopping is decided by INVO's `terminal` and never re-derived from `status`, `nothingWasCharged()` says when a **Try again** is safe, `createCheckout()` now also returns `sessionToken`, and the subscription fee is corrected (it is its own rate; item purchases stay at 10/90; see [Tiers](#tiers) for the current rate); **3.10.0** documents **card-only subscriptions** (the card pays the full price every period, the coin wallet never pays; `walletOnly` deprecated; new `failure_code` `wallet_negative`; a renewal's `purchase.completed` is not a purchase) and the **[subscription refund limits](#refunds)**: `subscriptions.refund` can now return a 202 `pending_approval` refund request (`isRefundPendingApproval`), with `warnings`, the processor fee you bear, `subscriptionCanceled` (a full refund cancels), new classifiers (`isRefundsNotEnabled`, `isRefundWindowClosed`, `isRefundRequestPending`, `isRefundRequestRejected`, `isConcurrentRequest`, `isRefundMismatch`) and typed `subscription.refund_requested` / `refund_approved` / `refund_rejected` events, all additive; **3.9.0** adds the **[INVO-hosted card page for subscriptions](#cards-for-subscriptions)**, `invo.cards.createSetupSession`: mint a 10-minute link server-side, send the member to it, read the card back from `cards.list`, with no browser code and no card processor named anywhere (`beginSetup`/`confirmSetup` remain as the processor-bound alternative), plus the `isPlayerNotFound`, `isInvalidPlayerEmail` and `isInvalidInput` classifiers and a fix that makes `includePlayer` reads actually surface `playerEmail`/`playerName`; **3.8.0** adds **[Subscriptions](#subscriptions-recurring-billing)** as a first-class server surface on both rails: `invo.subscriptions.create/get/listForPlayer/cancel/changeAmount/setPaymentMethod/refund/steamInit/steamFinalize`, the off-session card capture (`invo.cards.beginSetup/confirmSetup/list`), the sandbox clock tools (`invo.sandbox.subscriptions.*`, which post to `/subscriptions/<id>/...` **relative to the sandbox base, not under `/api`**, with the new `sandboxClockKey`), typed `data` for all seven `subscription.*` webhook events, and eleven new error classifiers; **3.7.0** makes the **device approval grant a first-class SDK surface**: `beginDeviceApproval`, `pollDeviceApproval`, `confirmDeviceEnrollment` and, the step that actually moves the money, **`approveWithDeviceCode`** (plus the optional `completeDeviceApproval` loop); a grant that is polled to `approved` and left there settles **nothing**, which is the failure this release exists to make impossible, and `TRANSACTION_NOT_PENDING` now comes back as a typed `status: "not_pending"` result with `alreadySettled` rather than a thrown error you would have to string-match; **3.4.0** documents that a Steam title now bills through **its own Steam application**: the studio registers their appid + publisher Web API key and keeps a payment method on file, because Valve pays the studio and INVO settles afterwards (new `isSteamNotConfigured`, `isPartnerBillingNotSetUp`, `isPartnerSettlementUnavailable`, `isSteamAppChanged` error helpers); **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
@@ -487,7 +487,7 @@ Every INVO developer account is on one of two tiers. The SDK calls are the same
487
487
  | Who pays the card fee | **you**; the buyer pays the listed price and gets the listed coins or item | **you**; the buyer pays the listed price plus tax |
488
488
  | Fraud screening | included on every card payment | included on every card payment |
489
489
  | Chargebacks disputed as fraud (card sales) | card payments made **before November 8, 2026** keep the **chargeback guarantee**; from that date a lost one is your responsibility, passed through at cost | **chargeback guarantee**: INVO absorbs a lost one; your share is not reversed or held, and no dispute fee is passed to you |
490
- | Other chargebacks | the disputed amount comes out of your share; on subscription charges the dispute fee is passed through too | INVO manages the dispute and pays the dispute fee; the disputed amount comes out of your share and is restored if INVO wins |
490
+ | Other chargebacks | the disputed amount comes out of your share; on subscription charges the dispute fee is passed through too, and from November 8, 2026 on every card sale (coin purchases, Platform Commerce card sales and subscription charges), at cost | INVO manages the dispute and pays the dispute fee; the disputed amount comes out of your share and is restored if INVO wins |
491
491
  | Minimum card purchase (coins, Platform Commerce card sales) | $2.99, enforced from 2026-10-27 | $2.99, enforced from 2026-10-27 |
492
492
  | Item purchases (coins spent on an item) | 10% (you keep 90%) | 10% (you keep 90%) |
493
493
  | Platform Commerce balance purchases | 3.5% | 3.5% |
@@ -496,7 +496,7 @@ Every INVO developer account is on one of two tiers. The SDK calls are the same
496
496
 
497
497
  The card terms above (card fee, international fee, minimum and chargeback guarantee) apply to card purchases only; purchases through a third-party storefront or payment rail are unaffected and keep their current terms. On both tiers every card charge runs on INVO's card rail and INVO pays you out, as today. The card fee is charged to you, never to the buyer: the buyer pays the listed price (plus tax on Merchant of Record) and receives the listed coins or item. It nets against your earnings at purchase time and is not returned on a refund. The 1.5% on a card issued outside the United States applies on both tiers to every card charge and is reported as `international_card_fee_usd` (on a Platform Commerce sale it is already included in `fee_breakdown.platform_fee`); it replaces the earlier pass-through of international and currency conversion costs on subscriptions. Worked example, a $100.00 card sale: the buyer pays $100.00 (plus tax on Merchant of Record) and your fee is $3.80 on Open or $6.00 on Merchant of Record; on a card issued outside the US, $5.30 or $7.50. On a $10.00 sale: $0.65 or $1.05. The Open card fee was 4.5% + $0.30 until 2026-10-09. On Merchant of Record, if your chargeback rate for the previous calendar month (disputes opened, excluding inquiries, divided by card charges completed, in UTC months) was above 0.75%, the dispute fee on subscription charges disputed this month for a reason the chargeback guarantee does not cover is charged to you as on Open, and INVO reviews your approval. Merchant of Record is applied for per developer account, not per game, from the Selling & Tax page in your INVO console, and INVO reviews each application. Full details: https://docs.invo.network/docs/tiers/
498
498
 
499
- **Chargeback guarantee by tier.** The guarantee (INVO absorbs a lost fraud chargeback on a card sale) is a Merchant of Record term. On Open, card payments made before November 8, 2026 keep it; for card payments from that date, a lost fraud chargeback is your responsibility and is passed through at cost, like any other lost chargeback. Fraud screening stays included on every card payment on both tiers. On a lost dispute, `guarantee_covered` on `purchase.disputed` says which case applies.
499
+ **Chargeback guarantee by tier.** The guarantee (INVO absorbs a lost fraud chargeback on a card sale) is a Merchant of Record term. On Open, card payments made before November 8, 2026 keep it; for card payments from that date, a lost fraud chargeback is your responsibility and is passed through at cost, like any other lost chargeback. Fraud screening stays included on every card payment on both tiers. On a lost dispute, `guarantee_covered` on `purchase.disputed` says which case applies. When a card dispute closes, `purchase.disputed` also carries `dispute_fee_usd` (the dispute fee charged to you for that dispute, `"0.00"` when INVO bears it) and `dispute_fee_charged_to_partner`. A lost dispute is `purchase.disputed` with `dispute_status: "lost"`; there is no separate lost-dispute event.
500
500
 
501
501
  **Sends and transfers.** The fee is 10% of the amount moved, a network standard that is the same for every title: 3.5% to the sending title, 3.5% to the receiving title and 3% to INVO. Moving 100.00: the fee is 10.00 (3.50 to the sending title, 3.50 to the receiving title, 3.00 to INVO) and the recipient gets 90.00. A move inside one title earns that title both shares, 7.00, and INVO 3.00. Reconcile from the webhook figures rather than recomputing.
502
502
 
@@ -2504,7 +2504,7 @@ export const POST = createWebhookHandler({
2504
2504
  |---|---|---|
2505
2505
  | `purchase.completed` | every currency-purchase rail, **and every paid card subscription renewal** | grant currency (payload: `transaction_id, order_id, player_email, identity_id, usd_amount, currency_amount, currency_name, new_balance, rail`, `metadata`). `metadata` echoes what you passed to `createCheckout`/`purchaseCurrency` (all rails); `order_id` is also on every webhook as a secondary reconciliation key (`getOrderDetails`). Card purchases also carry `partner_fee_usd` and `international_card_fee_usd`, the card fees charged to you (the player paid the listed price). **Skip it when `metadata.source` is `"subscription_renewal"`**: those coins are spent by the renewal itself; grant on `subscription.renewed`. |
2506
2506
  | `purchase.failed` | `platform` rail only | handle failures |
2507
- | `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would: your share is reversed and INVO's card fee stays charged to you, on a Platform Commerce sale and on every subscription charge (`card_fee_charged_to_partner_usd`, and `partner_debited_usd` = share reversed plus that fee, since 2026-09-28). A subscription dispute also carries `processing_fee_usd`, which reads `"0.00"`. Coin purchase disputes carry none of these keys: a lost one takes back the player's coins, not your share. A Steam chargeback carries the same keys as a lost card dispute with `payment_intent_id`, `charge_id` and `dispute_id` `null`, plus `rail: "steam"` and `steam_transid`. **If you revoke on `purchase.refunded`, handle this too:** a Steam chargeback no longer arrives as `purchase.refunded` |
2507
+ | `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would: your share is reversed and INVO's card fee stays charged to you, on a Platform Commerce sale and on every subscription charge (`card_fee_charged_to_partner_usd`, and `partner_debited_usd` = share reversed plus that fee, since 2026-09-28). A subscription dispute also carries `processing_fee_usd`, which reads `"0.00"`. Coin purchase disputes carry none of these keys: a lost one takes back the player's coins, not your share. A Steam chargeback carries the same keys as a lost card dispute with `payment_intent_id`, `charge_id` and `dispute_id` `null`, plus `rail: "steam"` and `steam_transid`. A card dispute close also carries `dispute_fee_usd` (string decimal, `"0.00"` when INVO bears the fee, `null` when undecided) and `dispute_fee_charged_to_partner` (boolean or `null`); from November 8, 2026 the dispute fee on an Open-tier card sale is passed through to you at cost. **If you revoke on `purchase.refunded`, handle this too:** a Steam chargeback no longer arrives as `purchase.refunded` |
2508
2508
  | `purchase.refunded` | `game` / `steam` rails | handle refunds. Only coins the player still has from that purchase are taken back, never below zero. A Steam partial refund carries `fully_refunded: false` |
2509
2509
  | `item.purchased` | every item purchase | **grant the in-game item** (payload includes `transaction_id, order_id, player_email, identity_id, item_id, item_name, item_quantity, unit_price, total_price, currency_name, new_balance, fee_breakdown`) |
2510
2510
  | `platform_commerce.purchased` | every Platform Commerce purchase (balance immediately; **card after payment settles**) | **fulfill the ecommerce order** — never on the browser confirm (payload: `transaction_id, order_id, funding_source, player_email, identity_id, item_id, item_name, item_quantity, total_price`; + `unit_price, currency_name, new_balance` on balance; `total_price_usd` on card; `fee_breakdown`) |
@@ -220,11 +220,18 @@ var InvoError = class _InvoError extends Error {
220
220
  get isNotPlatformTenant() {
221
221
  return this.code === "NOT_A_PLATFORM_TENANT";
222
222
  }
223
- /** True if a Platform Commerce purchase, or a `purchaseItem` spend, was too small for the
224
- * fee to round above zero (`AMOUNT_BELOW_MINIMUM`, 400) — raise the amount. `purchaseItem`
225
- * rounds `totalPrice` to cents before this check. */
223
+ /**
224
+ * True on `AMOUNT_BELOW_MINIMUM` (400), which three calls answer:
225
+ * - a Platform Commerce purchase, or a `purchaseItem` spend, too small for the fee to
226
+ * round above zero: raise the amount (`purchaseItem` rounds `totalPrice` to cents
227
+ * before this check);
228
+ * - initiate-send / initiate-transfer below the sending title's minimum (backend
229
+ * 2026-10-12): the limit is on {@link minimumAmount}, in the title's own currency
230
+ * ({@link limitCurrencyName}). On the wallet transfer route {@link code} stays
231
+ * `INVALID_AMOUNT`; this predicate reads `error_code` too.
232
+ */
226
233
  get isAmountBelowMinimum() {
227
- return this.code === "AMOUNT_BELOW_MINIMUM";
234
+ return this.code === "AMOUNT_BELOW_MINIMUM" || this.bodyObject()["error_code"] === "AMOUNT_BELOW_MINIMUM";
228
235
  }
229
236
  /**
230
237
  * True if the `rail` you sent disagrees with the storefront key you
@@ -967,12 +974,38 @@ var InvoError = class _InvoError extends Error {
967
974
  return typeof e === "string" && e.startsWith("SIGNAL_");
968
975
  }
969
976
  /**
970
- * True when `registerPlayer` found the player already in your game with a DIFFERENT
971
- * phone (`PHONE_MISMATCH`, 409). Nothing changed; use `updatePlayerPhone` to change it.
977
+ * True when the phone you supplied is not the one on file for that player
978
+ * (`PHONE_MISMATCH`). Two places answer it:
979
+ * - `registerPlayer` (409): the player is already in your game with a different
980
+ * phone. Nothing changed; use `updatePlayerPhone` to change it.
981
+ * - initiate-send / initiate-transfer (400, since backend 2026-10-12): the sender
982
+ * phone does not match. Change the number first with `requestPhoneChange`.
972
983
  * (`mintPlayerToken` reports the same situation as `phoneMismatch: true` on success.)
973
984
  */
974
985
  get isPhoneMismatch() {
975
- return this.code === "PHONE_MISMATCH";
986
+ return this.code === "PHONE_MISMATCH" || this.bodyObject()["error_code"] === "PHONE_MISMATCH";
987
+ }
988
+ /**
989
+ * True when a send or transfer amount is above the sending title's maximum or the
990
+ * network ceiling for one move (`AMOUNT_ABOVE_MAXIMUM`, 400). See {@link maximumAmount}.
991
+ */
992
+ get isAmountAboveMaximum() {
993
+ return this.code === "AMOUNT_ABOVE_MAXIMUM" || this.bodyObject()["error_code"] === "AMOUNT_ABOVE_MAXIMUM";
994
+ }
995
+ /** The minimum amount (decimal string) on an `AMOUNT_BELOW_MINIMUM` refusal. */
996
+ get minimumAmount() {
997
+ const v = this.bodyObject()["minimum_amount"];
998
+ return typeof v === "string" ? v : void 0;
999
+ }
1000
+ /** The maximum amount (decimal string) on an `AMOUNT_ABOVE_MAXIMUM` refusal. */
1001
+ get maximumAmount() {
1002
+ const v = this.bodyObject()["maximum_amount"];
1003
+ return typeof v === "string" ? v : void 0;
1004
+ }
1005
+ /** The sending title's currency name on an amount-limit refusal, when it has one. */
1006
+ get limitCurrencyName() {
1007
+ const v = this.bodyObject()["currency_name"];
1008
+ return typeof v === "string" ? v : void 0;
976
1009
  }
977
1010
  /**
978
1011
  * True when the phone you supplied belongs to another email
@@ -1571,5 +1604,5 @@ function toApprovePhoneChangeResult(raw, changeRequestId) {
1571
1604
  }
1572
1605
 
1573
1606
  export { Http, InvoError, assertSecureBaseUrl, creditFields, phoneChangeSignalMessage, receiptFields, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toPhoneChangeApprovalsResult, toPhoneChangeRequest, toRedeemRewardResult, toRequestPhoneChangeResult, toRewardsPageLink };
1574
- //# sourceMappingURL=chunk-BOD4WOWO.js.map
1575
- //# sourceMappingURL=chunk-BOD4WOWO.js.map
1607
+ //# sourceMappingURL=chunk-7BYAUHTA.js.map
1608
+ //# sourceMappingURL=chunk-7BYAUHTA.js.map
package/dist/index.cjs CHANGED
@@ -222,11 +222,18 @@ var InvoError = class _InvoError extends Error {
222
222
  get isNotPlatformTenant() {
223
223
  return this.code === "NOT_A_PLATFORM_TENANT";
224
224
  }
225
- /** True if a Platform Commerce purchase, or a `purchaseItem` spend, was too small for the
226
- * fee to round above zero (`AMOUNT_BELOW_MINIMUM`, 400) — raise the amount. `purchaseItem`
227
- * rounds `totalPrice` to cents before this check. */
225
+ /**
226
+ * True on `AMOUNT_BELOW_MINIMUM` (400), which three calls answer:
227
+ * - a Platform Commerce purchase, or a `purchaseItem` spend, too small for the fee to
228
+ * round above zero: raise the amount (`purchaseItem` rounds `totalPrice` to cents
229
+ * before this check);
230
+ * - initiate-send / initiate-transfer below the sending title's minimum (backend
231
+ * 2026-10-12): the limit is on {@link minimumAmount}, in the title's own currency
232
+ * ({@link limitCurrencyName}). On the wallet transfer route {@link code} stays
233
+ * `INVALID_AMOUNT`; this predicate reads `error_code` too.
234
+ */
228
235
  get isAmountBelowMinimum() {
229
- return this.code === "AMOUNT_BELOW_MINIMUM";
236
+ return this.code === "AMOUNT_BELOW_MINIMUM" || this.bodyObject()["error_code"] === "AMOUNT_BELOW_MINIMUM";
230
237
  }
231
238
  /**
232
239
  * True if the `rail` you sent disagrees with the storefront key you
@@ -969,12 +976,38 @@ var InvoError = class _InvoError extends Error {
969
976
  return typeof e === "string" && e.startsWith("SIGNAL_");
970
977
  }
971
978
  /**
972
- * True when `registerPlayer` found the player already in your game with a DIFFERENT
973
- * phone (`PHONE_MISMATCH`, 409). Nothing changed; use `updatePlayerPhone` to change it.
979
+ * True when the phone you supplied is not the one on file for that player
980
+ * (`PHONE_MISMATCH`). Two places answer it:
981
+ * - `registerPlayer` (409): the player is already in your game with a different
982
+ * phone. Nothing changed; use `updatePlayerPhone` to change it.
983
+ * - initiate-send / initiate-transfer (400, since backend 2026-10-12): the sender
984
+ * phone does not match. Change the number first with `requestPhoneChange`.
974
985
  * (`mintPlayerToken` reports the same situation as `phoneMismatch: true` on success.)
975
986
  */
976
987
  get isPhoneMismatch() {
977
- return this.code === "PHONE_MISMATCH";
988
+ return this.code === "PHONE_MISMATCH" || this.bodyObject()["error_code"] === "PHONE_MISMATCH";
989
+ }
990
+ /**
991
+ * True when a send or transfer amount is above the sending title's maximum or the
992
+ * network ceiling for one move (`AMOUNT_ABOVE_MAXIMUM`, 400). See {@link maximumAmount}.
993
+ */
994
+ get isAmountAboveMaximum() {
995
+ return this.code === "AMOUNT_ABOVE_MAXIMUM" || this.bodyObject()["error_code"] === "AMOUNT_ABOVE_MAXIMUM";
996
+ }
997
+ /** The minimum amount (decimal string) on an `AMOUNT_BELOW_MINIMUM` refusal. */
998
+ get minimumAmount() {
999
+ const v = this.bodyObject()["minimum_amount"];
1000
+ return typeof v === "string" ? v : void 0;
1001
+ }
1002
+ /** The maximum amount (decimal string) on an `AMOUNT_ABOVE_MAXIMUM` refusal. */
1003
+ get maximumAmount() {
1004
+ const v = this.bodyObject()["maximum_amount"];
1005
+ return typeof v === "string" ? v : void 0;
1006
+ }
1007
+ /** The sending title's currency name on an amount-limit refusal, when it has one. */
1008
+ get limitCurrencyName() {
1009
+ const v = this.bodyObject()["currency_name"];
1010
+ return typeof v === "string" ? v : void 0;
978
1011
  }
979
1012
  /**
980
1013
  * True when the phone you supplied belongs to another email
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, j as PhoneChangeApprovalsResult, k as ApprovePhoneChangeInput, l as ApprovePhoneChangeResult, L as LinkDeviceResult, m as PendingCollectResult, D as DestinationsQuery, n as DestinationsResult, B as BalanceResult, o as LoyaltyCardsResult, p as LoyaltyVaultResult, R as RedeemRewardResult, q as RewardsPageLink, E as EnrollmentBeginResult, r as EnrollmentVerifyResult, s as RecoveryBeginResult, t as RecoveryCompleteResult } from './types-C7vpPqsF.cjs';
2
- export { u as BalanceRow, v as CheckoutPurchaseStatus, w as ClaimDelivery, x as DestinationGame, I as InvoError, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, T as LoyaltyVaultEntry, U as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-C7vpPqsF.cjs';
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, j as PhoneChangeApprovalsResult, k as ApprovePhoneChangeInput, l as ApprovePhoneChangeResult, L as LinkDeviceResult, m as PendingCollectResult, D as DestinationsQuery, n as DestinationsResult, B as BalanceResult, o as LoyaltyCardsResult, p as LoyaltyVaultResult, R as RedeemRewardResult, q as RewardsPageLink, E as EnrollmentBeginResult, r as EnrollmentVerifyResult, s as RecoveryBeginResult, t as RecoveryCompleteResult } from './types-DKiV5V0B.cjs';
2
+ export { u as BalanceRow, v as CheckoutPurchaseStatus, w as ClaimDelivery, x as DestinationGame, I as InvoError, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, T as LoyaltyVaultEntry, U as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-DKiV5V0B.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, j as PhoneChangeApprovalsResult, k as ApprovePhoneChangeInput, l as ApprovePhoneChangeResult, L as LinkDeviceResult, m as PendingCollectResult, D as DestinationsQuery, n as DestinationsResult, B as BalanceResult, o as LoyaltyCardsResult, p as LoyaltyVaultResult, R as RedeemRewardResult, q as RewardsPageLink, E as EnrollmentBeginResult, r as EnrollmentVerifyResult, s as RecoveryBeginResult, t as RecoveryCompleteResult } from './types-C7vpPqsF.js';
2
- export { u as BalanceRow, v as CheckoutPurchaseStatus, w as ClaimDelivery, x as DestinationGame, I as InvoError, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, T as LoyaltyVaultEntry, U as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-C7vpPqsF.js';
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, j as PhoneChangeApprovalsResult, k as ApprovePhoneChangeInput, l as ApprovePhoneChangeResult, L as LinkDeviceResult, m as PendingCollectResult, D as DestinationsQuery, n as DestinationsResult, B as BalanceResult, o as LoyaltyCardsResult, p as LoyaltyVaultResult, R as RedeemRewardResult, q as RewardsPageLink, E as EnrollmentBeginResult, r as EnrollmentVerifyResult, s as RecoveryBeginResult, t as RecoveryCompleteResult } from './types-DKiV5V0B.js';
2
+ export { u as BalanceRow, v as CheckoutPurchaseStatus, w as ClaimDelivery, x as DestinationGame, I as InvoError, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, T as LoyaltyVaultEntry, U as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-DKiV5V0B.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, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, receiptFields } from './chunk-BOD4WOWO.js';
2
- export { InvoError, phoneChangeSignalMessage } from './chunk-BOD4WOWO.js';
1
+ import { InvoError, assertSecureBaseUrl, Http, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, receiptFields } from './chunk-7BYAUHTA.js';
2
+ export { InvoError, phoneChangeSignalMessage } from './chunk-7BYAUHTA.js';
3
3
 
4
4
  // src/shared/webauthn.ts
5
5
  function malformedOptions(field) {
package/dist/server.cjs CHANGED
@@ -224,11 +224,18 @@ var InvoError = class _InvoError extends Error {
224
224
  get isNotPlatformTenant() {
225
225
  return this.code === "NOT_A_PLATFORM_TENANT";
226
226
  }
227
- /** True if a Platform Commerce purchase, or a `purchaseItem` spend, was too small for the
228
- * fee to round above zero (`AMOUNT_BELOW_MINIMUM`, 400) — raise the amount. `purchaseItem`
229
- * rounds `totalPrice` to cents before this check. */
227
+ /**
228
+ * True on `AMOUNT_BELOW_MINIMUM` (400), which three calls answer:
229
+ * - a Platform Commerce purchase, or a `purchaseItem` spend, too small for the fee to
230
+ * round above zero: raise the amount (`purchaseItem` rounds `totalPrice` to cents
231
+ * before this check);
232
+ * - initiate-send / initiate-transfer below the sending title's minimum (backend
233
+ * 2026-10-12): the limit is on {@link minimumAmount}, in the title's own currency
234
+ * ({@link limitCurrencyName}). On the wallet transfer route {@link code} stays
235
+ * `INVALID_AMOUNT`; this predicate reads `error_code` too.
236
+ */
230
237
  get isAmountBelowMinimum() {
231
- return this.code === "AMOUNT_BELOW_MINIMUM";
238
+ return this.code === "AMOUNT_BELOW_MINIMUM" || this.bodyObject()["error_code"] === "AMOUNT_BELOW_MINIMUM";
232
239
  }
233
240
  /**
234
241
  * True if the `rail` you sent disagrees with the storefront key you
@@ -971,12 +978,38 @@ var InvoError = class _InvoError extends Error {
971
978
  return typeof e === "string" && e.startsWith("SIGNAL_");
972
979
  }
973
980
  /**
974
- * True when `registerPlayer` found the player already in your game with a DIFFERENT
975
- * phone (`PHONE_MISMATCH`, 409). Nothing changed; use `updatePlayerPhone` to change it.
981
+ * True when the phone you supplied is not the one on file for that player
982
+ * (`PHONE_MISMATCH`). Two places answer it:
983
+ * - `registerPlayer` (409): the player is already in your game with a different
984
+ * phone. Nothing changed; use `updatePlayerPhone` to change it.
985
+ * - initiate-send / initiate-transfer (400, since backend 2026-10-12): the sender
986
+ * phone does not match. Change the number first with `requestPhoneChange`.
976
987
  * (`mintPlayerToken` reports the same situation as `phoneMismatch: true` on success.)
977
988
  */
978
989
  get isPhoneMismatch() {
979
- return this.code === "PHONE_MISMATCH";
990
+ return this.code === "PHONE_MISMATCH" || this.bodyObject()["error_code"] === "PHONE_MISMATCH";
991
+ }
992
+ /**
993
+ * True when a send or transfer amount is above the sending title's maximum or the
994
+ * network ceiling for one move (`AMOUNT_ABOVE_MAXIMUM`, 400). See {@link maximumAmount}.
995
+ */
996
+ get isAmountAboveMaximum() {
997
+ return this.code === "AMOUNT_ABOVE_MAXIMUM" || this.bodyObject()["error_code"] === "AMOUNT_ABOVE_MAXIMUM";
998
+ }
999
+ /** The minimum amount (decimal string) on an `AMOUNT_BELOW_MINIMUM` refusal. */
1000
+ get minimumAmount() {
1001
+ const v = this.bodyObject()["minimum_amount"];
1002
+ return typeof v === "string" ? v : void 0;
1003
+ }
1004
+ /** The maximum amount (decimal string) on an `AMOUNT_ABOVE_MAXIMUM` refusal. */
1005
+ get maximumAmount() {
1006
+ const v = this.bodyObject()["maximum_amount"];
1007
+ return typeof v === "string" ? v : void 0;
1008
+ }
1009
+ /** The sending title's currency name on an amount-limit refusal, when it has one. */
1010
+ get limitCurrencyName() {
1011
+ const v = this.bodyObject()["currency_name"];
1012
+ return typeof v === "string" ? v : void 0;
980
1013
  }
981
1014
  /**
982
1015
  * True when the phone you supplied belongs to another email
@@ -1495,7 +1528,7 @@ function toPhoneChangeRequest(raw) {
1495
1528
  }
1496
1529
 
1497
1530
  // src/version.ts
1498
- var SDK_VERSION = "3.22.0";
1531
+ var SDK_VERSION = "3.24.0";
1499
1532
 
1500
1533
  // src/shared/types.ts
1501
1534
  function isRefundPendingApproval(r) {
@@ -1917,6 +1950,10 @@ function toPlayerActivityEntry(raw) {
1917
1950
  createdAt: strOrNull3(raw["created_at"]),
1918
1951
  completedAt: strOrNull3(raw["completed_at"]),
1919
1952
  orderId: strOrNull3(raw["order_id"]),
1953
+ // Additive fee fields (backend 2026-10-12): set only when INVO sent the key.
1954
+ ..."fee_amount" in raw ? { feeAmount: strOrNull3(raw["fee_amount"]) } : {},
1955
+ ..."net_amount" in raw ? { netAmount: strOrNull3(raw["net_amount"]) } : {},
1956
+ ..."gross_amount" in raw ? { grossAmount: strOrNull3(raw["gross_amount"]) } : {},
1920
1957
  raw
1921
1958
  };
1922
1959
  }
package/dist/server.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { I as InvoError, H as Http, $ as AuthHeader, a0 as CardSetupSessionInput, g as CallOptions, a1 as CardSetupSessionResult, a2 as CardSetupInput, a3 as CardSetupResult, a4 as CardSetupConfirmInput, a5 as CardSetupConfirmResult, a6 as PlayerCardsResult, a7 as PlatformPurchaseInput, a8 as PlatformPurchaseResult, a9 as PlatformOrderStatusResult, aa as PlatformPurchaseHistoryQuery, ab as PlatformPurchaseHistoryResult, ac as PlatformRefundInput, ad as PlatformRefundResult, ae as CreateSubscriptionInput, af as SubscriptionResult, ag as GetSubscriptionOptions, ah as GetSubscriptionResult, ai as ListSubscriptionsOptions, aj as SubscriptionListResult, ak as CancelSubscriptionOptions, al as CancelResult, am as ChangeAmountResult, an as SetPaymentMethodInput, ao as SetPaymentMethodResult, ap as RefundSubscriptionInput, aq as RefundResult, ar as SteamSubscriptionInitInput, as as SteamInitResult, at as SteamFinalizeSubscriptionResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, o as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, n as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-C7vpPqsF.cjs';
2
- export { bx as CardSetupStatus, by as CheckoutWarning, w as ClaimDelivery, bz as CurrencyBalance, bA as CurrencyPurchaseQuoteBreakdown, x as DestinationGame, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bE as DeviceApprovalPollStatus, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, bM as InboundPendingItem, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, bN as LinkedIdentityEmail, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, bO as MinPurchaseWarning, bP as PhoneChangeConfirmation, bQ as PhoneChangeRequestStatus, bR as PlatformPurchaseStatus, bS as PlayerActivityType, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, bX as RefundRevenueShareAttribution, bY as RefundWarning, bZ as SandboxClockState, b_ as SavedCard, b$ as SteamPack, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, ca as UnacknowledgedPurchaseOutcome, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-C7vpPqsF.cjs';
1
+ import { I as InvoError, H as Http, $ as AuthHeader, a0 as CardSetupSessionInput, g as CallOptions, a1 as CardSetupSessionResult, a2 as CardSetupInput, a3 as CardSetupResult, a4 as CardSetupConfirmInput, a5 as CardSetupConfirmResult, a6 as PlayerCardsResult, a7 as PlatformPurchaseInput, a8 as PlatformPurchaseResult, a9 as PlatformOrderStatusResult, aa as PlatformPurchaseHistoryQuery, ab as PlatformPurchaseHistoryResult, ac as PlatformRefundInput, ad as PlatformRefundResult, ae as CreateSubscriptionInput, af as SubscriptionResult, ag as GetSubscriptionOptions, ah as GetSubscriptionResult, ai as ListSubscriptionsOptions, aj as SubscriptionListResult, ak as CancelSubscriptionOptions, al as CancelResult, am as ChangeAmountResult, an as SetPaymentMethodInput, ao as SetPaymentMethodResult, ap as RefundSubscriptionInput, aq as RefundResult, ar as SteamSubscriptionInitInput, as as SteamInitResult, at as SteamFinalizeSubscriptionResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, o as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, n as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-DKiV5V0B.cjs';
2
+ export { bx as CardSetupStatus, by as CheckoutWarning, w as ClaimDelivery, bz as CurrencyBalance, bA as CurrencyPurchaseQuoteBreakdown, x as DestinationGame, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bE as DeviceApprovalPollStatus, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, bM as InboundPendingItem, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, bN as LinkedIdentityEmail, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, bO as MinPurchaseWarning, bP as PhoneChangeConfirmation, bQ as PhoneChangeRequestStatus, bR as PlatformPurchaseStatus, bS as PlayerActivityType, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, bX as RefundRevenueShareAttribution, bY as RefundWarning, bZ as SandboxClockState, b_ as SavedCard, b$ as SteamPack, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, ca as UnacknowledgedPurchaseOutcome, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-DKiV5V0B.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.22.0";
9
+ declare const SDK_VERSION = "3.24.0";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -134,6 +134,23 @@ interface PurchaseEventData {
134
134
  * guarantee covered it; `null` where it does not apply.
135
135
  */
136
136
  partner_debited_usd?: string | null;
137
+ /**
138
+ * Additive (2026-10-09), on a card purchase.disputed sent when the dispute closes (won or
139
+ * lost): the card network's dispute fee charged to you for this dispute, USD decimal string
140
+ * such as `"15.00"`. `"0.00"` when INVO bears it or it was returned to INVO. From November 8,
141
+ * 2026, on Open-tier card sales (coin purchases, Platform Commerce card sales and subscription
142
+ * charges), the dispute fee is passed through to you at cost. `null` when it cannot be decided.
143
+ * A lost dispute is purchase.disputed with `dispute_status` `"lost"`; there is no separate
144
+ * lost-dispute event. Absent on older events and storefront chargebacks; do not read absence
145
+ * as zero.
146
+ */
147
+ dispute_fee_usd?: string | null;
148
+ /**
149
+ * Additive (2026-10-09), same events: `true` when `dispute_fee_usd` is above zero (the fee is
150
+ * charged to you), `false` when it is not, `null` when it cannot be decided. Absent where
151
+ * `dispute_fee_usd` is absent.
152
+ */
153
+ dispute_fee_charged_to_partner?: boolean | null;
137
154
  /** On a lost subscription purchase.disputed: the subscription and period it concerns. */
138
155
  subscription_id?: string | null;
139
156
  period_seq?: number | null;
@@ -349,6 +366,25 @@ interface PlayerPhoneChangedData {
349
366
  previous_identity_id: string;
350
367
  [key: string]: unknown;
351
368
  }
369
+ /**
370
+ * `identity.passkey_reset`: a player replaced a lost INVO passkey through recovery, on
371
+ * INVO's approval or claim page or in your app through `recoveryBegin` /
372
+ * `recoveryComplete` (the in-app path sends it since backend 2026-10-12). Sent to the
373
+ * game the recovery ran in. Sending money out is paused for that player until
374
+ * `cooldown_until`; receiving and collecting still work. Tell the player, or flag the
375
+ * account, if they did not start it.
376
+ */
377
+ interface IdentityPasskeyResetData {
378
+ /** The player's opaque identity id (the same id `player.phone_changed` carries). */
379
+ identity_id: string;
380
+ /** `"hosted_device"`, `"hosted_claim"` or `"sdk"`. */
381
+ reset_via: "hosted_device" | "hosted_claim" | "sdk" | (string & {});
382
+ /** ISO timestamp: until when sending money out is paused for this player. */
383
+ cooldown_until: string | null;
384
+ /** How many passkeys were switched off. */
385
+ deactivated_count: number;
386
+ [key: string]: unknown;
387
+ }
352
388
  /**
353
389
  * The block every subscription event carries EXCEPT `subscription.renewed` and
354
390
  * `subscription.refunded`, which have their own shapes. `identity_id` is an opaque,
@@ -791,6 +827,9 @@ type InvoWebhookEvent = (WebhookBase & {
791
827
  }) | (WebhookBase & {
792
828
  event_type: "player.phone_changed";
793
829
  data: PlayerPhoneChangedData;
830
+ }) | (WebhookBase & {
831
+ event_type: "identity.passkey_reset";
832
+ data: IdentityPasskeyResetData;
794
833
  }) | (WebhookBase & {
795
834
  event_type: "webhook.test";
796
835
  data: Record<string, unknown>;
@@ -1840,4 +1879,4 @@ declare class InvoServer {
1840
1879
  private toInitiateResult;
1841
1880
  }
1842
1881
 
1843
- export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, type PayoutStatusChangedData, PhoneChangeRequest, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseHistoryQuery, PlatformPurchaseHistoryResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerActivityEntry, PlayerActivityQuery, PlayerActivityResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, type PlayerPhoneChangedData, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, RequestPhoneChangeInput, RequestPhoneChangeResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
1882
+ export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, type IdentityPasskeyResetData, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, type PayoutStatusChangedData, PhoneChangeRequest, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseHistoryQuery, PlatformPurchaseHistoryResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerActivityEntry, PlayerActivityQuery, PlayerActivityResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, type PlayerPhoneChangedData, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, RequestPhoneChangeInput, RequestPhoneChangeResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
package/dist/server.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { I as InvoError, H as Http, $ as AuthHeader, a0 as CardSetupSessionInput, g as CallOptions, a1 as CardSetupSessionResult, a2 as CardSetupInput, a3 as CardSetupResult, a4 as CardSetupConfirmInput, a5 as CardSetupConfirmResult, a6 as PlayerCardsResult, a7 as PlatformPurchaseInput, a8 as PlatformPurchaseResult, a9 as PlatformOrderStatusResult, aa as PlatformPurchaseHistoryQuery, ab as PlatformPurchaseHistoryResult, ac as PlatformRefundInput, ad as PlatformRefundResult, ae as CreateSubscriptionInput, af as SubscriptionResult, ag as GetSubscriptionOptions, ah as GetSubscriptionResult, ai as ListSubscriptionsOptions, aj as SubscriptionListResult, ak as CancelSubscriptionOptions, al as CancelResult, am as ChangeAmountResult, an as SetPaymentMethodInput, ao as SetPaymentMethodResult, ap as RefundSubscriptionInput, aq as RefundResult, ar as SteamSubscriptionInitInput, as as SteamInitResult, at as SteamFinalizeSubscriptionResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, o as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, n as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-C7vpPqsF.js';
2
- export { bx as CardSetupStatus, by as CheckoutWarning, w as ClaimDelivery, bz as CurrencyBalance, bA as CurrencyPurchaseQuoteBreakdown, x as DestinationGame, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bE as DeviceApprovalPollStatus, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, bM as InboundPendingItem, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, bN as LinkedIdentityEmail, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, bO as MinPurchaseWarning, bP as PhoneChangeConfirmation, bQ as PhoneChangeRequestStatus, bR as PlatformPurchaseStatus, bS as PlayerActivityType, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, bX as RefundRevenueShareAttribution, bY as RefundWarning, bZ as SandboxClockState, b_ as SavedCard, b$ as SteamPack, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, ca as UnacknowledgedPurchaseOutcome, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-C7vpPqsF.js';
1
+ import { I as InvoError, H as Http, $ as AuthHeader, a0 as CardSetupSessionInput, g as CallOptions, a1 as CardSetupSessionResult, a2 as CardSetupInput, a3 as CardSetupResult, a4 as CardSetupConfirmInput, a5 as CardSetupConfirmResult, a6 as PlayerCardsResult, a7 as PlatformPurchaseInput, a8 as PlatformPurchaseResult, a9 as PlatformOrderStatusResult, aa as PlatformPurchaseHistoryQuery, ab as PlatformPurchaseHistoryResult, ac as PlatformRefundInput, ad as PlatformRefundResult, ae as CreateSubscriptionInput, af as SubscriptionResult, ag as GetSubscriptionOptions, ah as GetSubscriptionResult, ai as ListSubscriptionsOptions, aj as SubscriptionListResult, ak as CancelSubscriptionOptions, al as CancelResult, am as ChangeAmountResult, an as SetPaymentMethodInput, ao as SetPaymentMethodResult, ap as RefundSubscriptionInput, aq as RefundResult, ar as SteamSubscriptionInitInput, as as SteamInitResult, at as SteamFinalizeSubscriptionResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, o as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, n as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-DKiV5V0B.js';
2
+ export { bx as CardSetupStatus, by as CheckoutWarning, w as ClaimDelivery, bz as CurrencyBalance, bA as CurrencyPurchaseQuoteBreakdown, x as DestinationGame, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bE as DeviceApprovalPollStatus, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, bM as InboundPendingItem, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, bN as LinkedIdentityEmail, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, bO as MinPurchaseWarning, bP as PhoneChangeConfirmation, bQ as PhoneChangeRequestStatus, bR as PlatformPurchaseStatus, bS as PlayerActivityType, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, bX as RefundRevenueShareAttribution, bY as RefundWarning, bZ as SandboxClockState, b_ as SavedCard, b$ as SteamPack, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, ca as UnacknowledgedPurchaseOutcome, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-DKiV5V0B.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.22.0";
9
+ declare const SDK_VERSION = "3.24.0";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -134,6 +134,23 @@ interface PurchaseEventData {
134
134
  * guarantee covered it; `null` where it does not apply.
135
135
  */
136
136
  partner_debited_usd?: string | null;
137
+ /**
138
+ * Additive (2026-10-09), on a card purchase.disputed sent when the dispute closes (won or
139
+ * lost): the card network's dispute fee charged to you for this dispute, USD decimal string
140
+ * such as `"15.00"`. `"0.00"` when INVO bears it or it was returned to INVO. From November 8,
141
+ * 2026, on Open-tier card sales (coin purchases, Platform Commerce card sales and subscription
142
+ * charges), the dispute fee is passed through to you at cost. `null` when it cannot be decided.
143
+ * A lost dispute is purchase.disputed with `dispute_status` `"lost"`; there is no separate
144
+ * lost-dispute event. Absent on older events and storefront chargebacks; do not read absence
145
+ * as zero.
146
+ */
147
+ dispute_fee_usd?: string | null;
148
+ /**
149
+ * Additive (2026-10-09), same events: `true` when `dispute_fee_usd` is above zero (the fee is
150
+ * charged to you), `false` when it is not, `null` when it cannot be decided. Absent where
151
+ * `dispute_fee_usd` is absent.
152
+ */
153
+ dispute_fee_charged_to_partner?: boolean | null;
137
154
  /** On a lost subscription purchase.disputed: the subscription and period it concerns. */
138
155
  subscription_id?: string | null;
139
156
  period_seq?: number | null;
@@ -349,6 +366,25 @@ interface PlayerPhoneChangedData {
349
366
  previous_identity_id: string;
350
367
  [key: string]: unknown;
351
368
  }
369
+ /**
370
+ * `identity.passkey_reset`: a player replaced a lost INVO passkey through recovery, on
371
+ * INVO's approval or claim page or in your app through `recoveryBegin` /
372
+ * `recoveryComplete` (the in-app path sends it since backend 2026-10-12). Sent to the
373
+ * game the recovery ran in. Sending money out is paused for that player until
374
+ * `cooldown_until`; receiving and collecting still work. Tell the player, or flag the
375
+ * account, if they did not start it.
376
+ */
377
+ interface IdentityPasskeyResetData {
378
+ /** The player's opaque identity id (the same id `player.phone_changed` carries). */
379
+ identity_id: string;
380
+ /** `"hosted_device"`, `"hosted_claim"` or `"sdk"`. */
381
+ reset_via: "hosted_device" | "hosted_claim" | "sdk" | (string & {});
382
+ /** ISO timestamp: until when sending money out is paused for this player. */
383
+ cooldown_until: string | null;
384
+ /** How many passkeys were switched off. */
385
+ deactivated_count: number;
386
+ [key: string]: unknown;
387
+ }
352
388
  /**
353
389
  * The block every subscription event carries EXCEPT `subscription.renewed` and
354
390
  * `subscription.refunded`, which have their own shapes. `identity_id` is an opaque,
@@ -791,6 +827,9 @@ type InvoWebhookEvent = (WebhookBase & {
791
827
  }) | (WebhookBase & {
792
828
  event_type: "player.phone_changed";
793
829
  data: PlayerPhoneChangedData;
830
+ }) | (WebhookBase & {
831
+ event_type: "identity.passkey_reset";
832
+ data: IdentityPasskeyResetData;
794
833
  }) | (WebhookBase & {
795
834
  event_type: "webhook.test";
796
835
  data: Record<string, unknown>;
@@ -1840,4 +1879,4 @@ declare class InvoServer {
1840
1879
  private toInitiateResult;
1841
1880
  }
1842
1881
 
1843
- export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, type PayoutStatusChangedData, PhoneChangeRequest, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseHistoryQuery, PlatformPurchaseHistoryResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerActivityEntry, PlayerActivityQuery, PlayerActivityResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, type PlayerPhoneChangedData, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, RequestPhoneChangeInput, RequestPhoneChangeResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
1882
+ export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, type IdentityPasskeyResetData, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, type PayoutStatusChangedData, PhoneChangeRequest, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseHistoryQuery, PlatformPurchaseHistoryResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerActivityEntry, PlayerActivityQuery, PlayerActivityResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, type PlayerPhoneChangedData, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, RequestPhoneChangeInput, RequestPhoneChangeResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
package/dist/server.js CHANGED
@@ -1,9 +1,9 @@
1
- import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, receiptFields, creditFields, toLoyaltyCardsResult, toDestinationsResult } from './chunk-BOD4WOWO.js';
2
- export { InvoError } from './chunk-BOD4WOWO.js';
1
+ import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, receiptFields, creditFields, toLoyaltyCardsResult, toDestinationsResult } from './chunk-7BYAUHTA.js';
2
+ export { InvoError } from './chunk-7BYAUHTA.js';
3
3
  import { createHmac, timingSafeEqual } from 'crypto';
4
4
 
5
5
  // src/version.ts
6
- var SDK_VERSION = "3.22.0";
6
+ var SDK_VERSION = "3.24.0";
7
7
 
8
8
  // src/shared/types.ts
9
9
  function isRefundPendingApproval(r) {
@@ -425,6 +425,10 @@ function toPlayerActivityEntry(raw) {
425
425
  createdAt: strOrNull(raw["created_at"]),
426
426
  completedAt: strOrNull(raw["completed_at"]),
427
427
  orderId: strOrNull(raw["order_id"]),
428
+ // Additive fee fields (backend 2026-10-12): set only when INVO sent the key.
429
+ ..."fee_amount" in raw ? { feeAmount: strOrNull(raw["fee_amount"]) } : {},
430
+ ..."net_amount" in raw ? { netAmount: strOrNull(raw["net_amount"]) } : {},
431
+ ..."gross_amount" in raw ? { grossAmount: strOrNull(raw["gross_amount"]) } : {},
428
432
  raw
429
433
  };
430
434
  }