@invonetwork/web-sdk 3.18.0 → 3.20.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/dist/server.cjs CHANGED
@@ -821,6 +821,7 @@ var InvoError = class _InvoError extends Error {
821
821
  * The same code comes back from `cards.beginSetup` and from `mintPlayerToken` for the
822
822
  * same reason; those two never create players, so create the member first (for
823
823
  * example with `createSetupSession` and a `playerName`, or a currency purchase).
824
+ * `getPlayerRewards` answers it when no player has that email in this game.
824
825
  */
825
826
  get isPlayerNotFound() {
826
827
  return this.code === "PLAYER_NOT_FOUND";
@@ -835,7 +836,8 @@ var InvoError = class _InvoError extends Error {
835
836
  }
836
837
  /**
837
838
  * True when `cards.createSetupSession` was refused because `playerEmail` was missing or
838
- * is not an email address (`INVALID_PLAYER_EMAIL`, 400).
839
+ * is not an email address (`INVALID_PLAYER_EMAIL`, 400). `getPlayerRewards` answers it
840
+ * for an email that is not an email address (a blank one never leaves the SDK).
839
841
  */
840
842
  get isInvalidPlayerEmail() {
841
843
  return this.code === "INVALID_PLAYER_EMAIL";
@@ -886,6 +888,26 @@ var InvoError = class _InvoError extends Error {
886
888
  get isIdentityCheckUnavailable() {
887
889
  return this.code === "IDENTITY_CHECK_UNAVAILABLE";
888
890
  }
891
+ // ---- Loyalty rewards (InvoClient.redeemReward) ----
892
+ /** True when a reward was already redeemed and its code can no longer be shown (`already_redeemed`, 409). */
893
+ get isRewardAlreadyRedeemed() {
894
+ return this.code === "already_redeemed";
895
+ }
896
+ /** True when the player has no such reward (`vault_entry_not_found`, 404). */
897
+ get isRewardNotFound() {
898
+ return this.code === "vault_entry_not_found";
899
+ }
900
+ /**
901
+ * True when the reward cannot be redeemed right now (409): `inventory_exhausted` (no units or
902
+ * codes are left for it) or `conflict` (the reward is reserved or revoked).
903
+ */
904
+ get isRewardUnavailable() {
905
+ return this.code === "inventory_exhausted" || this.code === "conflict";
906
+ }
907
+ /** True when the reward expired before it was redeemed (`vault_entry_expired`, 410). */
908
+ get isRewardExpired() {
909
+ return this.code === "vault_entry_expired";
910
+ }
889
911
  /** Seconds to wait before retrying, when the backend throttled the call (429 `retry_after`). */
890
912
  get retryAfter() {
891
913
  const v = this.bodyObject()["retry_after"];
@@ -1168,6 +1190,89 @@ function toDestinationsResult(raw, direction) {
1168
1190
  };
1169
1191
  }
1170
1192
 
1193
+ // src/shared/loyalty.ts
1194
+ var obj = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
1195
+ var rows = (v) => Array.isArray(v) ? v.filter((r) => r && typeof r === "object" && !Array.isArray(r)) : [];
1196
+ var str = (v) => v === void 0 || v === null ? "" : String(v);
1197
+ var strOrNull = (v) => v === void 0 || v === null ? null : String(v);
1198
+ var numOrNull = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
1199
+ var int = (v, fallback = 0) => typeof v === "number" && Number.isFinite(v) ? v : fallback;
1200
+ var passThrough = (v) => v;
1201
+ function toLoyaltyStepProgress(value) {
1202
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
1203
+ const v = value;
1204
+ const current = v["current"];
1205
+ const target = v["target"];
1206
+ if (!Number.isInteger(current) || !Number.isInteger(target)) return null;
1207
+ return { current, target };
1208
+ }
1209
+ function toStep(row) {
1210
+ return {
1211
+ stepId: strOrNull(row["step_id"]),
1212
+ index: int(row["index"]),
1213
+ action: str(row["action"]),
1214
+ label: str(row["label"]),
1215
+ summary: str(row["summary"]),
1216
+ windowHours: numOrNull(row["window_hours"]),
1217
+ state: str(row["state"]),
1218
+ progress: toLoyaltyStepProgress(row["progress"]),
1219
+ raw: row
1220
+ };
1221
+ }
1222
+ function toCardReward(row) {
1223
+ return {
1224
+ vaultEntryId: str(row["vault_entry_id"]),
1225
+ rewardId: str(row["reward_id"]),
1226
+ state: str(row["state"]),
1227
+ unlockedAt: str(row["unlocked_at"]),
1228
+ expiresAt: str(row["expires_at"]),
1229
+ redeemedAt: strOrNull(row["redeemed_at"]),
1230
+ codeMasked: strOrNull(row["code_masked"]),
1231
+ canRedeem: row["can_redeem"] === true,
1232
+ canRevealAgain: row["can_reveal_again"] === true,
1233
+ revealUntil: strOrNull(row["reveal_until"]),
1234
+ raw: row
1235
+ };
1236
+ }
1237
+ function toLoyaltyCard(row) {
1238
+ const brand = obj(row["brand"]);
1239
+ const reward = obj(row["reward"]);
1240
+ const steps = rows(row["steps"]).map(toStep);
1241
+ return {
1242
+ cardVersion: passThrough(row["card_version"]),
1243
+ mode: str(row["mode"]),
1244
+ programId: strOrNull(row["program_id"]),
1245
+ questId: strOrNull(row["quest_id"]),
1246
+ questVersion: numOrNull(row["quest_version"]),
1247
+ campaignId: strOrNull(row["campaign_id"]),
1248
+ title: str(row["title"]),
1249
+ description: str(row["description"]),
1250
+ brand: { name: strOrNull(brand["name"]), logoUrl: strOrNull(brand["logo_url"]) },
1251
+ artUrl: strOrNull(row["art_url"]),
1252
+ reward: { rewardId: strOrNull(reward["reward_id"]), name: strOrNull(reward["name"]) },
1253
+ orderMode: str(row["order_mode"]),
1254
+ status: str(row["status"]),
1255
+ startsAt: strOrNull(row["starts_at"]),
1256
+ endsAt: strOrNull(row["ends_at"]),
1257
+ completionHours: numOrNull(row["completion_hours"]),
1258
+ completionNote: strOrNull(row["completion_note"]),
1259
+ windowEndsAt: strOrNull(row["window_ends_at"]),
1260
+ completedAt: strOrNull(row["completed_at"]),
1261
+ stepsRequired: passThrough(row["steps_required"]),
1262
+ stepsComplete: passThrough(row["steps_complete"]),
1263
+ steps,
1264
+ rewards: rows(row["rewards"]).map(toCardReward),
1265
+ raw: row
1266
+ };
1267
+ }
1268
+ function toLoyaltyCardsResult(raw) {
1269
+ return {
1270
+ cardVersion: passThrough(raw["card_version"]),
1271
+ cards: rows(raw["cards"]).map(toLoyaltyCard),
1272
+ raw
1273
+ };
1274
+ }
1275
+
1171
1276
  // src/shared/receipt-fields.ts
1172
1277
  function creditFields(raw) {
1173
1278
  const c = raw["credited"];
@@ -1186,7 +1291,7 @@ function receiptFields(raw) {
1186
1291
  }
1187
1292
 
1188
1293
  // src/version.ts
1189
- var SDK_VERSION = "3.17.0";
1294
+ var SDK_VERSION = "3.20.0";
1190
1295
 
1191
1296
  // src/shared/types.ts
1192
1297
  function isRefundPendingApproval(r) {
@@ -2051,6 +2156,9 @@ function toRefundResult(raw, subscriptionId, clientRequestId) {
2051
2156
  processingFeeBorneBy: optionalString(raw, "processing_fee_borne_by"),
2052
2157
  processingFeeTransactionId: optionalString(raw, "processing_fee_transaction_id"),
2053
2158
  partnerTotalReversedUsd: optionalString(raw, "partner_total_reversed_usd"),
2159
+ // ---- additive (2026-09-28, D-PRICE-012): undefined on a receipt stored before it ----
2160
+ cardFeeChargedToPartnerUsd: optionalString(raw, "card_fee_charged_to_partner_usd"),
2161
+ partnerDebitedUsd: optionalString(raw, "partner_debited_usd"),
2054
2162
  initiation: optionalString(raw, "initiation"),
2055
2163
  refundRequestId: optionalString(raw, "refund_request_id"),
2056
2164
  raw
@@ -2416,13 +2524,13 @@ var SubscriptionsServer = class {
2416
2524
  this.auth,
2417
2525
  { signal: opts?.signal }
2418
2526
  );
2419
- const rows = Array.isArray(raw["subscriptions"]) ? raw["subscriptions"] : [];
2527
+ const rows2 = Array.isArray(raw["subscriptions"]) ? raw["subscriptions"] : [];
2420
2528
  const p = raw["pagination"] ?? {};
2421
2529
  return {
2422
2530
  playerEmail: String(raw["player_email"] ?? playerEmail),
2423
- subscriptions: rows.map(toSubscription),
2531
+ subscriptions: rows2.map(toSubscription),
2424
2532
  pagination: {
2425
- totalCount: Number(p["total_count"] ?? rows.length),
2533
+ totalCount: Number(p["total_count"] ?? rows2.length),
2426
2534
  limit: Number(p["limit"] ?? 50),
2427
2535
  offset: Number(p["offset"] ?? 0),
2428
2536
  hasMore: p["has_more"] === true
@@ -2577,7 +2685,9 @@ var SubscriptionsServer = class {
2577
2685
  * and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
2578
2686
  * credits coins. Your revenue is reversed for the refunded portion
2579
2687
  * (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
2580
- * processor fee (`processingFeeUsd`; `partnerTotalReversedUsd` is the sum). **A full refund
2688
+ * whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
2689
+ * `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
2690
+ * `processingFeeUsd` reads `"0.00"`). **A full refund
2581
2691
  * cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
2582
2692
  * with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
2583
2693
  * order); a partial one does not. INVO emails the member.
@@ -2919,9 +3029,9 @@ var CardsServer = class {
2919
3029
  this.auth,
2920
3030
  { signal: opts?.signal }
2921
3031
  );
2922
- const rows = Array.isArray(raw["cards"]) ? raw["cards"] : [];
3032
+ const rows2 = Array.isArray(raw["cards"]) ? raw["cards"] : [];
2923
3033
  return {
2924
- cards: rows.map(toSavedCard).filter((c) => c !== null),
3034
+ cards: rows2.map(toSavedCard).filter((c) => c !== null),
2925
3035
  raw
2926
3036
  };
2927
3037
  }
@@ -3629,14 +3739,40 @@ var InvoServer = class {
3629
3739
  });
3630
3740
  }
3631
3741
  const raw = await this.http.get(path, this.auth, { signal: opts?.signal });
3632
- const rows = Array.isArray(raw["balances"]) ? raw["balances"] : [];
3742
+ const rows2 = Array.isArray(raw["balances"]) ? raw["balances"] : [];
3633
3743
  return {
3634
3744
  player: raw["player"] ?? {},
3635
- balances: rows.map(toCurrencyBalance),
3745
+ balances: rows2.map(toCurrencyBalance),
3636
3746
  summary: raw["summary"] ?? {},
3637
3747
  raw
3638
3748
  };
3639
3749
  }
3750
+ /**
3751
+ * One player's loyalty cards, read by your SERVER with the game secret: the same cards
3752
+ * the player sees through `InvoClient.getMyRewards()`, for the player with this email in
3753
+ * your game. Each step carries `state` and `progress` (`{ current, target }`, or `null`
3754
+ * when the number could not be read this time: render `state` alone then). Rewards carry
3755
+ * their masked code only; a code is never returned here.
3756
+ *
3757
+ * Refusals (all `InvoError`): a blank email throws `INVALID_INPUT` before the network;
3758
+ * `400 INVALID_PLAYER_EMAIL` (`err.isInvalidPlayerEmail`), `401 INVALID_GAME_SECRET` for a missing or wrong key, or
3759
+ * a per-channel key (this read takes the game's server secret only), `404 PLAYER_NOT_FOUND`
3760
+ * (`err.isPlayerNotFound`: no player with this email in this game), `429` (back off;
3761
+ * `err.retryAfter`). Also `409 NO_TENANT` (the game is not set up for loyalty), `503`
3762
+ * (temporarily unavailable) and `502` / `504` (the loyalty service could not be reached or
3763
+ * timed out): retry later. A GET, so transient failures are retried automatically.
3764
+ */
3765
+ async getPlayerRewards(playerEmail, opts) {
3766
+ if (typeof playerEmail !== "string" || !playerEmail.trim()) {
3767
+ throw invalidInput("playerEmail", playerEmail, "is required");
3768
+ }
3769
+ const raw = await this.http.get(
3770
+ `/api/sdk/loyalty/players/rewards?player_email=${encodeURIComponent(playerEmail.trim())}`,
3771
+ this.auth,
3772
+ { signal: opts?.signal }
3773
+ );
3774
+ return toLoyaltyCardsResult(raw);
3775
+ }
3640
3776
  /**
3641
3777
  * List LIVE, unclaimed inbound sends/transfers addressed to a player at YOUR game —
3642
3778
  * the source of truth for a "you have X to collect" badge. Pass the player's email
@@ -3658,8 +3794,8 @@ var InvoServer = class {
3658
3794
  this.auth,
3659
3795
  { signal: opts?.signal }
3660
3796
  );
3661
- const rows = Array.isArray(raw["inbound_pending"]) ? raw["inbound_pending"] : [];
3662
- return { inboundPending: rows.map(toInboundPendingItem), raw };
3797
+ const rows2 = Array.isArray(raw["inbound_pending"]) ? raw["inbound_pending"] : [];
3798
+ return { inboundPending: rows2.map(toInboundPendingItem), raw };
3663
3799
  }
3664
3800
  /**
3665
3801
  * Look up a player's linked wallet identities (SERVER-only, game-secret). Game-scoped:
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 CurrencyPurchaseQuoteInput, ap as CurrencyPurchaseQuote, aq as ConfirmPaymentResult, ar as OrderDetailsResult, as as SteamPacksQuery, at as SteamPacksResult, au as SteamInitPurchaseInput, av as SteamInitPurchaseResult, aw as SteamFinalizeInput, ax as SteamFinalizeResult, ay as PurchaseItemInput, az as PurchaseItemResult, aA as ItemHistoryQuery, aB as ItemHistoryResult, aC as ItemOrderQuery, aD as PlayerBalanceQuery, aE as PlayerBalanceResult, aF as InboundPendingQuery, aG as InboundPendingResult, aH as LinkedIdentitiesQuery, aI as LinkedIdentitiesResult, aJ as SmsVerifyResult, aK as ClaimTransferInput, aL as ClaimResult, aM as ClaimCurrencyInput, aN as TransactionStatusResult, aO as GuardianApprovalStatusResult, aP as ServerDestinationsQuery, k as DestinationsResult, aQ as PhoneShareContact, aR as PhoneShareInitiateResult, aS as PhoneShareApproveInput, aT as PhoneShareApproveResult, aU as PhoneShareStatusResult, aV as BeginDeviceApprovalInput, aW as DeviceApprovalGrant, aX as PollDeviceApprovalInput, aY as DeviceApprovalPollResult, aZ as ConfirmDeviceEnrollmentInput, a_ as ConfirmDeviceEnrollmentResult, a$ as ApproveWithDeviceCodeInput, b0 as DeviceApprovalSettleResult, b1 as CompleteDeviceApprovalInput, b2 as CompleteDeviceApprovalResult } from './types-BnnVi5ws.cjs';
2
- export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-BnnVi5ws.cjs';
1
+ import { I as InvoError, H as Http, T as AuthHeader, U as CardSetupSessionInput, g as CallOptions, X as CardSetupSessionResult, Y as CardSetupInput, Z as CardSetupResult, _ as CardSetupConfirmInput, $ as CardSetupConfirmResult, a0 as PlayerCardsResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformOrderStatusResult, a4 as PlatformRefundInput, a5 as PlatformRefundResult, a6 as CreateSubscriptionInput, a7 as SubscriptionResult, a8 as GetSubscriptionOptions, a9 as GetSubscriptionResult, aa as ListSubscriptionsOptions, ab as SubscriptionListResult, ac as CancelSubscriptionOptions, ad as CancelResult, ae as ChangeAmountResult, af as SetPaymentMethodInput, ag as SetPaymentMethodResult, ah as RefundSubscriptionInput, ai as RefundResult, aj as SteamSubscriptionInitInput, ak as SteamInitResult, al as SteamFinalizeSubscriptionResult, am as SandboxClockResult, an as SandboxFailureOutcome, ao as SandboxForceFailureOptions, ap as SandboxForceAuthChallengeOptions, aq as ServerConfig, ar as PlayerToken, as as InitiateSendInput, at as InitiateResult, au as InitiateTransferInput, av as CreateCheckoutInput, aw as CreateCheckoutResult, ax as PurchaseInput, ay as PurchaseResult, az as CurrencyPurchaseQuoteInput, aA as CurrencyPurchaseQuote, aB as ConfirmPaymentResult, aC as OrderDetailsResult, aD as SteamPacksQuery, aE as SteamPacksResult, aF as SteamInitPurchaseInput, aG as SteamInitPurchaseResult, aH as SteamFinalizeInput, aI as SteamFinalizeResult, aJ as PurchaseItemInput, aK as PurchaseItemResult, aL as ItemHistoryQuery, aM as ItemHistoryResult, aN as ItemOrderQuery, aO as PlayerBalanceQuery, aP as PlayerBalanceResult, l as LoyaltyCardsResult, aQ as InboundPendingQuery, aR as InboundPendingResult, aS as LinkedIdentitiesQuery, aT as LinkedIdentitiesResult, aU as SmsVerifyResult, aV as ClaimTransferInput, aW as ClaimResult, aX as ClaimCurrencyInput, aY as TransactionStatusResult, aZ as GuardianApprovalStatusResult, a_ as ServerDestinationsQuery, k as DestinationsResult, a$ as PhoneShareContact, b0 as PhoneShareInitiateResult, b1 as PhoneShareApproveInput, b2 as PhoneShareApproveResult, b3 as PhoneShareStatusResult, b4 as BeginDeviceApprovalInput, b5 as DeviceApprovalGrant, b6 as PollDeviceApprovalInput, b7 as DeviceApprovalPollResult, b8 as ConfirmDeviceEnrollmentInput, b9 as ConfirmDeviceEnrollmentResult, ba as ApproveWithDeviceCodeInput, bb as DeviceApprovalSettleResult, bc as CompleteDeviceApprovalInput, bd as CompleteDeviceApprovalResult } from './types-BwgkJoM6.cjs';
2
+ export { be as CardSetupStatus, bf as CheckoutWarning, bg as CurrencyBalance, bh as CurrencyPurchaseQuoteBreakdown, t as DestinationGame, bi as DeviceApprovalChannel, bj as DeviceApprovalEnrollment, bk as DeviceApprovalFlow, bl as DeviceApprovalPollStatus, bm as DeviceEnrollmentDecision, bn as DeviceEnrollmentRespond, bo as FeeTakenFrom, bp as FirstCharge, bq as FirstChargeStatus, br as FundingSource, bs as InboundPendingItem, u as InvoErrorInfo, v as InvoHooks, w as InvoRequestInfo, x as InvoResponseInfo, bt as LinkedIdentityEmail, y as LoyaltyCard, z as LoyaltyCardReward, F as LoyaltyCardStep, G as LoyaltyRewardState, J as LoyaltyStepProgress, K as LoyaltyStepState, bu as MinPurchaseWarning, bv as PlatformPurchaseStatus, S as Rail, bw as RefundInitiation, bx as RefundPendingApproval, by as RefundProcessingFeeBasis, bz as RefundReceipt, bA as RefundRevenueShareAttribution, bB as RefundWarning, bC as SandboxClockState, bD as SavedCard, bE as SteamPack, bF as SteamUserSession, bG as Subscription, bH as SubscriptionBaseInput, bI as SubscriptionConsent, bJ as SubscriptionConsentInput, bK as SubscriptionFundingRail, bL as SubscriptionInterval, bM as SubscriptionRevenueShare, bN as SubscriptionRevenueShareInput, bO as SubscriptionStatus, bP as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bQ as isRefundPendingApproval } from './types-BwgkJoM6.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.17.0";
9
+ declare const SDK_VERSION = "3.20.0";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -112,13 +112,26 @@ interface PurchaseEventData {
112
112
  */
113
113
  developer_revenue_reversed_usd?: string | null;
114
114
  /**
115
- * Additive (2026-09-27), on a lost subscription purchase.disputed: the card processor fee
116
- * charged to you, the same figure a refund of that period charges, USD decimal string.
117
- * `"0.00"` when the chargeback guarantee covered it and on a charge made before the 2026-09
118
- * pricing. `null` where it does not apply (for example a Platform Commerce dispute, where the
119
- * card fee simply stays charged to you as on a refund). Absent on coin purchase disputes.
115
+ * Additive (2026-09-27), on a lost subscription purchase.disputed. Since 2026-09-28
116
+ * (D-PRICE-012) always `"0.00"`: a lost dispute charges INVO's card fee instead
117
+ * (`card_fee_charged_to_partner_usd`), not a separate processor fee. `null` where it does not
118
+ * apply (for example a Platform Commerce dispute). Absent on coin purchase disputes.
120
119
  */
121
120
  processing_fee_usd?: string | null;
121
+ /**
122
+ * Additive (2026-09-28, D-PRICE-012), on a lost Platform Commerce or subscription
123
+ * purchase.disputed: INVO's card fee on the lost amount, charged to you, USD decimal string.
124
+ * A lost dispute not covered by the chargeback guarantee costs you exactly what a refund of
125
+ * the same charge does, on every charge. `"0.00"` when the guarantee covered it; `null` where
126
+ * it does not apply (including a settlement replay). Absent on coin purchase disputes.
127
+ */
128
+ card_fee_charged_to_partner_usd?: string | null;
129
+ /**
130
+ * Additive (2026-09-28, D-PRICE-012), same events: your whole debit for the lost dispute,
131
+ * `developer_revenue_reversed_usd` plus `card_fee_charged_to_partner_usd`. `"0.00"` when the
132
+ * guarantee covered it; `null` where it does not apply.
133
+ */
134
+ partner_debited_usd?: string | null;
122
135
  /** On a lost subscription purchase.disputed: the subscription and period it concerns. */
123
136
  subscription_id?: string | null;
124
137
  period_seq?: number | null;
@@ -528,21 +541,40 @@ interface SubscriptionRefundDetail {
528
541
  partner_revenue_reversed_usd: string;
529
542
  /** "full" | "prorata". */
530
543
  partner_revenue_reversal_mode: string;
531
- /** Additive (2026-09-17). The card processor fee you bear on a card refund; `"0.00"` on a coin refund. */
544
+ /**
545
+ * Additive (2026-09-17). Since 2026-09-28 (D-PRICE-012) always `"0.00"`: a card refund charges
546
+ * INVO's card fee (`card_fee_charged_to_partner_usd`), not a separate processor fee. Older
547
+ * events carried the processor fee here.
548
+ */
532
549
  processing_fee_usd?: string;
533
- /** Additive (2026-09-17). "actual" | "estimated" | "none". */
550
+ /** Additive (2026-09-17). "actual" | "estimated" | "none"; `"none"` since 2026-09-28. */
534
551
  processing_fee_basis?: string;
535
552
  /** Additive (2026-09-17). Always "partner". */
536
553
  processing_fee_borne_by?: string;
537
- /** Additive (2026-09-17). Revenue reversed plus the processor fee: everything this refund took from your revenue. */
554
+ /**
555
+ * Additive (2026-09-17). Everything this refund took from your revenue; since 2026-09-28 the
556
+ * same value as `partner_debited_usd`.
557
+ */
538
558
  partner_total_reversed_usd?: string;
559
+ /**
560
+ * Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you
561
+ * (the card fee is not returned on a refund). `"0.00"` on a coin refund. Absent on older events.
562
+ */
563
+ card_fee_charged_to_partner_usd?: string;
564
+ /**
565
+ * Additive (2026-09-28, D-PRICE-012). Your whole debit: `partner_revenue_reversed_usd` plus
566
+ * `card_fee_charged_to_partner_usd`, the refunded price before tax on a card refund. Absent on
567
+ * older events; read `partner_total_reversed_usd` there.
568
+ */
569
+ partner_debited_usd?: string;
539
570
  [key: string]: unknown;
540
571
  }
541
572
  /**
542
573
  * `subscription.refunded`: its own shape. Your revenue for the refunded portion is
543
574
  * reversed (`refund.partner_revenue_reversed_usd`); INVO's fee is retained; on a card refund
544
- * you also bear the processor fee (`refund.processing_fee_usd`). "What did I earn" subtracts
545
- * `refund.partner_total_reversed_usd` (older events without it: `partner_revenue_reversed_usd`).
575
+ * you bear the whole refunded amount, INVO's card fee included (`refund.card_fee_charged_to_partner_usd`,
576
+ * since 2026-09-28). "What did I earn" subtracts `refund.partner_debited_usd` (older events:
577
+ * `refund.partner_total_reversed_usd`, then `partner_revenue_reversed_usd`).
546
578
  * A FULL refund cancels the subscription (`subscription_canceled: true`), and a
547
579
  * `subscription.canceled` with `cancel_cause: "full_refund"` is sent with it (sent together and may arrive in any order).
548
580
  * A partial one does not.
@@ -912,7 +944,9 @@ declare class SubscriptionsServer {
912
944
  * and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
913
945
  * credits coins. Your revenue is reversed for the refunded portion
914
946
  * (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
915
- * processor fee (`processingFeeUsd`; `partnerTotalReversedUsd` is the sum). **A full refund
947
+ * whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
948
+ * `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
949
+ * `processingFeeUsd` reads `"0.00"`). **A full refund
916
950
  * cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
917
951
  * with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
918
952
  * order); a partial one does not. INVO emails the member.
@@ -1374,6 +1408,22 @@ declare class InvoServer {
1374
1408
  * client-side read, or `playerEmail` here server-side.
1375
1409
  */
1376
1410
  getPlayerBalance(query: PlayerBalanceQuery, opts?: CallOptions): Promise<PlayerBalanceResult>;
1411
+ /**
1412
+ * One player's loyalty cards, read by your SERVER with the game secret: the same cards
1413
+ * the player sees through `InvoClient.getMyRewards()`, for the player with this email in
1414
+ * your game. Each step carries `state` and `progress` (`{ current, target }`, or `null`
1415
+ * when the number could not be read this time: render `state` alone then). Rewards carry
1416
+ * their masked code only; a code is never returned here.
1417
+ *
1418
+ * Refusals (all `InvoError`): a blank email throws `INVALID_INPUT` before the network;
1419
+ * `400 INVALID_PLAYER_EMAIL` (`err.isInvalidPlayerEmail`), `401 INVALID_GAME_SECRET` for a missing or wrong key, or
1420
+ * a per-channel key (this read takes the game's server secret only), `404 PLAYER_NOT_FOUND`
1421
+ * (`err.isPlayerNotFound`: no player with this email in this game), `429` (back off;
1422
+ * `err.retryAfter`). Also `409 NO_TENANT` (the game is not set up for loyalty), `503`
1423
+ * (temporarily unavailable) and `502` / `504` (the loyalty service could not be reached or
1424
+ * timed out): retry later. A GET, so transient failures are retried automatically.
1425
+ */
1426
+ getPlayerRewards(playerEmail: string, opts?: CallOptions): Promise<LoyaltyCardsResult>;
1377
1427
  /**
1378
1428
  * List LIVE, unclaimed inbound sends/transfers addressed to a player at YOUR game —
1379
1429
  * the source of truth for a "you have X to collect" badge. Pass the player's email
@@ -1585,4 +1635,4 @@ declare class InvoServer {
1585
1635
  private toInitiateResult;
1586
1636
  }
1587
1637
 
1588
- 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, OrderDetailsResult, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, 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, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
1638
+ 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, OrderDetailsResult, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, 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, 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, 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 CurrencyPurchaseQuoteInput, ap as CurrencyPurchaseQuote, aq as ConfirmPaymentResult, ar as OrderDetailsResult, as as SteamPacksQuery, at as SteamPacksResult, au as SteamInitPurchaseInput, av as SteamInitPurchaseResult, aw as SteamFinalizeInput, ax as SteamFinalizeResult, ay as PurchaseItemInput, az as PurchaseItemResult, aA as ItemHistoryQuery, aB as ItemHistoryResult, aC as ItemOrderQuery, aD as PlayerBalanceQuery, aE as PlayerBalanceResult, aF as InboundPendingQuery, aG as InboundPendingResult, aH as LinkedIdentitiesQuery, aI as LinkedIdentitiesResult, aJ as SmsVerifyResult, aK as ClaimTransferInput, aL as ClaimResult, aM as ClaimCurrencyInput, aN as TransactionStatusResult, aO as GuardianApprovalStatusResult, aP as ServerDestinationsQuery, k as DestinationsResult, aQ as PhoneShareContact, aR as PhoneShareInitiateResult, aS as PhoneShareApproveInput, aT as PhoneShareApproveResult, aU as PhoneShareStatusResult, aV as BeginDeviceApprovalInput, aW as DeviceApprovalGrant, aX as PollDeviceApprovalInput, aY as DeviceApprovalPollResult, aZ as ConfirmDeviceEnrollmentInput, a_ as ConfirmDeviceEnrollmentResult, a$ as ApproveWithDeviceCodeInput, b0 as DeviceApprovalSettleResult, b1 as CompleteDeviceApprovalInput, b2 as CompleteDeviceApprovalResult } from './types-BnnVi5ws.js';
2
- export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-BnnVi5ws.js';
1
+ import { I as InvoError, H as Http, T as AuthHeader, U as CardSetupSessionInput, g as CallOptions, X as CardSetupSessionResult, Y as CardSetupInput, Z as CardSetupResult, _ as CardSetupConfirmInput, $ as CardSetupConfirmResult, a0 as PlayerCardsResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformOrderStatusResult, a4 as PlatformRefundInput, a5 as PlatformRefundResult, a6 as CreateSubscriptionInput, a7 as SubscriptionResult, a8 as GetSubscriptionOptions, a9 as GetSubscriptionResult, aa as ListSubscriptionsOptions, ab as SubscriptionListResult, ac as CancelSubscriptionOptions, ad as CancelResult, ae as ChangeAmountResult, af as SetPaymentMethodInput, ag as SetPaymentMethodResult, ah as RefundSubscriptionInput, ai as RefundResult, aj as SteamSubscriptionInitInput, ak as SteamInitResult, al as SteamFinalizeSubscriptionResult, am as SandboxClockResult, an as SandboxFailureOutcome, ao as SandboxForceFailureOptions, ap as SandboxForceAuthChallengeOptions, aq as ServerConfig, ar as PlayerToken, as as InitiateSendInput, at as InitiateResult, au as InitiateTransferInput, av as CreateCheckoutInput, aw as CreateCheckoutResult, ax as PurchaseInput, ay as PurchaseResult, az as CurrencyPurchaseQuoteInput, aA as CurrencyPurchaseQuote, aB as ConfirmPaymentResult, aC as OrderDetailsResult, aD as SteamPacksQuery, aE as SteamPacksResult, aF as SteamInitPurchaseInput, aG as SteamInitPurchaseResult, aH as SteamFinalizeInput, aI as SteamFinalizeResult, aJ as PurchaseItemInput, aK as PurchaseItemResult, aL as ItemHistoryQuery, aM as ItemHistoryResult, aN as ItemOrderQuery, aO as PlayerBalanceQuery, aP as PlayerBalanceResult, l as LoyaltyCardsResult, aQ as InboundPendingQuery, aR as InboundPendingResult, aS as LinkedIdentitiesQuery, aT as LinkedIdentitiesResult, aU as SmsVerifyResult, aV as ClaimTransferInput, aW as ClaimResult, aX as ClaimCurrencyInput, aY as TransactionStatusResult, aZ as GuardianApprovalStatusResult, a_ as ServerDestinationsQuery, k as DestinationsResult, a$ as PhoneShareContact, b0 as PhoneShareInitiateResult, b1 as PhoneShareApproveInput, b2 as PhoneShareApproveResult, b3 as PhoneShareStatusResult, b4 as BeginDeviceApprovalInput, b5 as DeviceApprovalGrant, b6 as PollDeviceApprovalInput, b7 as DeviceApprovalPollResult, b8 as ConfirmDeviceEnrollmentInput, b9 as ConfirmDeviceEnrollmentResult, ba as ApproveWithDeviceCodeInput, bb as DeviceApprovalSettleResult, bc as CompleteDeviceApprovalInput, bd as CompleteDeviceApprovalResult } from './types-BwgkJoM6.js';
2
+ export { be as CardSetupStatus, bf as CheckoutWarning, bg as CurrencyBalance, bh as CurrencyPurchaseQuoteBreakdown, t as DestinationGame, bi as DeviceApprovalChannel, bj as DeviceApprovalEnrollment, bk as DeviceApprovalFlow, bl as DeviceApprovalPollStatus, bm as DeviceEnrollmentDecision, bn as DeviceEnrollmentRespond, bo as FeeTakenFrom, bp as FirstCharge, bq as FirstChargeStatus, br as FundingSource, bs as InboundPendingItem, u as InvoErrorInfo, v as InvoHooks, w as InvoRequestInfo, x as InvoResponseInfo, bt as LinkedIdentityEmail, y as LoyaltyCard, z as LoyaltyCardReward, F as LoyaltyCardStep, G as LoyaltyRewardState, J as LoyaltyStepProgress, K as LoyaltyStepState, bu as MinPurchaseWarning, bv as PlatformPurchaseStatus, S as Rail, bw as RefundInitiation, bx as RefundPendingApproval, by as RefundProcessingFeeBasis, bz as RefundReceipt, bA as RefundRevenueShareAttribution, bB as RefundWarning, bC as SandboxClockState, bD as SavedCard, bE as SteamPack, bF as SteamUserSession, bG as Subscription, bH as SubscriptionBaseInput, bI as SubscriptionConsent, bJ as SubscriptionConsentInput, bK as SubscriptionFundingRail, bL as SubscriptionInterval, bM as SubscriptionRevenueShare, bN as SubscriptionRevenueShareInput, bO as SubscriptionStatus, bP as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bQ as isRefundPendingApproval } from './types-BwgkJoM6.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.17.0";
9
+ declare const SDK_VERSION = "3.20.0";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -112,13 +112,26 @@ interface PurchaseEventData {
112
112
  */
113
113
  developer_revenue_reversed_usd?: string | null;
114
114
  /**
115
- * Additive (2026-09-27), on a lost subscription purchase.disputed: the card processor fee
116
- * charged to you, the same figure a refund of that period charges, USD decimal string.
117
- * `"0.00"` when the chargeback guarantee covered it and on a charge made before the 2026-09
118
- * pricing. `null` where it does not apply (for example a Platform Commerce dispute, where the
119
- * card fee simply stays charged to you as on a refund). Absent on coin purchase disputes.
115
+ * Additive (2026-09-27), on a lost subscription purchase.disputed. Since 2026-09-28
116
+ * (D-PRICE-012) always `"0.00"`: a lost dispute charges INVO's card fee instead
117
+ * (`card_fee_charged_to_partner_usd`), not a separate processor fee. `null` where it does not
118
+ * apply (for example a Platform Commerce dispute). Absent on coin purchase disputes.
120
119
  */
121
120
  processing_fee_usd?: string | null;
121
+ /**
122
+ * Additive (2026-09-28, D-PRICE-012), on a lost Platform Commerce or subscription
123
+ * purchase.disputed: INVO's card fee on the lost amount, charged to you, USD decimal string.
124
+ * A lost dispute not covered by the chargeback guarantee costs you exactly what a refund of
125
+ * the same charge does, on every charge. `"0.00"` when the guarantee covered it; `null` where
126
+ * it does not apply (including a settlement replay). Absent on coin purchase disputes.
127
+ */
128
+ card_fee_charged_to_partner_usd?: string | null;
129
+ /**
130
+ * Additive (2026-09-28, D-PRICE-012), same events: your whole debit for the lost dispute,
131
+ * `developer_revenue_reversed_usd` plus `card_fee_charged_to_partner_usd`. `"0.00"` when the
132
+ * guarantee covered it; `null` where it does not apply.
133
+ */
134
+ partner_debited_usd?: string | null;
122
135
  /** On a lost subscription purchase.disputed: the subscription and period it concerns. */
123
136
  subscription_id?: string | null;
124
137
  period_seq?: number | null;
@@ -528,21 +541,40 @@ interface SubscriptionRefundDetail {
528
541
  partner_revenue_reversed_usd: string;
529
542
  /** "full" | "prorata". */
530
543
  partner_revenue_reversal_mode: string;
531
- /** Additive (2026-09-17). The card processor fee you bear on a card refund; `"0.00"` on a coin refund. */
544
+ /**
545
+ * Additive (2026-09-17). Since 2026-09-28 (D-PRICE-012) always `"0.00"`: a card refund charges
546
+ * INVO's card fee (`card_fee_charged_to_partner_usd`), not a separate processor fee. Older
547
+ * events carried the processor fee here.
548
+ */
532
549
  processing_fee_usd?: string;
533
- /** Additive (2026-09-17). "actual" | "estimated" | "none". */
550
+ /** Additive (2026-09-17). "actual" | "estimated" | "none"; `"none"` since 2026-09-28. */
534
551
  processing_fee_basis?: string;
535
552
  /** Additive (2026-09-17). Always "partner". */
536
553
  processing_fee_borne_by?: string;
537
- /** Additive (2026-09-17). Revenue reversed plus the processor fee: everything this refund took from your revenue. */
554
+ /**
555
+ * Additive (2026-09-17). Everything this refund took from your revenue; since 2026-09-28 the
556
+ * same value as `partner_debited_usd`.
557
+ */
538
558
  partner_total_reversed_usd?: string;
559
+ /**
560
+ * Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you
561
+ * (the card fee is not returned on a refund). `"0.00"` on a coin refund. Absent on older events.
562
+ */
563
+ card_fee_charged_to_partner_usd?: string;
564
+ /**
565
+ * Additive (2026-09-28, D-PRICE-012). Your whole debit: `partner_revenue_reversed_usd` plus
566
+ * `card_fee_charged_to_partner_usd`, the refunded price before tax on a card refund. Absent on
567
+ * older events; read `partner_total_reversed_usd` there.
568
+ */
569
+ partner_debited_usd?: string;
539
570
  [key: string]: unknown;
540
571
  }
541
572
  /**
542
573
  * `subscription.refunded`: its own shape. Your revenue for the refunded portion is
543
574
  * reversed (`refund.partner_revenue_reversed_usd`); INVO's fee is retained; on a card refund
544
- * you also bear the processor fee (`refund.processing_fee_usd`). "What did I earn" subtracts
545
- * `refund.partner_total_reversed_usd` (older events without it: `partner_revenue_reversed_usd`).
575
+ * you bear the whole refunded amount, INVO's card fee included (`refund.card_fee_charged_to_partner_usd`,
576
+ * since 2026-09-28). "What did I earn" subtracts `refund.partner_debited_usd` (older events:
577
+ * `refund.partner_total_reversed_usd`, then `partner_revenue_reversed_usd`).
546
578
  * A FULL refund cancels the subscription (`subscription_canceled: true`), and a
547
579
  * `subscription.canceled` with `cancel_cause: "full_refund"` is sent with it (sent together and may arrive in any order).
548
580
  * A partial one does not.
@@ -912,7 +944,9 @@ declare class SubscriptionsServer {
912
944
  * and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
913
945
  * credits coins. Your revenue is reversed for the refunded portion
914
946
  * (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
915
- * processor fee (`processingFeeUsd`; `partnerTotalReversedUsd` is the sum). **A full refund
947
+ * whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
948
+ * `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
949
+ * `processingFeeUsd` reads `"0.00"`). **A full refund
916
950
  * cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
917
951
  * with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
918
952
  * order); a partial one does not. INVO emails the member.
@@ -1374,6 +1408,22 @@ declare class InvoServer {
1374
1408
  * client-side read, or `playerEmail` here server-side.
1375
1409
  */
1376
1410
  getPlayerBalance(query: PlayerBalanceQuery, opts?: CallOptions): Promise<PlayerBalanceResult>;
1411
+ /**
1412
+ * One player's loyalty cards, read by your SERVER with the game secret: the same cards
1413
+ * the player sees through `InvoClient.getMyRewards()`, for the player with this email in
1414
+ * your game. Each step carries `state` and `progress` (`{ current, target }`, or `null`
1415
+ * when the number could not be read this time: render `state` alone then). Rewards carry
1416
+ * their masked code only; a code is never returned here.
1417
+ *
1418
+ * Refusals (all `InvoError`): a blank email throws `INVALID_INPUT` before the network;
1419
+ * `400 INVALID_PLAYER_EMAIL` (`err.isInvalidPlayerEmail`), `401 INVALID_GAME_SECRET` for a missing or wrong key, or
1420
+ * a per-channel key (this read takes the game's server secret only), `404 PLAYER_NOT_FOUND`
1421
+ * (`err.isPlayerNotFound`: no player with this email in this game), `429` (back off;
1422
+ * `err.retryAfter`). Also `409 NO_TENANT` (the game is not set up for loyalty), `503`
1423
+ * (temporarily unavailable) and `502` / `504` (the loyalty service could not be reached or
1424
+ * timed out): retry later. A GET, so transient failures are retried automatically.
1425
+ */
1426
+ getPlayerRewards(playerEmail: string, opts?: CallOptions): Promise<LoyaltyCardsResult>;
1377
1427
  /**
1378
1428
  * List LIVE, unclaimed inbound sends/transfers addressed to a player at YOUR game —
1379
1429
  * the source of truth for a "you have X to collect" badge. Pass the player's email
@@ -1585,4 +1635,4 @@ declare class InvoServer {
1585
1635
  private toInitiateResult;
1586
1636
  }
1587
1637
 
1588
- 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, OrderDetailsResult, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, 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, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
1638
+ 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, OrderDetailsResult, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, 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, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };