@invonetwork/web-sdk 3.12.0 → 3.13.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-CT0Ksonp.js';
2
- export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-CT0Ksonp.js';
1
+ import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-DUo5NAzj.js';
2
+ export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-DUo5NAzj.js';
3
3
 
4
4
  /** The four device-approval flows (`begin.flow`). */
5
5
  type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-5BMM5ZTW.js';
2
- export { InvoError } from './chunk-5BMM5ZTW.js';
1
+ import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-NJIZMM4H.js';
2
+ export { InvoError } from './chunk-NJIZMM4H.js';
3
3
 
4
4
  // src/shared/webauthn.ts
5
5
  function malformedOptions(field) {
package/dist/server.cjs CHANGED
@@ -385,6 +385,34 @@ var InvoError = class _InvoError extends Error {
385
385
  get isAboveCardMaximum() {
386
386
  return this.code === "ABOVE_CARD_MAXIMUM";
387
387
  }
388
+ // ---- Coin purchase: INVO's card fee (2026-09-23) ----
389
+ /**
390
+ * True when an UNACKNOWLEDGED `purchaseCurrency` was refused because the amount is too
391
+ * small to carry INVO's card fee (`AMOUNT_BELOW_FEE`, 400). Nothing was charged. Send a
392
+ * larger amount, or quote it with `quoteCurrencyPurchase` and send `acknowledgedTotalUsd`
393
+ * so the fee is added on top.
394
+ */
395
+ get isAmountBelowFee() {
396
+ return this.code === "AMOUNT_BELOW_FEE";
397
+ }
398
+ /**
399
+ * True when `purchaseCurrency` was sent an `acknowledgedTotalUsd` that is not the total
400
+ * INVO would charge now (`QUOTE_STALE`, 409). Nothing was charged. Quote again, show the
401
+ * player the new total, and retry with it. {@link expectedTotalUsd} carries INVO's figure.
402
+ */
403
+ get isQuoteStale() {
404
+ return this.code === "QUOTE_STALE";
405
+ }
406
+ /** On `QUOTE_STALE`: the total INVO would charge (`expected_total_usd`), decimal string. */
407
+ get expectedTotalUsd() {
408
+ const v = this.bodyObject()["expected_total_usd"];
409
+ return typeof v === "string" && v ? v : void 0;
410
+ }
411
+ /** On `QUOTE_STALE`: the total you sent, as INVO read it (`acknowledged_total_usd`). */
412
+ get acknowledgedTotalUsd() {
413
+ const v = this.bodyObject()["acknowledged_total_usd"];
414
+ return typeof v === "string" && v ? v : void 0;
415
+ }
388
416
  /**
389
417
  * True if a Platform Commerce refund targeted an order that was already refunded
390
418
  * (409). Idempotent outcome — the original refund did happen, so treat this as
@@ -501,7 +529,8 @@ var InvoError = class _InvoError extends Error {
501
529
  * True when the same `clientRequestId` was replayed for the same player and item but
502
530
  * with DIFFERENT material terms (`IDEMPOTENT_REPLAY_MISMATCH`, 409). See
503
531
  * `mismatchedFields` (any of `amount_usd`, `interval`, `interval_count`, `wallet_only`,
504
- * `funding_rail`). To change terms use `changeAmount` / `setPaymentMethod`; to create a
532
+ * `funding_rail`, `trial_amount_usd`; for the last an omitted value counts, so a replay
533
+ * without it against a paid trial is a mismatch). To change terms use `changeAmount` / `setPaymentMethod`; to create a
505
534
  * new subscription use a new key.
506
535
  */
507
536
  get isIdempotentReplayMismatch() {
@@ -512,6 +541,46 @@ var InvoError = class _InvoError extends Error {
512
541
  const v = this.bodyObject()["mismatched_fields"];
513
542
  return Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
514
543
  }
544
+ // ---- Subscriptions: paid trials (2026-09-23) ----
545
+ /**
546
+ * True on `PAYMENT_METHOD_REQUIRED` (400). From `subscriptions.create`: a paid trial
547
+ * (`trialAmountUsd`) with no usable saved card; nothing was created. Save the member's card
548
+ * (`cards.createSetupSession`), then subscribe again. From `setPaymentMethod`: no
549
+ * `playerCardId` was sent.
550
+ */
551
+ get isPaymentMethodRequired() {
552
+ return this.code === "PAYMENT_METHOD_REQUIRED";
553
+ }
554
+ /**
555
+ * True when `trialAmountUsd` is not a usable trial price (`TRIAL_AMOUNT_INVALID`, 400): it
556
+ * must be a decimal of at least `0.50` (the card minimum) and less than `amountUsd`. The
557
+ * message names the rule.
558
+ */
559
+ get isTrialAmountInvalid() {
560
+ return this.code === "TRIAL_AMOUNT_INVALID";
561
+ }
562
+ /** True when `trialAmountUsd` was sent without `trialDays` or `trialEnd` (`TRIAL_AMOUNT_REQUIRES_TRIAL`, 400). */
563
+ get isTrialAmountRequiresTrial() {
564
+ return this.code === "TRIAL_AMOUNT_REQUIRES_TRIAL";
565
+ }
566
+ /**
567
+ * True when a paid trial was asked for where it cannot be charged
568
+ * (`TRIAL_AMOUNT_NOT_SUPPORTED_FOR_FUNDING`, 400): with `walletOnly: true`, or on the Steam
569
+ * rail. Paid trials are for card subscriptions only.
570
+ */
571
+ get isTrialAmountNotSupportedForFunding() {
572
+ return this.code === "TRIAL_AMOUNT_NOT_SUPPORTED_FOR_FUNDING";
573
+ }
574
+ /**
575
+ * True when one of the disclosed paid-trial consent fields is malformed (400):
576
+ * `CONSENT_DISCLOSED_TRIAL_AMOUNT_INVALID`, `CONSENT_DISCLOSED_TRIAL_DAYS_INVALID` (not an
577
+ * integer 1 to 365) or `CONSENT_DISCLOSED_TRIAL_END_INVALID` (not ISO 8601). `err.code`
578
+ * says which. A disclosed value that is well formed but disagrees with the trial is not
579
+ * refused; INVO records the disagreement.
580
+ */
581
+ get isConsentDisclosedTrialInvalid() {
582
+ return this.code === "CONSENT_DISCLOSED_TRIAL_AMOUNT_INVALID" || this.code === "CONSENT_DISCLOSED_TRIAL_DAYS_INVALID" || this.code === "CONSENT_DISCLOSED_TRIAL_END_INVALID";
583
+ }
515
584
  /**
516
585
  * True when `changeAmount` tried to RAISE the price of a Steam subscription
517
586
  * (`STEAM_REAUTHORIZATION_REQUIRED`, 409). The member consented to a ceiling; start a
@@ -988,7 +1057,7 @@ function toDestinationsResult(raw, direction) {
988
1057
  }
989
1058
 
990
1059
  // src/version.ts
991
- var SDK_VERSION = "3.12.0";
1060
+ var SDK_VERSION = "3.13.0";
992
1061
 
993
1062
  // src/shared/types.ts
994
1063
  function isRefundPendingApproval(r) {
@@ -1162,6 +1231,56 @@ async function hmacHexSubtle(secret, message) {
1162
1231
  var DEFAULT_UA = `invonetwork-web-sdk/${SDK_VERSION} (+https://invo.network)`;
1163
1232
  var MAX_USD_AMOUNT = 999999.99;
1164
1233
  var MAX_ITEM_PRICE = 999999.99;
1234
+ var MAX_ACKNOWLEDGED_TOTAL_USD = 9999999999e-2;
1235
+ function assertAcknowledgedTotal(value) {
1236
+ parseMoney(value, MAX_ACKNOWLEDGED_TOTAL_USD, "acknowledgedTotalUsd");
1237
+ }
1238
+ function optionalDecimalString(v) {
1239
+ return v == null ? void 0 : String(v);
1240
+ }
1241
+ function toQuoteBreakdown(row) {
1242
+ const r = row && typeof row === "object" ? row : {};
1243
+ const nullable = (v) => v == null ? null : String(v);
1244
+ return {
1245
+ subtotalUsd: String(r["subtotal_usd"] ?? ""),
1246
+ taxUsd: String(r["tax_usd"] ?? "0.00"),
1247
+ taxTreatment: nullable(r["tax_treatment"]),
1248
+ taxNote: String(r["tax_note"] ?? ""),
1249
+ taxRatePct: nullable(r["tax_rate_pct"]),
1250
+ taxJurisdiction: nullable(r["tax_jurisdiction"]),
1251
+ processingFeeUsd: String(r["processing_fee_usd"] ?? ""),
1252
+ processingFeeNote: String(r["processing_fee_note"] ?? ""),
1253
+ totalUsd: String(r["total_usd"] ?? ""),
1254
+ coins: String(r["coins"] ?? ""),
1255
+ currencyName: String(r["currency_name"] ?? ""),
1256
+ raw: r
1257
+ };
1258
+ }
1259
+ function toUnacknowledgedOutcome(row) {
1260
+ if (!row || typeof row !== "object") return null;
1261
+ const r = row;
1262
+ return {
1263
+ chargeTotalUsd: String(r["charge_total_usd"] ?? ""),
1264
+ processingFeeUsd: String(r["processing_fee_usd"] ?? ""),
1265
+ coins: String(r["coins"] ?? ""),
1266
+ feeTakenFrom: String(r["fee_taken_from"] ?? "coins")
1267
+ };
1268
+ }
1269
+ function toCurrencyPurchaseQuote(raw) {
1270
+ const breakdown = toQuoteBreakdown(raw["breakdown"]);
1271
+ return {
1272
+ totalUsd: requireField(raw["total_usd"], "total_usd", raw),
1273
+ amountCents: Number(raw["amount_cents"] ?? 0),
1274
+ // Top-level since 2026-09-23; the breakdown has always carried the same figures.
1275
+ subtotalUsd: String(raw["subtotal_usd"] ?? breakdown.subtotalUsd),
1276
+ processingFeeUsd: String(raw["processing_fee_usd"] ?? breakdown.processingFeeUsd),
1277
+ coins: String(raw["coins"] ?? breakdown.coins),
1278
+ currencyName: String(raw["currency_name"] ?? breakdown.currencyName),
1279
+ breakdown,
1280
+ ifUnacknowledged: toUnacknowledgedOutcome(raw["if_unacknowledged"]),
1281
+ raw
1282
+ };
1283
+ }
1165
1284
  function invalidInput(label, value, why) {
1166
1285
  return new InvoError({
1167
1286
  message: `${label} ${why} (got ${JSON.stringify(value)}).`,
@@ -1779,6 +1898,7 @@ function toSubscription(row) {
1779
1898
  nextChargeAt: nullableString(r["next_charge_at"]),
1780
1899
  cancelAtPeriodEnd: r["cancel_at_period_end"] === true,
1781
1900
  trialEnd: nullableString(r["trial_end"]),
1901
+ trialAmountUsd: nullableString(r["trial_amount_usd"]),
1782
1902
  canceledAt: nullableString(r["canceled_at"]),
1783
1903
  endedAt: nullableString(r["ended_at"]),
1784
1904
  walletOnly: r["wallet_only"] === true,
@@ -1792,7 +1912,10 @@ function toSubscription(row) {
1792
1912
  consent_user_agent: nullableString(consent["consent_user_agent"]),
1793
1913
  disclosed_amount_usd: nullableString(consent["disclosed_amount_usd"]),
1794
1914
  disclosed_interval: nullableString(consent["disclosed_interval"]),
1795
- terms_version: nullableString(consent["terms_version"])
1915
+ terms_version: nullableString(consent["terms_version"]),
1916
+ disclosed_trial_amount_usd: nullableString(consent["disclosed_trial_amount_usd"]),
1917
+ disclosed_trial_days: typeof consent["disclosed_trial_days"] === "number" ? consent["disclosed_trial_days"] : null,
1918
+ disclosed_trial_end: nullableString(consent["disclosed_trial_end"])
1796
1919
  },
1797
1920
  createdAt: String(r["created_at"] ?? ""),
1798
1921
  updatedAt: String(r["updated_at"] ?? ""),
@@ -1804,6 +1927,8 @@ function toSubscription(row) {
1804
1927
  } : null,
1805
1928
  paidThrough: nullableString(r["paid_through"]),
1806
1929
  amountCoinsEstimate: r["amount_coins_estimate"] == null ? void 0 : String(r["amount_coins_estimate"]),
1930
+ // Present (possibly null) only on create/finalize bodies from 2026-09-23 on.
1931
+ ..."trial_amount_coins_estimate" in r ? { trialAmountCoinsEstimate: nullableString(r["trial_amount_coins_estimate"]) } : {},
1807
1932
  // `include_player` puts these two ON the object (there is no separate block).
1808
1933
  ..."player_email" in r ? { playerEmail: nullableString(r["player_email"]) } : {},
1809
1934
  ..."player_name" in r ? { playerName: nullableString(r["player_name"]) } : {},
@@ -1921,6 +2046,9 @@ function subscriptionBaseBody(input) {
1921
2046
  if (c.disclosedAmountUsd !== void 0) consent["disclosed_amount_usd"] = c.disclosedAmountUsd;
1922
2047
  if (c.disclosedInterval !== void 0) consent["disclosed_interval"] = c.disclosedInterval;
1923
2048
  if (c.termsVersion !== void 0) consent["terms_version"] = c.termsVersion;
2049
+ if (c.disclosedTrialAmountUsd !== void 0) consent["disclosed_trial_amount_usd"] = c.disclosedTrialAmountUsd;
2050
+ if (c.disclosedTrialDays !== void 0) consent["disclosed_trial_days"] = c.disclosedTrialDays;
2051
+ if (c.disclosedTrialEnd !== void 0) consent["disclosed_trial_end"] = c.disclosedTrialEnd;
1924
2052
  body["consent"] = consent;
1925
2053
  }
1926
2054
  if (input.revenueShare) {
@@ -1971,6 +2099,15 @@ var SubscriptionsServer = class {
1971
2099
  * `failureCode: "no_payment_method"`, whatever the member's balance: save a card first.
1972
2100
  * `walletOnly: true` is deprecated: it never charges a card, so such a subscription can never
1973
2101
  * be paid (`failureCode: "wallet_only"`).
2102
+ *
2103
+ * PAID TRIAL: send `trialAmountUsd` with `trialDays` or `trialEnd` (for example $1.00 for 7
2104
+ * days, then `amountUsd` monthly). Period 1 is charged the trial price inside this call, so a
2105
+ * usable saved card is required (`400 PAYMENT_METHOD_REQUIRED`, `err.isPaymentMethodRequired`),
2106
+ * `firstCharge` reports the trial charge (never `skipped_trial`), and a refused trial charge
2107
+ * ends the subscription at once (`expired`, no retry). Other refusals:
2108
+ * `err.isTrialAmountRequiresTrial`, `err.isTrialAmountNotSupportedForFunding`,
2109
+ * `err.isTrialAmountInvalid` (below $0.50, or not less than `amountUsd`),
2110
+ * `err.isConsentDisclosedTrialInvalid`.
1974
2111
  * Requires the game to be `live` (`err.isGameNotLive`).
1975
2112
  */
1976
2113
  async create(input, opts) {
@@ -1993,6 +2130,23 @@ var SubscriptionsServer = class {
1993
2130
  }
1994
2131
  body["trial_end"] = input.trialEnd;
1995
2132
  }
2133
+ if (input.trialAmountUsd !== void 0) {
2134
+ if (input.trialDays === void 0 && input.trialEnd === void 0) {
2135
+ throw new InvoError({
2136
+ message: "trialAmountUsd requires a trial: send trialDays or trialEnd with it.",
2137
+ code: "TRIAL_AMOUNT_REQUIRES_TRIAL",
2138
+ status: 0
2139
+ });
2140
+ }
2141
+ if (input.walletOnly === true) {
2142
+ throw new InvoError({
2143
+ message: "trialAmountUsd is only available on card-funded subscriptions; it cannot be combined with walletOnly: true.",
2144
+ code: "TRIAL_AMOUNT_NOT_SUPPORTED_FOR_FUNDING",
2145
+ status: 0
2146
+ });
2147
+ }
2148
+ body["trial_amount_usd"] = subscriptionMoney(input.trialAmountUsd, "trialAmountUsd");
2149
+ }
1996
2150
  if (input.walletOnly !== void 0) {
1997
2151
  if (typeof input.walletOnly !== "boolean") {
1998
2152
  throw invalidInput("walletOnly", input.walletOnly, "must be a boolean");
@@ -2212,8 +2366,9 @@ var SubscriptionsServer = class {
2212
2366
  * the stored receipt with `idempotentReplay: true` and moves nothing.
2213
2367
  *
2214
2368
  * **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
2215
- * (HTTP 202): the refund would exceed the game's daily self-serve limit ($500 per UTC day
2216
- * by default), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
2369
+ * (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
2370
+ * default never lower than the largest single subscription charge, so a single period
2371
+ * always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
2217
2372
  * outcome arrives as `subscription.refund_approved` (sent together with
2218
2373
  * `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
2219
2374
  * `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
@@ -2312,6 +2467,13 @@ var SubscriptionsServer = class {
2312
2467
  throw invalidInput("intervalCount", input.intervalCount, "must be 1 on the Steam rail (monthly and yearly only)");
2313
2468
  }
2314
2469
  const forbidden = input;
2470
+ if (forbidden["trialAmountUsd"] !== void 0) {
2471
+ throw new InvoError({
2472
+ message: "trialAmountUsd is only available on card-funded subscriptions (subscriptions.create). Steam subscriptions have no trials.",
2473
+ code: "TRIAL_AMOUNT_NOT_SUPPORTED_FOR_FUNDING",
2474
+ status: 0
2475
+ });
2476
+ }
2315
2477
  for (const k of ["trialDays", "trialEnd", "walletOnly", "playerCardId"]) {
2316
2478
  if (forbidden[k] !== void 0) {
2317
2479
  throw invalidInput(k, forbidden[k], "is not available on the Steam rail");
@@ -2781,6 +2943,18 @@ var InvoServer = class {
2781
2943
  * (run client-side 3-D Secure with clientSecret, then call confirmPayment).
2782
2944
  * - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
2783
2945
  * - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
2946
+ *
2947
+ * INVO's card fee (3.5% + $0.30, never less than the card cost). Two shapes, chosen by
2948
+ * what you send:
2949
+ * - with `acknowledgedTotalUsd` (the `totalUsd` from {@link quoteCurrencyPurchase}): the
2950
+ * card is charged that total and the coins are priced off `usdAmount`. A total that no
2951
+ * longer matches throws `409 QUOTE_STALE` (`err.isQuoteStale`); nothing was charged.
2952
+ * - without it: the card is charged exactly `usdAmount`, never more, and the fee comes out
2953
+ * of the coins. An amount too small to carry the fee throws `400 AMOUNT_BELOW_FEE`
2954
+ * (`err.isAmountBelowFee`); nothing was charged.
2955
+ *
2956
+ * A `success` result reports `processingFeeUsd`, `feeTakenFrom`, `coinsCredited` and
2957
+ * `chargeTotalUsd`.
2784
2958
  */
2785
2959
  async purchaseCurrency(input, opts) {
2786
2960
  if (typeof input.playerEmail !== "string" || !input.playerEmail.trim()) {
@@ -2806,6 +2980,10 @@ var InvoServer = class {
2806
2980
  usd_amount: input.usdAmount,
2807
2981
  purchase_reference: input.purchaseReference
2808
2982
  };
2983
+ if (input.acknowledgedTotalUsd !== void 0) {
2984
+ assertAcknowledgedTotal(input.acknowledgedTotalUsd);
2985
+ body["acknowledged_total_usd"] = input.acknowledgedTotalUsd;
2986
+ }
2809
2987
  if (input.rail) body["rail"] = input.rail;
2810
2988
  if (input.paymentMethodId) body["payment_method_id"] = input.paymentMethodId;
2811
2989
  if (input.savedCardId) body["saved_card_id"] = input.savedCardId;
@@ -2827,9 +3005,47 @@ var InvoServer = class {
2827
3005
  transactionId: raw["transaction_id"],
2828
3006
  orderId: raw["order_id"],
2829
3007
  newBalance: raw["new_balance"] ?? null,
3008
+ processingFeeUsd: optionalDecimalString(raw["processing_fee_usd"]),
3009
+ feeTakenFrom: optionalDecimalString(raw["fee_taken_from"]),
3010
+ coinsCredited: optionalDecimalString(raw["coins_credited"]),
3011
+ chargeTotalUsd: optionalDecimalString(raw["charge_total_usd"]),
2830
3012
  raw
2831
3013
  };
2832
3014
  }
3015
+ /**
3016
+ * What a card purchase of coins will cost, BEFORE charging for it. Moves no money and
3017
+ * creates nothing, so it is safe to call on every price render (`POST
3018
+ * /api/currency-purchases/quote`, authenticated by your game secret like the purchase).
3019
+ *
3020
+ * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price, never less than the
3021
+ * card cost. `totalUsd` is the price plus that fee (plus any tax, when you pass `country`):
3022
+ * $10.00 quotes a $10.65 total. Show the player `totalUsd`, then send the same figure back
3023
+ * as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the card is charged exactly that
3024
+ * and the player gets the coins for the full price. `ifUnacknowledged` shows the other
3025
+ * outcome: the card charged exactly `usdAmount` and the fee taken out of the coins ($10.00
3026
+ * gives 93.70 coins at the default 10 per USD), or `null` when the amount cannot carry the
3027
+ * fee.
3028
+ *
3029
+ * Refusals: `400 INVALID_INPUT` (amount missing, not above zero, or above INVO's card
3030
+ * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
3031
+ */
3032
+ async quoteCurrencyPurchase(input, opts) {
3033
+ assertUsdAmount(input.usdAmount);
3034
+ const body = {
3035
+ player_email: input.playerEmail,
3036
+ usd_amount: input.usdAmount
3037
+ };
3038
+ if (input.country) body["country"] = input.country;
3039
+ if (input.subdivision) body["subdivision"] = input.subdivision;
3040
+ const raw = await this.http.post(
3041
+ "/api/currency-purchases/quote",
3042
+ body,
3043
+ this.auth,
3044
+ { idempotent: true, signal: opts?.signal }
3045
+ // a read: it moves no money and creates nothing
3046
+ );
3047
+ return toCurrencyPurchaseQuote(raw);
3048
+ }
2833
3049
  /** Complete the card-rail 3-D Secure step after the client finished card action. */
2834
3050
  async confirmPayment(input, opts) {
2835
3051
  const body = { payment_intent_id: input.paymentIntentId };
package/dist/server.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as ConfirmPaymentResult, ap as OrderDetailsResult, aq as SteamPacksQuery, ar as SteamPacksResult, as as SteamInitPurchaseInput, at as SteamInitPurchaseResult, au as SteamFinalizeInput, av as SteamFinalizeResult, aw as PurchaseItemInput, ax as PurchaseItemResult, ay as ItemHistoryQuery, az as ItemHistoryResult, aA as ItemOrderQuery, aB as PlayerBalanceQuery, aC as PlayerBalanceResult, aD as InboundPendingQuery, aE as InboundPendingResult, aF as LinkedIdentitiesQuery, aG as LinkedIdentitiesResult, aH as SmsVerifyResult, aI as ClaimTransferInput, aJ as ClaimResult, aK as ClaimCurrencyInput, aL as TransactionStatusResult, aM as GuardianApprovalStatusResult, aN as ServerDestinationsQuery, k as DestinationsResult, aO as PhoneShareContact, aP as PhoneShareInitiateResult, aQ as PhoneShareApproveInput, aR as PhoneShareApproveResult, aS as PhoneShareStatusResult, aT as BeginDeviceApprovalInput, aU as DeviceApprovalGrant, aV as PollDeviceApprovalInput, aW as DeviceApprovalPollResult, aX as ConfirmDeviceEnrollmentInput, aY as ConfirmDeviceEnrollmentResult, aZ as ApproveWithDeviceCodeInput, a_ as DeviceApprovalSettleResult, a$ as CompleteDeviceApprovalInput, b0 as CompleteDeviceApprovalResult } from './types-CT0Ksonp.cjs';
2
- export { b1 as CardSetupStatus, b2 as CurrencyBalance, p as DestinationGame, b3 as DeviceApprovalChannel, b4 as DeviceApprovalEnrollment, b5 as DeviceApprovalFlow, b6 as DeviceApprovalPollStatus, b7 as DeviceEnrollmentDecision, b8 as DeviceEnrollmentRespond, b9 as FirstCharge, ba as FirstChargeStatus, bb as FundingSource, bc as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bd as LinkedIdentityEmail, be as PlatformPurchaseStatus, w as Rail, bf as RefundInitiation, bg as RefundPendingApproval, bh as RefundProcessingFeeBasis, bi as RefundReceipt, bj as RefundRevenueShareAttribution, bk as RefundWarning, bl as SandboxClockState, bm as SavedCard, bn as SteamPack, bo as SteamUserSession, bp as Subscription, bq as SubscriptionBaseInput, br as SubscriptionConsent, bs as SubscriptionConsentInput, bt as SubscriptionFundingRail, bu as SubscriptionInterval, bv as SubscriptionRevenueShare, bw as SubscriptionRevenueShareInput, bx as SubscriptionStatus, V as VerificationMethod, by as isRefundPendingApproval } from './types-CT0Ksonp.cjs';
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-DUo5NAzj.cjs';
2
+ export { b3 as CardSetupStatus, b4 as CurrencyBalance, b5 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b6 as DeviceApprovalChannel, b7 as DeviceApprovalEnrollment, b8 as DeviceApprovalFlow, b9 as DeviceApprovalPollStatus, ba as DeviceEnrollmentDecision, bb as DeviceEnrollmentRespond, bc as FeeTakenFrom, bd as FirstCharge, be as FirstChargeStatus, bf as FundingSource, bg as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bh as LinkedIdentityEmail, bi as PlatformPurchaseStatus, w as Rail, bj as RefundInitiation, bk as RefundPendingApproval, bl as RefundProcessingFeeBasis, bm as RefundReceipt, bn as RefundRevenueShareAttribution, bo as RefundWarning, bp as SandboxClockState, bq as SavedCard, br as SteamPack, bs as SteamUserSession, bt as Subscription, bu as SubscriptionBaseInput, bv as SubscriptionConsent, bw as SubscriptionConsentInput, bx as SubscriptionFundingRail, by as SubscriptionInterval, bz as SubscriptionRevenueShare, bA as SubscriptionRevenueShareInput, bB as SubscriptionStatus, bC as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bD as isRefundPendingApproval } from './types-DUo5NAzj.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.12.0";
9
+ declare const SDK_VERSION = "3.13.0";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -160,6 +160,18 @@ interface SubscriptionEventCommon {
160
160
  metadata: Record<string, unknown> | null;
161
161
  [key: string]: unknown;
162
162
  }
163
+ /**
164
+ * The two keys an event about period 1 of a PAID trial carries (`subscription.payment_failed`,
165
+ * `past_due`, `authentication_required` and `expired`). The shared `amount_usd` is the regular
166
+ * price; `amount_due_usd` and `trial_amount_usd` are the trial price. Absent on every other
167
+ * event of these types, so test for presence.
168
+ */
169
+ interface SubscriptionTrialEventFields {
170
+ /** `true` when present. */
171
+ is_trial?: boolean;
172
+ /** The paid-trial price, decimal string. */
173
+ trial_amount_usd?: string;
174
+ }
163
175
  /**
164
176
  * How a renewal was funded.
165
177
  *
@@ -221,6 +233,12 @@ interface SubscriptionRenewedData {
221
233
  subscription_id: string;
222
234
  item_id: string;
223
235
  period_seq: number;
236
+ /**
237
+ * `true` only on the event for period 1 of a PAID trial, whose `amount_usd` is then the trial
238
+ * price; `false` on every other renewal. INVO sends it on every event from 2026-09-23 on;
239
+ * optional here only because an event from an older backend does not carry it.
240
+ */
241
+ is_trial?: boolean;
224
242
  transaction_id: string;
225
243
  order_id: string;
226
244
  mint_order_id: string | null;
@@ -246,7 +264,7 @@ interface SubscriptionRenewedData {
246
264
  * access. Does not revoke anything. On the final failure `retry_at` and `grace_period_end`
247
265
  * are `null`, `retries_remaining` is `0`, and `subscription.expired` follows.
248
266
  */
249
- interface SubscriptionPaymentFailedData extends SubscriptionEventCommon {
267
+ interface SubscriptionPaymentFailedData extends SubscriptionEventCommon, SubscriptionTrialEventFields {
250
268
  attempt_no: number;
251
269
  period_start: string;
252
270
  period_end: string;
@@ -271,7 +289,7 @@ interface SubscriptionPaymentFailedData extends SubscriptionEventCommon {
271
289
  access_retained: boolean;
272
290
  }
273
291
  /** `subscription.past_due`: fires ONCE when the subscription enters `past_due`, not on every retry. */
274
- interface SubscriptionPastDueData extends SubscriptionEventCommon {
292
+ interface SubscriptionPastDueData extends SubscriptionEventCommon, SubscriptionTrialEventFields {
275
293
  amount_due_usd: string;
276
294
  grace_period_end: string | null;
277
295
  retry_at: string | null;
@@ -285,7 +303,7 @@ interface SubscriptionPastDueData extends SubscriptionEventCommon {
285
303
  * 2026-09-17 the full period price, the same figure as `amount_due_usd` (a challenge opened
286
304
  * before that date can still show the older wallet-shortfall figure).
287
305
  */
288
- interface SubscriptionAuthenticationRequiredData extends SubscriptionEventCommon {
306
+ interface SubscriptionAuthenticationRequiredData extends SubscriptionEventCommon, SubscriptionTrialEventFields {
289
307
  attempt_no: number;
290
308
  period_start: string;
291
309
  period_end: string;
@@ -321,9 +339,12 @@ interface SubscriptionCanceledData extends SubscriptionEventCommon {
321
339
  * (the last instant the member paid for; `null` if nothing was ever collected), not at
322
340
  * `ended_at`. A never-authorised Steam row carries `failure_code: "steam_authorization_abandoned"`.
323
341
  * `failure_code: "steam_containment"` is no longer sent (spending is not restricted by which
324
- * rail bought the currency).
342
+ * rail bought the currency). A refused PAID-trial charge ends the subscription at once with
343
+ * `expire_cause: "trial_payment_failed"`, `is_trial: true`, `period_seq: 1` and
344
+ * `final_period_end: null` (it follows a `subscription.payment_failed` with
345
+ * `retries_remaining: 0`).
325
346
  */
326
- interface SubscriptionExpiredData extends SubscriptionEventCommon {
347
+ interface SubscriptionExpiredData extends SubscriptionEventCommon, SubscriptionTrialEventFields {
327
348
  failed_period_start: string | null;
328
349
  failed_period_end: string | null;
329
350
  final_attempt_no: number | null;
@@ -333,6 +354,11 @@ interface SubscriptionExpiredData extends SubscriptionEventCommon {
333
354
  ended_at: string;
334
355
  final_period_end: string | null;
335
356
  access_retained: boolean;
357
+ /**
358
+ * Present only when the expiry was not the ordinary end of dunning: `"trial_payment_failed"`
359
+ * when a paid trial's own charge was refused. Absent on an ordinary expiry.
360
+ */
361
+ expire_cause?: string;
336
362
  }
337
363
  /** The `refund` block on `subscription.refunded`. */
338
364
  interface SubscriptionRefundDetail {
@@ -564,7 +590,7 @@ declare function createWebhookHandler(opts: WebhookHandlerOptions): (request: Re
564
590
  /**
565
591
  * Platform Commerce — the ECOMMERCE surface (server side). A PLATFORM tenant (a non-game
566
592
  * app: vertical video, creator merch, marketplace) sells items funded by INVO balance OR a
567
- * real card, with INVO as merchant of record and full refunds. This is NOT item purchase
593
+ * real card, with full refunds (the seller of record depends on the account tier). This is NOT item purchase
568
594
  * (§4.8) — that is a GAME tenant spending a player's existing game currency on an in-game
569
595
  * item (balance only, no card, no refund). Different endpoints, different fee, different
570
596
  * settlement. Reached as `invo.platformCommerce.*`.
@@ -648,6 +674,15 @@ declare class SubscriptionsServer {
648
674
  * `failureCode: "no_payment_method"`, whatever the member's balance: save a card first.
649
675
  * `walletOnly: true` is deprecated: it never charges a card, so such a subscription can never
650
676
  * be paid (`failureCode: "wallet_only"`).
677
+ *
678
+ * PAID TRIAL: send `trialAmountUsd` with `trialDays` or `trialEnd` (for example $1.00 for 7
679
+ * days, then `amountUsd` monthly). Period 1 is charged the trial price inside this call, so a
680
+ * usable saved card is required (`400 PAYMENT_METHOD_REQUIRED`, `err.isPaymentMethodRequired`),
681
+ * `firstCharge` reports the trial charge (never `skipped_trial`), and a refused trial charge
682
+ * ends the subscription at once (`expired`, no retry). Other refusals:
683
+ * `err.isTrialAmountRequiresTrial`, `err.isTrialAmountNotSupportedForFunding`,
684
+ * `err.isTrialAmountInvalid` (below $0.50, or not less than `amountUsd`),
685
+ * `err.isConsentDisclosedTrialInvalid`.
651
686
  * Requires the game to be `live` (`err.isGameNotLive`).
652
687
  */
653
688
  create(input: CreateSubscriptionInput, opts?: CallOptions): Promise<SubscriptionResult>;
@@ -700,8 +735,9 @@ declare class SubscriptionsServer {
700
735
  * the stored receipt with `idempotentReplay: true` and moves nothing.
701
736
  *
702
737
  * **Branch on `status`.** `"refunded"` (HTTP 200): the refund ran. `"pending_approval"`
703
- * (HTTP 202): the refund would exceed the game's daily self-serve limit ($500 per UTC day
704
- * by default), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
738
+ * (HTTP 202): the refund would exceed the game's daily self-serve limit per UTC day (by
739
+ * default never lower than the largest single subscription charge, so a single period
740
+ * always runs unless INVO set a lower limit for the game), NOTHING moved, and INVO reviews it as a refund request (`requestId`); the
705
741
  * outcome arrives as `subscription.refund_approved` (sent together with
706
742
  * `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) or
707
743
  * `subscription.refund_rejected`. The 202 carries every receipt field with nothing moved
@@ -1013,8 +1049,38 @@ declare class InvoServer {
1013
1049
  * (run client-side 3-D Secure with clientSecret, then call confirmPayment).
1014
1050
  * - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
1015
1051
  * - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
1052
+ *
1053
+ * INVO's card fee (3.5% + $0.30, never less than the card cost). Two shapes, chosen by
1054
+ * what you send:
1055
+ * - with `acknowledgedTotalUsd` (the `totalUsd` from {@link quoteCurrencyPurchase}): the
1056
+ * card is charged that total and the coins are priced off `usdAmount`. A total that no
1057
+ * longer matches throws `409 QUOTE_STALE` (`err.isQuoteStale`); nothing was charged.
1058
+ * - without it: the card is charged exactly `usdAmount`, never more, and the fee comes out
1059
+ * of the coins. An amount too small to carry the fee throws `400 AMOUNT_BELOW_FEE`
1060
+ * (`err.isAmountBelowFee`); nothing was charged.
1061
+ *
1062
+ * A `success` result reports `processingFeeUsd`, `feeTakenFrom`, `coinsCredited` and
1063
+ * `chargeTotalUsd`.
1016
1064
  */
1017
1065
  purchaseCurrency(input: PurchaseInput, opts?: CallOptions): Promise<PurchaseResult>;
1066
+ /**
1067
+ * What a card purchase of coins will cost, BEFORE charging for it. Moves no money and
1068
+ * creates nothing, so it is safe to call on every price render (`POST
1069
+ * /api/currency-purchases/quote`, authenticated by your game secret like the purchase).
1070
+ *
1071
+ * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price, never less than the
1072
+ * card cost. `totalUsd` is the price plus that fee (plus any tax, when you pass `country`):
1073
+ * $10.00 quotes a $10.65 total. Show the player `totalUsd`, then send the same figure back
1074
+ * as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the card is charged exactly that
1075
+ * and the player gets the coins for the full price. `ifUnacknowledged` shows the other
1076
+ * outcome: the card charged exactly `usdAmount` and the fee taken out of the coins ($10.00
1077
+ * gives 93.70 coins at the default 10 per USD), or `null` when the amount cannot carry the
1078
+ * fee.
1079
+ *
1080
+ * Refusals: `400 INVALID_INPUT` (amount missing, not above zero, or above INVO's card
1081
+ * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
1082
+ */
1083
+ quoteCurrencyPurchase(input: CurrencyPurchaseQuoteInput, opts?: CallOptions): Promise<CurrencyPurchaseQuote>;
1018
1084
  /** Complete the card-rail 3-D Secure step after the client finished card action. */
1019
1085
  confirmPayment(input: {
1020
1086
  paymentIntentId: string;
@@ -1330,4 +1396,4 @@ declare class InvoServer {
1330
1396
  private toInitiateResult;
1331
1397
  }
1332
1398
 
1333
- 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, 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, SubscriptionsServer, TransactionStatusResult, type TransferEventData, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
1399
+ 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 };