@invonetwork/web-sdk 3.37.0 → 3.38.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +49 -8
  3. package/dist/{chunk-AUHRMREF.js → chunk-3HK32FE4.js} +3 -3
  4. package/dist/{chunk-KWAUFFDY.js → chunk-7B7MFAQ3.js} +33 -5
  5. package/dist/chunk-MOHWLDOQ.js +6 -0
  6. package/dist/{chunk-ZHEQAZLW.js → chunk-NS33T5FB.js} +64 -15
  7. package/dist/game-server.cjs +99 -22
  8. package/dist/game-server.d.cts +4 -4
  9. package/dist/game-server.d.ts +4 -4
  10. package/dist/game-server.js +5 -5
  11. package/dist/game.cjs +32 -4
  12. package/dist/game.d.cts +3 -3
  13. package/dist/game.d.ts +3 -3
  14. package/dist/game.js +3 -3
  15. package/dist/{hosted-approval-DS9gcCF5.d.cts → hosted-approval-B-kbdFDL.d.cts} +1 -1
  16. package/dist/{hosted-approval-Dv462L4e.d.ts → hosted-approval-CtAZ1Rzt.d.ts} +1 -1
  17. package/dist/index.cjs +31 -3
  18. package/dist/index.d.cts +4 -4
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +2 -2
  21. package/dist/{server-B9PtYZaM.d.cts → server-BWGl9v5j.d.cts} +93 -13
  22. package/dist/{server-B7Pw1HMp.d.ts → server-CaaP-Nc3.d.ts} +93 -13
  23. package/dist/server.cjs +99 -22
  24. package/dist/server.d.cts +3 -3
  25. package/dist/server.d.ts +3 -3
  26. package/dist/server.js +3 -3
  27. package/dist/{types-BdKpJX93.d.cts → types-DGgWWX1v.d.cts} +89 -9
  28. package/dist/{types-BdKpJX93.d.ts → types-DGgWWX1v.d.ts} +89 -9
  29. package/dist/{version-CuhMO-6s.d.cts → version-D_cJUvMp.d.cts} +1 -1
  30. package/dist/{version-CuhMO-6s.d.ts → version-D_cJUvMp.d.ts} +1 -1
  31. package/docs/merchant-of-record-tax.md +176 -0
  32. package/package.json +2 -1
  33. package/dist/chunk-MENRG67H.js +0 -6
@@ -1,6 +1,6 @@
1
- import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-BdKpJX93.cjs';
1
+ import { $ as TaxPriceDisplay, I as InvoError, H as Http, a0 as AuthHeader, g as CallOptions, a1 as ApplePurchaseResult, a2 as PlatformPurchaseInput, a3 as PlatformPurchaseResult, a4 as PlatformApprovalResult, a5 as PlatformOrderStatusResult, a6 as PlatformPurchaseHistoryQuery, a7 as PlatformPurchaseHistoryResult, a8 as PlatformRefundInput, a9 as PlatformRefundResult, aa as CreateSubscriptionInput, ab as SubscriptionResult, ac as GetSubscriptionOptions, ad as GetSubscriptionResult, ae as ListSubscriptionsOptions, af as SubscriptionListResult, ag as CancelSubscriptionOptions, ah as CancelResult, ai as ChangeAmountResult, aj as SetPaymentMethodInput, ak as SetPaymentMethodResult, al as RefundSubscriptionInput, am as RefundResult, an as SteamSubscriptionInitInput, ao as SteamInitResult, ap as SteamFinalizeSubscriptionResult, aq as CardSetupSessionInput, ar as CardSetupSessionResult, as as CardSetupInput, at as CardSetupResult, au as CardSetupConfirmInput, av as CardSetupConfirmResult, aw as PlayerCardsResult, ax as SandboxClockResult, ay as SandboxFailureOutcome, az as SandboxForceFailureOptions, aA as SandboxForceAuthChallengeOptions, aB as ServerConfig, aC as MintPlayerTokenInput, aD as PlayerToken, aE as RegisterPlayerInput, aF as RegisterPlayerResult, aG as UpdatePlayerPhoneInput, aH as UpdatePlayerPhoneResult, aI as RequestPhoneChangeInput, aJ as RequestPhoneChangeResult, aK as PhoneChangeRequest, aL as InitiateSendInput, aM as InitiateResult, aN as InitiateTransferInput, aO as CreateCheckoutInput, aP as CreateCheckoutResult, a as PurchaseStatusResult, aQ as PurchaseInput, aR as PurchaseResult, aS as CurrencyPurchaseQuoteInput, aT as CurrencyPurchaseQuote, aU as ConfirmPaymentResult, aV as OrderDetailsResult, aW as SteamPacksQuery, aX as SteamPacksResult, aY as SteamInitPurchaseInput, aZ as SteamInitPurchaseResult, a_ as SteamFinalizeInput, a$ as SteamFinalizeResult, b0 as AppleProductsResult, b1 as VerifyApplePurchaseInput, b2 as PurchaseItemInput, b3 as PurchaseItemResult, b4 as ItemHistoryQuery, b5 as ItemHistoryResult, b6 as ItemOrderQuery, b7 as PlayerActivityQuery, b8 as PlayerActivityResult, b9 as PlayerActivityEntry, ba as PlayerBalanceQuery, bb as PlayerBalanceResult, q as LoyaltyCardsResult, bc as InboundPendingQuery, bd as InboundPendingResult, be as LinkedIdentitiesQuery, bf as LinkedIdentitiesResult, bg as SmsVerifyResult, bh as ClaimTransferInput, bi as ClaimResult, bj as ClaimCurrencyInput, bk as TransactionStatusResult, bl as GuardianApprovalStatusResult, bm as ServerDestinationsQuery, p as DestinationsResult, bn as PhoneShareContact, bo as PhoneShareInitiateResult, bp as PhoneShareApproveInput, bq as PhoneShareApproveResult, br as PhoneShareStatusResult, bs as BeginDeviceApprovalInput, bt as DeviceApprovalGrant, bu as PollDeviceApprovalInput, bv as DeviceApprovalPollResult, bw as ConfirmDeviceEnrollmentInput, bx as ConfirmDeviceEnrollmentResult, by as ApproveWithDeviceCodeInput, bz as DeviceApprovalSettleResult, bA as CompleteDeviceApprovalInput, bB as CompleteDeviceApprovalResult } from './types-DGgWWX1v.cjs';
2
2
  import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
3
- import './version-CuhMO-6s.cjs';
3
+ import './version-D_cJUvMp.cjs';
4
4
 
5
5
  /**
6
6
  * Pick the INVO environment from the game secret alone (3.28.0).
@@ -169,6 +169,22 @@ interface PurchaseCompletedData {
169
169
  * Card purchases only; absent and `null` on the same terms as `partner_fee_usd`.
170
170
  */
171
171
  international_card_fee_usd?: string | null;
172
+ /** What the card was charged, tax included, USD decimal string. */
173
+ charge_total_usd?: string | null;
174
+ /** `charge_total_usd` less the tax. On a tax-inclusive sale this is the NET price
175
+ * ($10.00 UK sale at 20%: `"8.33"`). */
176
+ subtotal_usd?: string | null;
177
+ /** The consumption tax INVO remits on this sale, USD decimal string (`"0.00"` when none). */
178
+ tax_usd?: string;
179
+ /** Where the tax is owed (for example `"GB"`, `"US-CA"`), or `null`. */
180
+ tax_jurisdiction?: string | null;
181
+ /** The rate applied, decimal string (compare as a number), or `null`. */
182
+ tax_rate_pct?: string | null;
183
+ /** Additive (3.38.0), Merchant of Record, tax-inclusive sales only: `"inclusive"` (the tax is
184
+ * INSIDE the price the buyer paid; nothing was added). Absent otherwise. See https://docs.invo.network/docs/merchant-of-record-tax */
185
+ tax_price_display?: TaxPriceDisplay;
186
+ /** Additive (3.38.0), tax-inclusive sales only: `true`. Absent otherwise. */
187
+ tax_included?: boolean;
172
188
  /**
173
189
  * Additive (3.35.0), Apple rail only (`rail: "apple"`, `channel: "ios"`): the verified App
174
190
  * Store transaction. `usd_amount` is what the player paid in USD (exact on a USD storefront;
@@ -182,6 +198,15 @@ interface PurchaseEventData {
182
198
  order_id?: string;
183
199
  player_email?: string;
184
200
  identity_id?: string;
201
+ /** On purchase.refunded: the tax returned to the buyer so far, USD decimal string. On a
202
+ * tax-inclusive sale it is the tax inside the refunded price. */
203
+ tax_refunded_usd?: string;
204
+ /** On purchase.refunded: where the tax was owed, or `null`. */
205
+ tax_jurisdiction?: string | null;
206
+ /** Additive (3.38.0), on purchase.refunded for a tax-inclusive sale only: `true`. */
207
+ tax_included?: boolean;
208
+ /** Additive (3.38.0), on purchase.refunded for a tax-inclusive sale only: `"inclusive"`. See https://docs.invo.network/docs/merchant-of-record-tax */
209
+ tax_price_display?: TaxPriceDisplay;
185
210
  /** Present on purchase.disputed, e.g. "lost". */
186
211
  dispute_status?: string;
187
212
  /**
@@ -336,8 +361,24 @@ interface PlatformCommercePurchasedData {
336
361
  * Since the 2026-09 pricing it also carries `international_card_fee_usd` (the part of
337
362
  * `platform_fee` that is the international card fee, `"0.00"` on a US card and on the
338
363
  * balance leg), so the card rate part is `platform_fee - international_card_fee_usd`.
364
+ * Additive (3.38.0), Merchant of Record: `tax_set_aside_usd` when the price contained tax (a
365
+ * tax-inclusive sale, or a place whose registration is pending): the tax taken out of the price
366
+ * before the fee and your share were worked out; `total_paid` is then the net. See https://docs.invo.network/docs/merchant-of-record-tax
339
367
  */
340
368
  fee_breakdown?: Record<string, unknown>;
369
+ /** Card leg: the sale less any tax (on a tax-inclusive sale, the net price). */
370
+ item_price_usd?: string;
371
+ /** Card leg: the tax INVO remits on the sale (`"0.00"` when none). On a tax-inclusive sale,
372
+ * the tax inside `total_price_usd`. */
373
+ tax_usd?: string;
374
+ /** Card leg: where the tax is owed, or `null`. */
375
+ tax_jurisdiction?: string | null;
376
+ /** Additive (3.38.0), tax-inclusive card sales only: `"inclusive"`. */
377
+ tax_price_display?: TaxPriceDisplay;
378
+ /** Additive (3.38.0), tax-inclusive card sales only: `true`. */
379
+ tax_included?: boolean;
380
+ /** Additive (3.38.0), tax-inclusive card sales only: the rate, decimal string, or `null`. */
381
+ tax_rate_pct?: string | null;
341
382
  /**
342
383
  * Additive (2026-09 pricing). The international card fee on this sale, USD decimal string:
343
384
  * 1.5% of the listed price (before tax) on a card issued outside the US, `"0.00"` otherwise
@@ -376,6 +417,15 @@ interface PlatformCommerceRefundedData {
376
417
  receipt_number?: string;
377
418
  /** Merchant of Record only: link to the printable refund receipt page. */
378
419
  receipt_url?: string;
420
+ /** The tax returned to the buyer by this refund, USD decimal string (`"0.00"` on the balance
421
+ * leg). On a tax-inclusive sale, the tax inside the refunded price. */
422
+ tax_refunded_usd?: string;
423
+ /** Where the tax was owed, or `null`. */
424
+ tax_jurisdiction?: string | null;
425
+ /** Additive (3.38.0), tax-inclusive card sales only: `true`. */
426
+ tax_included?: boolean;
427
+ /** Additive (3.38.0), tax-inclusive card sales only: `"inclusive"`. */
428
+ tax_price_display?: TaxPriceDisplay;
379
429
  /**
380
430
  * Additive (2026-09 pricing), card refunds only: the part of INVO's card fee on this refund
381
431
  * that stays charged to you, USD decimal string. The card fee is not returned on a refund.
@@ -597,6 +647,22 @@ interface SubscriptionRenewalFunding {
597
647
  steam_charged_usd: string;
598
648
  minted_coins: string;
599
649
  new_balance: string;
650
+ /** Card rail: the tax ADDED on top of the price (US sales), USD decimal string. `"0.00"` on a
651
+ * tax-inclusive renewal, where the tax is inside the price instead. */
652
+ tax_usd?: string;
653
+ /** Card rail: what the card was authorised for (the price plus any tax added on top). */
654
+ card_authorised_usd?: string;
655
+ /** Card rail: where the tax is owed, or `null`. */
656
+ tax_jurisdiction?: string | null;
657
+ /** Additive (3.38.0), Merchant of Record tax-inclusive renewals only: the tax INSIDE
658
+ * `card_charged_usd`, for example `"1.67"` on $10.00 at 20%. See https://docs.invo.network/docs/merchant-of-record-tax */
659
+ tax_included_usd?: string;
660
+ /** Additive (3.38.0), tax-inclusive renewals only: `true`. */
661
+ tax_included?: boolean;
662
+ /** Additive (3.38.0), tax-inclusive renewals only: `"inclusive"`. */
663
+ tax_price_display?: TaxPriceDisplay;
664
+ /** Additive (3.38.0), tax-inclusive renewals only: the rate, decimal string, or `null`. */
665
+ tax_rate_pct?: string | null;
600
666
  [key: string]: unknown;
601
667
  }
602
668
  /**
@@ -1811,11 +1877,16 @@ declare class InvoServer {
1811
1877
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
1812
1878
  * first-time receiver can collect in-game. Sends no message to the player.
1813
1879
  *
1814
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
1815
- * phone), with a player token when INVO can issue one. Refusals: 409
1816
- * `err.isPhoneMismatch` (already in your game with a different phone; use
1817
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
1818
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
1880
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
1881
+ * your game with that phone), with a player token when INVO can issue one (the token
1882
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
1883
+ * the same email and phone as a wallet the person already has, so `identityId` is the
1884
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
1885
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
1886
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
1887
+ * phone's owner to approve, and the same call succeeds once they have), 400
1888
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
1889
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
1819
1890
  */
1820
1891
  registerPlayer(input: RegisterPlayerInput, opts?: CallOptions): Promise<RegisterPlayerResult>;
1821
1892
  /**
@@ -1947,8 +2018,14 @@ declare class InvoServer {
1947
2018
  * accepted. Card purchases only; purchases through a third-party storefront or payment
1948
2019
  * rail are unaffected.
1949
2020
  *
2021
+ * Merchant of Record: in the US tax is added on top (`totalUsd` above the price); outside the
2022
+ * US the price includes the tax, and `breakdown.taxIncluded` is `true` with
2023
+ * `breakdown.taxLine` ("Includes VAT 20% ($1.67)") to show under `totalUsd`.
2024
+ *
1950
2025
  * Refusals: `400 INVALID_INPUT` (amount missing, not above zero, or above INVO's card
1951
- * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
2026
+ * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`, and on Merchant of Record
2027
+ * `409 SALE_NOT_AVAILABLE_IN_COUNTRY` (`err.isSaleNotAvailableInCountry`) for a buyer in a
2028
+ * country where INVO does not yet sell as Merchant of Record.
1952
2029
  */
1953
2030
  quoteCurrencyPurchase(input: CurrencyPurchaseQuoteInput, opts?: CallOptions): Promise<CurrencyPurchaseQuote>;
1954
2031
  /**
@@ -2254,17 +2331,20 @@ declare class InvoServer {
2254
2331
  *
2255
2332
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
2256
2333
  * no player token) — a partner backend relays the handshake. The triggering 409
2257
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
2334
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
2335
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
2336
+ * so there is no code to collect; `"sms"` when a text code went out).
2258
2337
  *
2259
2338
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
2260
2339
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
2261
2340
  */
2262
2341
  phoneShareInitiate(input: PhoneShareContact, opts?: CallOptions): Promise<PhoneShareInitiateResult>;
2263
2342
  /**
2264
- * Approve a phone-share with the OTP the phone owner received. On success the grant
2265
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
2266
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
2267
- * idempotent (attempts are counted) — never auto-retried.
2343
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
2344
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
2345
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
2346
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
2347
+ * auto-retried.
2268
2348
  */
2269
2349
  phoneShareApprove(input: PhoneShareApproveInput, opts?: CallOptions): Promise<PhoneShareApproveResult>;
2270
2350
  /**
@@ -1,6 +1,6 @@
1
- import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-BdKpJX93.js';
1
+ import { $ as TaxPriceDisplay, I as InvoError, H as Http, a0 as AuthHeader, g as CallOptions, a1 as ApplePurchaseResult, a2 as PlatformPurchaseInput, a3 as PlatformPurchaseResult, a4 as PlatformApprovalResult, a5 as PlatformOrderStatusResult, a6 as PlatformPurchaseHistoryQuery, a7 as PlatformPurchaseHistoryResult, a8 as PlatformRefundInput, a9 as PlatformRefundResult, aa as CreateSubscriptionInput, ab as SubscriptionResult, ac as GetSubscriptionOptions, ad as GetSubscriptionResult, ae as ListSubscriptionsOptions, af as SubscriptionListResult, ag as CancelSubscriptionOptions, ah as CancelResult, ai as ChangeAmountResult, aj as SetPaymentMethodInput, ak as SetPaymentMethodResult, al as RefundSubscriptionInput, am as RefundResult, an as SteamSubscriptionInitInput, ao as SteamInitResult, ap as SteamFinalizeSubscriptionResult, aq as CardSetupSessionInput, ar as CardSetupSessionResult, as as CardSetupInput, at as CardSetupResult, au as CardSetupConfirmInput, av as CardSetupConfirmResult, aw as PlayerCardsResult, ax as SandboxClockResult, ay as SandboxFailureOutcome, az as SandboxForceFailureOptions, aA as SandboxForceAuthChallengeOptions, aB as ServerConfig, aC as MintPlayerTokenInput, aD as PlayerToken, aE as RegisterPlayerInput, aF as RegisterPlayerResult, aG as UpdatePlayerPhoneInput, aH as UpdatePlayerPhoneResult, aI as RequestPhoneChangeInput, aJ as RequestPhoneChangeResult, aK as PhoneChangeRequest, aL as InitiateSendInput, aM as InitiateResult, aN as InitiateTransferInput, aO as CreateCheckoutInput, aP as CreateCheckoutResult, a as PurchaseStatusResult, aQ as PurchaseInput, aR as PurchaseResult, aS as CurrencyPurchaseQuoteInput, aT as CurrencyPurchaseQuote, aU as ConfirmPaymentResult, aV as OrderDetailsResult, aW as SteamPacksQuery, aX as SteamPacksResult, aY as SteamInitPurchaseInput, aZ as SteamInitPurchaseResult, a_ as SteamFinalizeInput, a$ as SteamFinalizeResult, b0 as AppleProductsResult, b1 as VerifyApplePurchaseInput, b2 as PurchaseItemInput, b3 as PurchaseItemResult, b4 as ItemHistoryQuery, b5 as ItemHistoryResult, b6 as ItemOrderQuery, b7 as PlayerActivityQuery, b8 as PlayerActivityResult, b9 as PlayerActivityEntry, ba as PlayerBalanceQuery, bb as PlayerBalanceResult, q as LoyaltyCardsResult, bc as InboundPendingQuery, bd as InboundPendingResult, be as LinkedIdentitiesQuery, bf as LinkedIdentitiesResult, bg as SmsVerifyResult, bh as ClaimTransferInput, bi as ClaimResult, bj as ClaimCurrencyInput, bk as TransactionStatusResult, bl as GuardianApprovalStatusResult, bm as ServerDestinationsQuery, p as DestinationsResult, bn as PhoneShareContact, bo as PhoneShareInitiateResult, bp as PhoneShareApproveInput, bq as PhoneShareApproveResult, br as PhoneShareStatusResult, bs as BeginDeviceApprovalInput, bt as DeviceApprovalGrant, bu as PollDeviceApprovalInput, bv as DeviceApprovalPollResult, bw as ConfirmDeviceEnrollmentInput, bx as ConfirmDeviceEnrollmentResult, by as ApproveWithDeviceCodeInput, bz as DeviceApprovalSettleResult, bA as CompleteDeviceApprovalInput, bB as CompleteDeviceApprovalResult } from './types-DGgWWX1v.js';
2
2
  import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
3
- import './version-CuhMO-6s.js';
3
+ import './version-D_cJUvMp.js';
4
4
 
5
5
  /**
6
6
  * Pick the INVO environment from the game secret alone (3.28.0).
@@ -169,6 +169,22 @@ interface PurchaseCompletedData {
169
169
  * Card purchases only; absent and `null` on the same terms as `partner_fee_usd`.
170
170
  */
171
171
  international_card_fee_usd?: string | null;
172
+ /** What the card was charged, tax included, USD decimal string. */
173
+ charge_total_usd?: string | null;
174
+ /** `charge_total_usd` less the tax. On a tax-inclusive sale this is the NET price
175
+ * ($10.00 UK sale at 20%: `"8.33"`). */
176
+ subtotal_usd?: string | null;
177
+ /** The consumption tax INVO remits on this sale, USD decimal string (`"0.00"` when none). */
178
+ tax_usd?: string;
179
+ /** Where the tax is owed (for example `"GB"`, `"US-CA"`), or `null`. */
180
+ tax_jurisdiction?: string | null;
181
+ /** The rate applied, decimal string (compare as a number), or `null`. */
182
+ tax_rate_pct?: string | null;
183
+ /** Additive (3.38.0), Merchant of Record, tax-inclusive sales only: `"inclusive"` (the tax is
184
+ * INSIDE the price the buyer paid; nothing was added). Absent otherwise. See https://docs.invo.network/docs/merchant-of-record-tax */
185
+ tax_price_display?: TaxPriceDisplay;
186
+ /** Additive (3.38.0), tax-inclusive sales only: `true`. Absent otherwise. */
187
+ tax_included?: boolean;
172
188
  /**
173
189
  * Additive (3.35.0), Apple rail only (`rail: "apple"`, `channel: "ios"`): the verified App
174
190
  * Store transaction. `usd_amount` is what the player paid in USD (exact on a USD storefront;
@@ -182,6 +198,15 @@ interface PurchaseEventData {
182
198
  order_id?: string;
183
199
  player_email?: string;
184
200
  identity_id?: string;
201
+ /** On purchase.refunded: the tax returned to the buyer so far, USD decimal string. On a
202
+ * tax-inclusive sale it is the tax inside the refunded price. */
203
+ tax_refunded_usd?: string;
204
+ /** On purchase.refunded: where the tax was owed, or `null`. */
205
+ tax_jurisdiction?: string | null;
206
+ /** Additive (3.38.0), on purchase.refunded for a tax-inclusive sale only: `true`. */
207
+ tax_included?: boolean;
208
+ /** Additive (3.38.0), on purchase.refunded for a tax-inclusive sale only: `"inclusive"`. See https://docs.invo.network/docs/merchant-of-record-tax */
209
+ tax_price_display?: TaxPriceDisplay;
185
210
  /** Present on purchase.disputed, e.g. "lost". */
186
211
  dispute_status?: string;
187
212
  /**
@@ -336,8 +361,24 @@ interface PlatformCommercePurchasedData {
336
361
  * Since the 2026-09 pricing it also carries `international_card_fee_usd` (the part of
337
362
  * `platform_fee` that is the international card fee, `"0.00"` on a US card and on the
338
363
  * balance leg), so the card rate part is `platform_fee - international_card_fee_usd`.
364
+ * Additive (3.38.0), Merchant of Record: `tax_set_aside_usd` when the price contained tax (a
365
+ * tax-inclusive sale, or a place whose registration is pending): the tax taken out of the price
366
+ * before the fee and your share were worked out; `total_paid` is then the net. See https://docs.invo.network/docs/merchant-of-record-tax
339
367
  */
340
368
  fee_breakdown?: Record<string, unknown>;
369
+ /** Card leg: the sale less any tax (on a tax-inclusive sale, the net price). */
370
+ item_price_usd?: string;
371
+ /** Card leg: the tax INVO remits on the sale (`"0.00"` when none). On a tax-inclusive sale,
372
+ * the tax inside `total_price_usd`. */
373
+ tax_usd?: string;
374
+ /** Card leg: where the tax is owed, or `null`. */
375
+ tax_jurisdiction?: string | null;
376
+ /** Additive (3.38.0), tax-inclusive card sales only: `"inclusive"`. */
377
+ tax_price_display?: TaxPriceDisplay;
378
+ /** Additive (3.38.0), tax-inclusive card sales only: `true`. */
379
+ tax_included?: boolean;
380
+ /** Additive (3.38.0), tax-inclusive card sales only: the rate, decimal string, or `null`. */
381
+ tax_rate_pct?: string | null;
341
382
  /**
342
383
  * Additive (2026-09 pricing). The international card fee on this sale, USD decimal string:
343
384
  * 1.5% of the listed price (before tax) on a card issued outside the US, `"0.00"` otherwise
@@ -376,6 +417,15 @@ interface PlatformCommerceRefundedData {
376
417
  receipt_number?: string;
377
418
  /** Merchant of Record only: link to the printable refund receipt page. */
378
419
  receipt_url?: string;
420
+ /** The tax returned to the buyer by this refund, USD decimal string (`"0.00"` on the balance
421
+ * leg). On a tax-inclusive sale, the tax inside the refunded price. */
422
+ tax_refunded_usd?: string;
423
+ /** Where the tax was owed, or `null`. */
424
+ tax_jurisdiction?: string | null;
425
+ /** Additive (3.38.0), tax-inclusive card sales only: `true`. */
426
+ tax_included?: boolean;
427
+ /** Additive (3.38.0), tax-inclusive card sales only: `"inclusive"`. */
428
+ tax_price_display?: TaxPriceDisplay;
379
429
  /**
380
430
  * Additive (2026-09 pricing), card refunds only: the part of INVO's card fee on this refund
381
431
  * that stays charged to you, USD decimal string. The card fee is not returned on a refund.
@@ -597,6 +647,22 @@ interface SubscriptionRenewalFunding {
597
647
  steam_charged_usd: string;
598
648
  minted_coins: string;
599
649
  new_balance: string;
650
+ /** Card rail: the tax ADDED on top of the price (US sales), USD decimal string. `"0.00"` on a
651
+ * tax-inclusive renewal, where the tax is inside the price instead. */
652
+ tax_usd?: string;
653
+ /** Card rail: what the card was authorised for (the price plus any tax added on top). */
654
+ card_authorised_usd?: string;
655
+ /** Card rail: where the tax is owed, or `null`. */
656
+ tax_jurisdiction?: string | null;
657
+ /** Additive (3.38.0), Merchant of Record tax-inclusive renewals only: the tax INSIDE
658
+ * `card_charged_usd`, for example `"1.67"` on $10.00 at 20%. See https://docs.invo.network/docs/merchant-of-record-tax */
659
+ tax_included_usd?: string;
660
+ /** Additive (3.38.0), tax-inclusive renewals only: `true`. */
661
+ tax_included?: boolean;
662
+ /** Additive (3.38.0), tax-inclusive renewals only: `"inclusive"`. */
663
+ tax_price_display?: TaxPriceDisplay;
664
+ /** Additive (3.38.0), tax-inclusive renewals only: the rate, decimal string, or `null`. */
665
+ tax_rate_pct?: string | null;
600
666
  [key: string]: unknown;
601
667
  }
602
668
  /**
@@ -1811,11 +1877,16 @@ declare class InvoServer {
1811
1877
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
1812
1878
  * first-time receiver can collect in-game. Sends no message to the player.
1813
1879
  *
1814
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
1815
- * phone), with a player token when INVO can issue one. Refusals: 409
1816
- * `err.isPhoneMismatch` (already in your game with a different phone; use
1817
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
1818
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
1880
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
1881
+ * your game with that phone), with a player token when INVO can issue one (the token
1882
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
1883
+ * the same email and phone as a wallet the person already has, so `identityId` is the
1884
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
1885
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
1886
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
1887
+ * phone's owner to approve, and the same call succeeds once they have), 400
1888
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
1889
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
1819
1890
  */
1820
1891
  registerPlayer(input: RegisterPlayerInput, opts?: CallOptions): Promise<RegisterPlayerResult>;
1821
1892
  /**
@@ -1947,8 +2018,14 @@ declare class InvoServer {
1947
2018
  * accepted. Card purchases only; purchases through a third-party storefront or payment
1948
2019
  * rail are unaffected.
1949
2020
  *
2021
+ * Merchant of Record: in the US tax is added on top (`totalUsd` above the price); outside the
2022
+ * US the price includes the tax, and `breakdown.taxIncluded` is `true` with
2023
+ * `breakdown.taxLine` ("Includes VAT 20% ($1.67)") to show under `totalUsd`.
2024
+ *
1950
2025
  * Refusals: `400 INVALID_INPUT` (amount missing, not above zero, or above INVO's card
1951
- * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
2026
+ * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`, and on Merchant of Record
2027
+ * `409 SALE_NOT_AVAILABLE_IN_COUNTRY` (`err.isSaleNotAvailableInCountry`) for a buyer in a
2028
+ * country where INVO does not yet sell as Merchant of Record.
1952
2029
  */
1953
2030
  quoteCurrencyPurchase(input: CurrencyPurchaseQuoteInput, opts?: CallOptions): Promise<CurrencyPurchaseQuote>;
1954
2031
  /**
@@ -2254,17 +2331,20 @@ declare class InvoServer {
2254
2331
  *
2255
2332
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
2256
2333
  * no player token) — a partner backend relays the handshake. The triggering 409
2257
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
2334
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
2335
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
2336
+ * so there is no code to collect; `"sms"` when a text code went out).
2258
2337
  *
2259
2338
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
2260
2339
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
2261
2340
  */
2262
2341
  phoneShareInitiate(input: PhoneShareContact, opts?: CallOptions): Promise<PhoneShareInitiateResult>;
2263
2342
  /**
2264
- * Approve a phone-share with the OTP the phone owner received. On success the grant
2265
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
2266
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
2267
- * idempotent (attempts are counted) — never auto-retried.
2343
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
2344
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
2345
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
2346
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
2347
+ * auto-retried.
2268
2348
  */
2269
2349
  phoneShareApprove(input: PhoneShareApproveInput, opts?: CallOptions): Promise<PhoneShareApproveResult>;
2270
2350
  /**
package/dist/server.cjs CHANGED
@@ -86,7 +86,11 @@ var InvoError = class _InvoError extends Error {
86
86
  * - registration/token-mint (phone already on another INVO account), and
87
87
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
88
88
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
89
- * so INVO holds the money and texts the phone owner to approve.
89
+ * so INVO holds the money and asks the phone owner to approve.
90
+ *
91
+ * Either way the 409 has already created an approval request and contacted the phone's
92
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
93
+ * (the body's `consent_channel` says which).
90
94
  *
91
95
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
92
96
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -103,7 +107,8 @@ var InvoError = class _InvoError extends Error {
103
107
  const v = this.bodyObject()["approval_id"];
104
108
  return typeof v === "string" && v ? v : void 0;
105
109
  }
106
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
110
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
111
+ * for the UI message. `undefined` when the body has none (an older server). */
107
112
  get phoneShareLast4() {
108
113
  const v = this.bodyObject()["phone_last4"];
109
114
  return typeof v === "string" && v ? v : void 0;
@@ -542,6 +547,26 @@ var InvoError = class _InvoError extends Error {
542
547
  const v = this.bodyObject()["untaxed_total_usd"];
543
548
  return typeof v === "string" && v ? v : void 0;
544
549
  }
550
+ /**
551
+ * Additive (3.38.0). True when a Merchant of Record card sale was refused because the buyer is in
552
+ * a country where INVO does not yet sell as Merchant of Record (`SALE_NOT_AVAILABLE_IN_COUNTRY`,
553
+ * 409; today the EU member states until January 1, 2027). NOTHING WAS CHARGED. The body carries
554
+ * `retryable: false`: do not retry, and do not ask for another card (the refusal follows where
555
+ * the buyer is). Show the message (`err.message`), for example "Purchases aren't available in
556
+ * your country yet. Nothing was charged." Returned by the quote, the purchase, hosted checkout
557
+ * and Platform Commerce card purchases. Branch on this, never on a country list.
558
+ * See https://docs.invo.network/docs/merchant-of-record-tax#sale-not-available
559
+ */
560
+ get isSaleNotAvailableInCountry() {
561
+ return this.code === "SALE_NOT_AVAILABLE_IN_COUNTRY";
562
+ }
563
+ /** On `SALE_NOT_AVAILABLE_IN_COUNTRY`: the buyer's country, ISO 3166-1 alpha-2 (`country`), or
564
+ * `undefined` when INVO did not know it. */
565
+ get unavailableCountry() {
566
+ if (!this.isSaleNotAvailableInCountry) return void 0;
567
+ const v = this.bodyObject()["country"];
568
+ return typeof v === "string" && v ? v : void 0;
569
+ }
545
570
  /**
546
571
  * True if a Platform Commerce refund targeted an order that was already refunded
547
572
  * (409). Idempotent outcome — the original refund did happen, so treat this as
@@ -1076,7 +1101,10 @@ var InvoError = class _InvoError extends Error {
1076
1101
  /**
1077
1102
  * True when the phone you supplied belongs to another email
1078
1103
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1079
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1104
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1105
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1106
+ * created an approval request and asked the phone's owner to approve; retry the same call
1107
+ * once they have and it succeeds. The same condition as
1080
1108
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1081
1109
  */
1082
1110
  get isPhoneShareRefused() {
@@ -1847,6 +1875,39 @@ function toReportGameEventResult(raw, eventId) {
1847
1875
  };
1848
1876
  }
1849
1877
 
1878
+ // src/shared/tax-fields.ts
1879
+ function str3(v) {
1880
+ return v == null ? void 0 : String(v);
1881
+ }
1882
+ function includedTaxFields(raw) {
1883
+ const out = {};
1884
+ if (typeof raw["tax_included"] === "boolean") out.taxIncluded = raw["tax_included"];
1885
+ const inc = str3(raw["tax_included_usd"]);
1886
+ if (inc !== void 0) out.taxIncludedUsd = inc;
1887
+ const display = str3(raw["tax_price_display"]);
1888
+ if (display !== void 0) out.taxPriceDisplay = display;
1889
+ const label = str3(raw["tax_label"]);
1890
+ if (label !== void 0) out.taxLabel = label;
1891
+ const line = str3(raw["tax_line"]);
1892
+ if (line !== void 0) out.taxLine = line;
1893
+ return out;
1894
+ }
1895
+ function includedTaxBreakdownFields(raw) {
1896
+ const out = includedTaxFields(raw);
1897
+ const added = str3(raw["tax_added_usd"]);
1898
+ if (added !== void 0) out.taxAddedUsd = added;
1899
+ return out;
1900
+ }
1901
+ function includedTaxPurchaseFields(raw) {
1902
+ const out = includedTaxFields(raw);
1903
+ if (out.taxIncluded !== true) return out;
1904
+ const tax = str3(raw["tax_usd"]);
1905
+ if (tax !== void 0) out.taxUsd = tax;
1906
+ if (Object.prototype.hasOwnProperty.call(raw, "tax_jurisdiction")) out.taxJurisdiction = str3(raw["tax_jurisdiction"]) ?? null;
1907
+ if (Object.prototype.hasOwnProperty.call(raw, "tax_rate_pct")) out.taxRatePct = str3(raw["tax_rate_pct"]) ?? null;
1908
+ return out;
1909
+ }
1910
+
1850
1911
  // src/shared/phone-change.ts
1851
1912
  function requireField(value, field, raw) {
1852
1913
  const s = value == null ? "" : String(value);
@@ -1860,16 +1921,16 @@ function requireField(value, field, raw) {
1860
1921
  }
1861
1922
  return s;
1862
1923
  }
1863
- var str3 = (v) => v == null ? "" : String(v);
1924
+ var str4 = (v) => v == null ? "" : String(v);
1864
1925
  var strOrNull2 = (v) => typeof v === "string" ? v : v == null ? null : String(v);
1865
1926
  function toRequestPhoneChangeResult(raw) {
1866
1927
  return {
1867
1928
  changeRequestId: requireField(raw["change_request_id"], "change_request_id", raw),
1868
1929
  status: requireField(raw["status"], "status", raw),
1869
- expiresAt: str3(raw["expires_at"]),
1870
- delivery: str3(raw["delivery"]),
1871
- confirmation: str3(raw["confirmation"]),
1872
- message: str3(raw["message"]),
1930
+ expiresAt: str4(raw["expires_at"]),
1931
+ delivery: str4(raw["delivery"]),
1932
+ confirmation: str4(raw["confirmation"]),
1933
+ message: str4(raw["message"]),
1873
1934
  raw
1874
1935
  };
1875
1936
  }
@@ -1877,8 +1938,8 @@ function toPhoneChangeRequest(raw) {
1877
1938
  return {
1878
1939
  changeRequestId: requireField(raw["change_request_id"], "change_request_id", raw),
1879
1940
  status: requireField(raw["status"], "status", raw),
1880
- confirmation: str3(raw["confirmation"]),
1881
- delivery: str3(raw["delivery"]),
1941
+ confirmation: str4(raw["confirmation"]),
1942
+ delivery: str4(raw["delivery"]),
1882
1943
  newPhoneMasked: strOrNull2(raw["new_phone_masked"]),
1883
1944
  createdAt: strOrNull2(raw["created_at"]),
1884
1945
  expiresAt: strOrNull2(raw["expires_at"]),
@@ -1889,7 +1950,7 @@ function toPhoneChangeRequest(raw) {
1889
1950
  }
1890
1951
 
1891
1952
  // src/version.ts
1892
- var SDK_VERSION = "3.37.0";
1953
+ var SDK_VERSION = "3.38.0";
1893
1954
 
1894
1955
  // src/payouts.ts
1895
1956
  var AMOUNT = /^\d+(\.\d{1,2})?$/;
@@ -2451,6 +2512,7 @@ function toQuoteBreakdown(row) {
2451
2512
  totalUsd: String(r["total_usd"] ?? ""),
2452
2513
  coins: String(r["coins"] ?? ""),
2453
2514
  currencyName: String(r["currency_name"] ?? ""),
2515
+ ...includedTaxBreakdownFields(r),
2454
2516
  raw: r
2455
2517
  };
2456
2518
  }
@@ -4346,11 +4408,16 @@ var InvoServer = class {
4346
4408
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
4347
4409
  * first-time receiver can collect in-game. Sends no message to the player.
4348
4410
  *
4349
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
4350
- * phone), with a player token when INVO can issue one. Refusals: 409
4351
- * `err.isPhoneMismatch` (already in your game with a different phone; use
4352
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
4353
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
4411
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
4412
+ * your game with that phone), with a player token when INVO can issue one (the token
4413
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
4414
+ * the same email and phone as a wallet the person already has, so `identityId` is the
4415
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
4416
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
4417
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
4418
+ * phone's owner to approve, and the same call succeeds once they have), 400
4419
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
4420
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
4354
4421
  */
4355
4422
  async registerPlayer(input, opts) {
4356
4423
  if (typeof input.playerEmail !== "string" || !input.playerEmail.trim()) {
@@ -4669,6 +4736,7 @@ var InvoServer = class {
4669
4736
  chargeTotalUsd: optionalDecimalString(raw["charge_total_usd"]),
4670
4737
  ...pricingFields(raw),
4671
4738
  ...receiptFields(raw),
4739
+ ...includedTaxPurchaseFields(raw),
4672
4740
  raw
4673
4741
  };
4674
4742
  }
@@ -4689,8 +4757,14 @@ var InvoServer = class {
4689
4757
  * accepted. Card purchases only; purchases through a third-party storefront or payment
4690
4758
  * rail are unaffected.
4691
4759
  *
4760
+ * Merchant of Record: in the US tax is added on top (`totalUsd` above the price); outside the
4761
+ * US the price includes the tax, and `breakdown.taxIncluded` is `true` with
4762
+ * `breakdown.taxLine` ("Includes VAT 20% ($1.67)") to show under `totalUsd`.
4763
+ *
4692
4764
  * Refusals: `400 INVALID_INPUT` (amount missing, not above zero, or above INVO's card
4693
- * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
4765
+ * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`, and on Merchant of Record
4766
+ * `409 SALE_NOT_AVAILABLE_IN_COUNTRY` (`err.isSaleNotAvailableInCountry`) for a buyer in a
4767
+ * country where INVO does not yet sell as Merchant of Record.
4694
4768
  */
4695
4769
  async quoteCurrencyPurchase(input, opts) {
4696
4770
  assertUsdAmount(input.usdAmount);
@@ -5526,7 +5600,9 @@ var InvoServer = class {
5526
5600
  *
5527
5601
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
5528
5602
  * no player token) — a partner backend relays the handshake. The triggering 409
5529
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
5603
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
5604
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
5605
+ * so there is no code to collect; `"sms"` when a text code went out).
5530
5606
  *
5531
5607
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
5532
5608
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
@@ -5549,10 +5625,11 @@ var InvoServer = class {
5549
5625
  return toPhoneShareInitiateResult(raw);
5550
5626
  }
5551
5627
  /**
5552
- * Approve a phone-share with the OTP the phone owner received. On success the grant
5553
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
5554
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
5555
- * idempotent (attempts are counted) — never auto-retried.
5628
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
5629
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
5630
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
5631
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
5632
+ * auto-retried.
5556
5633
  */
5557
5634
  async phoneShareApprove(input, opts) {
5558
5635
  if (typeof input.approvalId !== "string" || !input.approvalId.trim()) {