@invonetwork/web-sdk 3.13.0 → 3.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as CurrencyPurchaseQuoteInput, ap as CurrencyPurchaseQuote, aq as ConfirmPaymentResult, ar as OrderDetailsResult, as as SteamPacksQuery, at as SteamPacksResult, au as SteamInitPurchaseInput, av as SteamInitPurchaseResult, aw as SteamFinalizeInput, ax as SteamFinalizeResult, ay as PurchaseItemInput, az as PurchaseItemResult, aA as ItemHistoryQuery, aB as ItemHistoryResult, aC as ItemOrderQuery, aD as PlayerBalanceQuery, aE as PlayerBalanceResult, aF as InboundPendingQuery, aG as InboundPendingResult, aH as LinkedIdentitiesQuery, aI as LinkedIdentitiesResult, aJ as SmsVerifyResult, aK as ClaimTransferInput, aL as ClaimResult, aM as ClaimCurrencyInput, aN as TransactionStatusResult, aO as GuardianApprovalStatusResult, aP as ServerDestinationsQuery, k as DestinationsResult, aQ as PhoneShareContact, aR as PhoneShareInitiateResult, aS as PhoneShareApproveInput, aT as PhoneShareApproveResult, aU as PhoneShareStatusResult, aV as BeginDeviceApprovalInput, aW as DeviceApprovalGrant, aX as PollDeviceApprovalInput, aY as DeviceApprovalPollResult, aZ as ConfirmDeviceEnrollmentInput, a_ as ConfirmDeviceEnrollmentResult, a$ as ApproveWithDeviceCodeInput, b0 as DeviceApprovalSettleResult, b1 as CompleteDeviceApprovalInput, b2 as CompleteDeviceApprovalResult } from './types-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';
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-CD83iV3D.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-CD83iV3D.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.13.0";
9
+ declare const SDK_VERSION = "3.14.1";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -52,6 +52,19 @@ interface PurchaseCompletedData {
52
52
  * its `mint_order_id` equals this event's `order_id`.
53
53
  */
54
54
  metadata?: Record<string, unknown>;
55
+ /**
56
+ * Why the tax is what it is. `"partner_responsible"` on an Open-tier account (you are the
57
+ * seller; INVO charged no tax); on Merchant of Record, how INVO handled it (for example
58
+ * `"collected"`). Treat an unknown value as informational.
59
+ */
60
+ tax_treatment?: string | null;
61
+ /**
62
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
63
+ * Absent on Open accounts and storefront rails.
64
+ */
65
+ receipt_number?: string;
66
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
67
+ receipt_url?: string;
55
68
  [key: string]: unknown;
56
69
  }
57
70
  interface PurchaseEventData {
@@ -61,6 +74,13 @@ interface PurchaseEventData {
61
74
  identity_id?: string;
62
75
  /** Present on purchase.disputed, e.g. "lost". */
63
76
  dispute_status?: string;
77
+ /**
78
+ * Merchant of Record accounts only (on `purchase.refunded`, card refunds): the REFUND receipt INVO issued to the
79
+ * buyer. Absent on Open accounts, and while a refund is still pending.
80
+ */
81
+ receipt_number?: string;
82
+ /** Merchant of Record only: link to the printable refund receipt page. */
83
+ receipt_url?: string;
64
84
  [key: string]: unknown;
65
85
  }
66
86
  interface ItemPurchasedData {
@@ -101,6 +121,13 @@ interface PlatformCommercePurchasedData {
101
121
  /** Card leg only (the USD charged). */
102
122
  total_price_usd?: string;
103
123
  fee_breakdown?: Record<string, unknown>;
124
+ /**
125
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
126
+ * Absent on Open accounts and storefront rails.
127
+ */
128
+ receipt_number?: string;
129
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
130
+ receipt_url?: string;
104
131
  [key: string]: unknown;
105
132
  }
106
133
  /** `platform_commerce.refunded` — a Platform Commerce purchase was refunded. INVO keeps
@@ -117,6 +144,13 @@ interface PlatformCommerceRefundedData {
117
144
  /** `"usd"` (card) or the literal `"currency"` (balance). */
118
145
  amount_unit: string;
119
146
  fee_retained: boolean;
147
+ /**
148
+ * Merchant of Record accounts only (card refunds): the REFUND receipt INVO issued to the
149
+ * buyer. Absent on Open accounts, and while a refund is still pending.
150
+ */
151
+ receipt_number?: string;
152
+ /** Merchant of Record only: link to the printable refund receipt page. */
153
+ receipt_url?: string;
120
154
  [key: string]: unknown;
121
155
  }
122
156
  interface TransferEventData {
@@ -257,6 +291,13 @@ interface SubscriptionRenewedData {
257
291
  split: SubscriptionRenewalSplit;
258
292
  revenue_share_attribution: SubscriptionRevenueShareAttribution | null;
259
293
  metadata: Record<string, unknown> | null;
294
+ /**
295
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
296
+ * Absent on Open accounts and storefront rails.
297
+ */
298
+ receipt_number?: string;
299
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
300
+ receipt_url?: string;
260
301
  [key: string]: unknown;
261
302
  }
262
303
  /**
@@ -416,6 +457,13 @@ interface SubscriptionRefundedData {
416
457
  refund_request_id?: string | null;
417
458
  /** Additive (2026-09-17). `true` when this refund cancelled the subscription. */
418
459
  subscription_canceled?: boolean;
460
+ /**
461
+ * Merchant of Record accounts only (card refunds): the REFUND receipt INVO issued to the
462
+ * buyer. Absent on Open accounts, and while a refund is still pending.
463
+ */
464
+ receipt_number?: string;
465
+ /** Merchant of Record only: link to the printable refund receipt page. */
466
+ receipt_url?: string;
419
467
  [key: string]: unknown;
420
468
  }
421
469
  /**
@@ -1050,7 +1098,7 @@ declare class InvoServer {
1050
1098
  * - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
1051
1099
  * - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
1052
1100
  *
1053
- * INVO's card fee (3.5% + $0.30, never less than the card cost). Two shapes, chosen by
1101
+ * INVO's card fee (3.5% + $0.30 on Open, 5% + $0.30 on Merchant of Record, never less than the card cost). Two shapes, chosen by
1054
1102
  * what you send:
1055
1103
  * - with `acknowledgedTotalUsd` (the `totalUsd` from {@link quoteCurrencyPurchase}): the
1056
1104
  * card is charged that total and the coins are priced off `usdAmount`. A total that no
@@ -1068,7 +1116,7 @@ declare class InvoServer {
1068
1116
  * creates nothing, so it is safe to call on every price render (`POST
1069
1117
  * /api/currency-purchases/quote`, authenticated by your game secret like the purchase).
1070
1118
  *
1071
- * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price, never less than the
1119
+ * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price on the Open tier (5% + $0.30 on Merchant of Record), never less than the
1072
1120
  * card cost. `totalUsd` is the price plus that fee (plus any tax, when you pass `country`):
1073
1121
  * $10.00 quotes a $10.65 total. Show the player `totalUsd`, then send the same figure back
1074
1122
  * as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the card is charged exactly that
@@ -1081,7 +1129,11 @@ declare class InvoServer {
1081
1129
  * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
1082
1130
  */
1083
1131
  quoteCurrencyPurchase(input: CurrencyPurchaseQuoteInput, opts?: CallOptions): Promise<CurrencyPurchaseQuote>;
1084
- /** Complete the card-rail 3-D Secure step after the client finished card action. */
1132
+ /**
1133
+ * Complete the card-rail 3-D Secure step after the client finished card action.
1134
+ * `status: "success"` means the payment succeeded; tell the buyer the purchase is complete
1135
+ * only when `credited` is `true` (see {@link ConfirmPaymentResult.credited}).
1136
+ */
1085
1137
  confirmPayment(input: {
1086
1138
  paymentIntentId: string;
1087
1139
  orderId?: string;
package/dist/server.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { I as InvoError, H as Http, x as AuthHeader, y as CardSetupSessionInput, g as CallOptions, z as CardSetupSessionResult, F as CardSetupInput, G as CardSetupResult, J as CardSetupConfirmInput, K as CardSetupConfirmResult, N as PlayerCardsResult, O as PlatformPurchaseInput, Q as PlatformPurchaseResult, S as PlatformOrderStatusResult, T as PlatformRefundInput, U as PlatformRefundResult, X as CreateSubscriptionInput, Y as SubscriptionResult, Z as GetSubscriptionOptions, _ as GetSubscriptionResult, $ as ListSubscriptionsOptions, a0 as SubscriptionListResult, a1 as CancelSubscriptionOptions, a2 as CancelResult, a3 as ChangeAmountResult, a4 as SetPaymentMethodInput, a5 as SetPaymentMethodResult, a6 as RefundSubscriptionInput, a7 as RefundResult, a8 as SteamSubscriptionInitInput, a9 as SteamInitResult, aa as SteamFinalizeSubscriptionResult, ab as SandboxClockResult, ac as SandboxFailureOutcome, ad as SandboxForceFailureOptions, ae as SandboxForceAuthChallengeOptions, af as ServerConfig, ag as PlayerToken, ah as InitiateSendInput, ai as InitiateResult, aj as InitiateTransferInput, ak as CreateCheckoutInput, al as CreateCheckoutResult, am as PurchaseInput, an as PurchaseResult, ao as CurrencyPurchaseQuoteInput, ap as CurrencyPurchaseQuote, aq as ConfirmPaymentResult, ar as OrderDetailsResult, as as SteamPacksQuery, at as SteamPacksResult, au as SteamInitPurchaseInput, av as SteamInitPurchaseResult, aw as SteamFinalizeInput, ax as SteamFinalizeResult, ay as PurchaseItemInput, az as PurchaseItemResult, aA as ItemHistoryQuery, aB as ItemHistoryResult, aC as ItemOrderQuery, aD as PlayerBalanceQuery, aE as PlayerBalanceResult, aF as InboundPendingQuery, aG as InboundPendingResult, aH as LinkedIdentitiesQuery, aI as LinkedIdentitiesResult, aJ as SmsVerifyResult, aK as ClaimTransferInput, aL as ClaimResult, aM as ClaimCurrencyInput, aN as TransactionStatusResult, aO as GuardianApprovalStatusResult, aP as ServerDestinationsQuery, k as DestinationsResult, aQ as PhoneShareContact, aR as PhoneShareInitiateResult, aS as PhoneShareApproveInput, aT as PhoneShareApproveResult, aU as PhoneShareStatusResult, aV as BeginDeviceApprovalInput, aW as DeviceApprovalGrant, aX as PollDeviceApprovalInput, aY as DeviceApprovalPollResult, aZ as ConfirmDeviceEnrollmentInput, a_ as ConfirmDeviceEnrollmentResult, a$ as ApproveWithDeviceCodeInput, b0 as DeviceApprovalSettleResult, b1 as CompleteDeviceApprovalInput, b2 as CompleteDeviceApprovalResult } from './types-DUo5NAzj.js';
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.js';
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-CD83iV3D.js';
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-CD83iV3D.js';
3
3
 
4
4
  /**
5
5
  * The package version, as sent in the server User-Agent. A test pins this to
6
6
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
7
7
  * Bump it with the changeset flow.
8
8
  */
9
- declare const SDK_VERSION = "3.13.0";
9
+ declare const SDK_VERSION = "3.14.1";
10
10
 
11
11
  interface VerifyWebhookOptions {
12
12
  /** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
@@ -52,6 +52,19 @@ interface PurchaseCompletedData {
52
52
  * its `mint_order_id` equals this event's `order_id`.
53
53
  */
54
54
  metadata?: Record<string, unknown>;
55
+ /**
56
+ * Why the tax is what it is. `"partner_responsible"` on an Open-tier account (you are the
57
+ * seller; INVO charged no tax); on Merchant of Record, how INVO handled it (for example
58
+ * `"collected"`). Treat an unknown value as informational.
59
+ */
60
+ tax_treatment?: string | null;
61
+ /**
62
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
63
+ * Absent on Open accounts and storefront rails.
64
+ */
65
+ receipt_number?: string;
66
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
67
+ receipt_url?: string;
55
68
  [key: string]: unknown;
56
69
  }
57
70
  interface PurchaseEventData {
@@ -61,6 +74,13 @@ interface PurchaseEventData {
61
74
  identity_id?: string;
62
75
  /** Present on purchase.disputed, e.g. "lost". */
63
76
  dispute_status?: string;
77
+ /**
78
+ * Merchant of Record accounts only (on `purchase.refunded`, card refunds): the REFUND receipt INVO issued to the
79
+ * buyer. Absent on Open accounts, and while a refund is still pending.
80
+ */
81
+ receipt_number?: string;
82
+ /** Merchant of Record only: link to the printable refund receipt page. */
83
+ receipt_url?: string;
64
84
  [key: string]: unknown;
65
85
  }
66
86
  interface ItemPurchasedData {
@@ -101,6 +121,13 @@ interface PlatformCommercePurchasedData {
101
121
  /** Card leg only (the USD charged). */
102
122
  total_price_usd?: string;
103
123
  fee_breakdown?: Record<string, unknown>;
124
+ /**
125
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
126
+ * Absent on Open accounts and storefront rails.
127
+ */
128
+ receipt_number?: string;
129
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
130
+ receipt_url?: string;
104
131
  [key: string]: unknown;
105
132
  }
106
133
  /** `platform_commerce.refunded` — a Platform Commerce purchase was refunded. INVO keeps
@@ -117,6 +144,13 @@ interface PlatformCommerceRefundedData {
117
144
  /** `"usd"` (card) or the literal `"currency"` (balance). */
118
145
  amount_unit: string;
119
146
  fee_retained: boolean;
147
+ /**
148
+ * Merchant of Record accounts only (card refunds): the REFUND receipt INVO issued to the
149
+ * buyer. Absent on Open accounts, and while a refund is still pending.
150
+ */
151
+ receipt_number?: string;
152
+ /** Merchant of Record only: link to the printable refund receipt page. */
153
+ receipt_url?: string;
120
154
  [key: string]: unknown;
121
155
  }
122
156
  interface TransferEventData {
@@ -257,6 +291,13 @@ interface SubscriptionRenewedData {
257
291
  split: SubscriptionRenewalSplit;
258
292
  revenue_share_attribution: SubscriptionRevenueShareAttribution | null;
259
293
  metadata: Record<string, unknown> | null;
294
+ /**
295
+ * Merchant of Record accounts only (card sales): the receipt INVO issued to the buyer.
296
+ * Absent on Open accounts and storefront rails.
297
+ */
298
+ receipt_number?: string;
299
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
300
+ receipt_url?: string;
260
301
  [key: string]: unknown;
261
302
  }
262
303
  /**
@@ -416,6 +457,13 @@ interface SubscriptionRefundedData {
416
457
  refund_request_id?: string | null;
417
458
  /** Additive (2026-09-17). `true` when this refund cancelled the subscription. */
418
459
  subscription_canceled?: boolean;
460
+ /**
461
+ * Merchant of Record accounts only (card refunds): the REFUND receipt INVO issued to the
462
+ * buyer. Absent on Open accounts, and while a refund is still pending.
463
+ */
464
+ receipt_number?: string;
465
+ /** Merchant of Record only: link to the printable refund receipt page. */
466
+ receipt_url?: string;
419
467
  [key: string]: unknown;
420
468
  }
421
469
  /**
@@ -1050,7 +1098,7 @@ declare class InvoServer {
1050
1098
  * - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
1051
1099
  * - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
1052
1100
  *
1053
- * INVO's card fee (3.5% + $0.30, never less than the card cost). Two shapes, chosen by
1101
+ * INVO's card fee (3.5% + $0.30 on Open, 5% + $0.30 on Merchant of Record, never less than the card cost). Two shapes, chosen by
1054
1102
  * what you send:
1055
1103
  * - with `acknowledgedTotalUsd` (the `totalUsd` from {@link quoteCurrencyPurchase}): the
1056
1104
  * card is charged that total and the coins are priced off `usdAmount`. A total that no
@@ -1068,7 +1116,7 @@ declare class InvoServer {
1068
1116
  * creates nothing, so it is safe to call on every price render (`POST
1069
1117
  * /api/currency-purchases/quote`, authenticated by your game secret like the purchase).
1070
1118
  *
1071
- * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price, never less than the
1119
+ * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price on the Open tier (5% + $0.30 on Merchant of Record), never less than the
1072
1120
  * card cost. `totalUsd` is the price plus that fee (plus any tax, when you pass `country`):
1073
1121
  * $10.00 quotes a $10.65 total. Show the player `totalUsd`, then send the same figure back
1074
1122
  * as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the card is charged exactly that
@@ -1081,7 +1129,11 @@ declare class InvoServer {
1081
1129
  * maximum), `400 CURRENCY_NOT_CONFIGURED`, `503 RATE_UNAVAILABLE`.
1082
1130
  */
1083
1131
  quoteCurrencyPurchase(input: CurrencyPurchaseQuoteInput, opts?: CallOptions): Promise<CurrencyPurchaseQuote>;
1084
- /** Complete the card-rail 3-D Secure step after the client finished card action. */
1132
+ /**
1133
+ * Complete the card-rail 3-D Secure step after the client finished card action.
1134
+ * `status: "success"` means the payment succeeded; tell the buyer the purchase is complete
1135
+ * only when `credited` is `true` (see {@link ConfirmPaymentResult.credited}).
1136
+ */
1085
1137
  confirmPayment(input: {
1086
1138
  paymentIntentId: string;
1087
1139
  orderId?: string;
package/dist/server.js CHANGED
@@ -1,9 +1,9 @@
1
- import { InvoError, assertSecureBaseUrl, Http, toDestinationsResult } from './chunk-NJIZMM4H.js';
2
- export { InvoError } from './chunk-NJIZMM4H.js';
1
+ import { InvoError, receiptFields, assertSecureBaseUrl, Http, creditFields, toDestinationsResult } from './chunk-BLY4NUMG.js';
2
+ export { InvoError } from './chunk-BLY4NUMG.js';
3
3
  import { createHmac, timingSafeEqual } from 'crypto';
4
4
 
5
5
  // src/version.ts
6
- var SDK_VERSION = "3.13.0";
6
+ var SDK_VERSION = "3.14.1";
7
7
 
8
8
  // src/shared/types.ts
9
9
  function isRefundPendingApproval(r) {
@@ -280,6 +280,7 @@ function toOrderDetails(raw) {
280
280
  order: raw["order"] ?? {},
281
281
  financialSummary: raw["financial_summary"] ?? {},
282
282
  statusTimeline: raw["status_timeline"] ?? null,
283
+ ...receiptFields(raw),
283
284
  raw
284
285
  };
285
286
  }
@@ -660,6 +661,7 @@ var PlatformCommerceServer = class {
660
661
  usdAmount: raw["usd_amount"] ?? null,
661
662
  paymentMethod: raw["payment_method"],
662
663
  createdAt: raw["created_at"],
664
+ ...receiptFields(raw),
663
665
  raw
664
666
  };
665
667
  }
@@ -683,6 +685,8 @@ var PlatformCommerceServer = class {
683
685
  if (hasOrder) body["order_id"] = input.orderId;
684
686
  else body["client_request_id"] = input.clientRequestId;
685
687
  if (input.reason) body["reason"] = input.reason;
688
+ if (input.refundRemaining === true) body["refund_remaining"] = true;
689
+ if (input.confirmAdditionalRefund === true) body["confirm_additional_refund"] = true;
686
690
  const raw = await this.http.post(
687
691
  "/api/platform-commerce/refund",
688
692
  body,
@@ -708,6 +712,12 @@ var PlatformCommerceServer = class {
708
712
  // alongside the vendor-named one for exactly this reason.
709
713
  processorRefundId: raw["processor_refund_reference"] ?? raw["stripe_refund_id"],
710
714
  feeRetained: raw["fee_retained"] === true,
715
+ // Refunds in parts only (absent on a one-shot full refund).
716
+ ...typeof raw["partial_refund"] === "boolean" ? { partialRefund: raw["partial_refund"] } : {},
717
+ ...raw["adopted"] === true ? { adopted: true } : {},
718
+ ...raw["refunded_total_usd"] != null ? { refundedTotalUsd: String(raw["refunded_total_usd"]) } : {},
719
+ ...raw["charge_total_usd"] != null ? { chargeTotalUsd: String(raw["charge_total_usd"]) } : {},
720
+ ...raw["remaining_usd"] != null ? { remainingUsd: String(raw["remaining_usd"]) } : {},
711
721
  raw
712
722
  };
713
723
  }
@@ -893,6 +903,7 @@ function toFirstCharge(row) {
893
903
  confirmationUrl: nullableString(r["confirmation_url"]),
894
904
  expiresAt: nullableString(r["expires_at"]),
895
905
  message: nullableString(r["message"]),
906
+ ...receiptFields(r),
896
907
  raw: r
897
908
  };
898
909
  }
@@ -1890,7 +1901,7 @@ var InvoServer = class {
1890
1901
  * - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
1891
1902
  * - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
1892
1903
  *
1893
- * INVO's card fee (3.5% + $0.30, never less than the card cost). Two shapes, chosen by
1904
+ * INVO's card fee (3.5% + $0.30 on Open, 5% + $0.30 on Merchant of Record, never less than the card cost). Two shapes, chosen by
1894
1905
  * what you send:
1895
1906
  * - with `acknowledgedTotalUsd` (the `totalUsd` from {@link quoteCurrencyPurchase}): the
1896
1907
  * card is charged that total and the coins are priced off `usdAmount`. A total that no
@@ -1955,6 +1966,7 @@ var InvoServer = class {
1955
1966
  feeTakenFrom: optionalDecimalString(raw["fee_taken_from"]),
1956
1967
  coinsCredited: optionalDecimalString(raw["coins_credited"]),
1957
1968
  chargeTotalUsd: optionalDecimalString(raw["charge_total_usd"]),
1969
+ ...receiptFields(raw),
1958
1970
  raw
1959
1971
  };
1960
1972
  }
@@ -1963,7 +1975,7 @@ var InvoServer = class {
1963
1975
  * creates nothing, so it is safe to call on every price render (`POST
1964
1976
  * /api/currency-purchases/quote`, authenticated by your game secret like the purchase).
1965
1977
  *
1966
- * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price, never less than the
1978
+ * INVO's card fee on a coin purchase is 3.5% + $0.30 of the price on the Open tier (5% + $0.30 on Merchant of Record), never less than the
1967
1979
  * card cost. `totalUsd` is the price plus that fee (plus any tax, when you pass `country`):
1968
1980
  * $10.00 quotes a $10.65 total. Show the player `totalUsd`, then send the same figure back
1969
1981
  * as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the card is charged exactly that
@@ -1992,7 +2004,11 @@ var InvoServer = class {
1992
2004
  );
1993
2005
  return toCurrencyPurchaseQuote(raw);
1994
2006
  }
1995
- /** Complete the card-rail 3-D Secure step after the client finished card action. */
2007
+ /**
2008
+ * Complete the card-rail 3-D Secure step after the client finished card action.
2009
+ * `status: "success"` means the payment succeeded; tell the buyer the purchase is complete
2010
+ * only when `credited` is `true` (see {@link ConfirmPaymentResult.credited}).
2011
+ */
1996
2012
  async confirmPayment(input, opts) {
1997
2013
  const body = { payment_intent_id: input.paymentIntentId };
1998
2014
  if (input.orderId) body["order_id"] = input.orderId;
@@ -2007,6 +2023,7 @@ var InvoServer = class {
2007
2023
  status: String(raw["status"] ?? ""),
2008
2024
  transactionId: raw["transaction_id"],
2009
2025
  newBalance: raw["new_balance"] ?? null,
2026
+ ...creditFields(raw),
2010
2027
  raw
2011
2028
  };
2012
2029
  }
@@ -2170,6 +2187,7 @@ var InvoServer = class {
2170
2187
  transactionId: raw["transaction_id"] ?? void 0,
2171
2188
  newBalance: raw["new_balance"] ?? null,
2172
2189
  alreadyProcessed: raw["already_processed"] === true,
2190
+ ...creditFields(raw),
2173
2191
  raw
2174
2192
  };
2175
2193
  }
@@ -329,6 +329,25 @@ declare class InvoError extends Error {
329
329
  * success, not a failure to retry-loop.
330
330
  */
331
331
  get isAlreadyRefunded(): boolean;
332
+ /**
333
+ * Platform Commerce card sale already refunded in part (409
334
+ * `REFUND_REMAINING_REQUIRES_CONFIRMATION`): nothing moved. Retry with
335
+ * `refundRemaining: true` to refund the rest; `refunded_total_usd` and `remaining_usd` are
336
+ * on `err.body`.
337
+ */
338
+ get isRefundRemainingRequiresConfirmation(): boolean;
339
+ /**
340
+ * A Platform Commerce refund of this order was applied in the last 120 seconds (409
341
+ * `REFUND_RECENTLY_ISSUED`): nothing moved. Re-read the order; send
342
+ * `confirmAdditionalRefund: true` to refund anyway.
343
+ */
344
+ get isRefundRecentlyIssued(): boolean;
345
+ /**
346
+ * The Platform Commerce card refund failed, was canceled or still needs an action (502
347
+ * `REFUND_NOT_COMPLETED`): nothing was recorded. Retry; a refund that was in fact created
348
+ * is found and recorded on the retry, never issued twice.
349
+ */
350
+ get isRefundNotCompleted(): boolean;
332
351
  /**
333
352
  * True when an approve / confirm-receipt was refused because the transaction is no
334
353
  * longer awaiting that step (`TRANSACTION_NOT_PENDING`, 400). `approveWithDeviceCode`
@@ -873,6 +892,18 @@ interface PurchaseResult {
873
892
  coinsCredited?: string;
874
893
  /** What the card was charged, decimal string (fee and any tax included). Present on a `success` response. */
875
894
  chargeTotalUsd?: string;
895
+ /**
896
+ * Merchant of Record accounts only: the number of the receipt INVO issued to the buyer for
897
+ * this card sale (for example `"IR-2026-00000123"`; `"IRS-..."` on the sandbox). Absent on
898
+ * Open accounts, on storefront rails, and until the receipt has been issued.
899
+ */
900
+ receiptNumber?: string;
901
+ /**
902
+ * Merchant of Record accounts only: a link to the printable receipt page (no login). Anyone
903
+ * with the link can read the receipt, so treat it like the receipt itself. Absent whenever
904
+ * `receiptNumber` is.
905
+ */
906
+ receiptUrl?: string;
876
907
  raw: Record<string, unknown>;
877
908
  }
878
909
  /**
@@ -899,6 +930,11 @@ interface CurrencyPurchaseQuoteInput {
899
930
  interface CurrencyPurchaseQuoteBreakdown {
900
931
  subtotalUsd: string;
901
932
  taxUsd: string;
933
+ /**
934
+ * Why the tax is what it is. `"partner_responsible"` on an Open-tier account (you are the
935
+ * seller; INVO charged no tax). On Merchant of Record, how INVO handled it (for example
936
+ * `"collected"`). Treat an unknown value as informational.
937
+ */
902
938
  taxTreatment: string | null;
903
939
  /** A sentence you can show as is. */
904
940
  taxNote: string;
@@ -934,7 +970,10 @@ interface CurrencyPurchaseQuote {
934
970
  amountCents: number;
935
971
  /** The listed price (your `usdAmount`). */
936
972
  subtotalUsd: string;
937
- /** INVO's card fee on top of the price: 3.5% + $0.30, never less than the card cost. */
973
+ /**
974
+ * INVO's card fee on top of the price: 3.5% + $0.30 on the Open tier (5% + $0.30 on
975
+ * Merchant of Record), never less than the card cost. Read the figure; do not recompute it.
976
+ */
938
977
  processingFeeUsd: string;
939
978
  /** Coins the player receives on an acknowledged purchase. */
940
979
  coins: string;
@@ -949,9 +988,27 @@ interface CurrencyPurchaseQuote {
949
988
  raw: Record<string, unknown>;
950
989
  }
951
990
  interface ConfirmPaymentResult {
991
+ /** `"success"` whenever the payment succeeded (unchanged). Read `credited` for the coins. */
952
992
  status: string;
953
993
  transactionId?: string;
954
994
  newBalance?: string | number | null;
995
+ /**
996
+ * Additive (backends from 2026-09-24). `status: "success"` means the PAYMENT succeeded; it
997
+ * does not by itself mean the coins were added. `true`: the coins are in the balance (added
998
+ * by this call or an earlier one). `false`: the payment succeeded and the coins were NOT
999
+ * added: see `reasonCode`. Report a completed purchase only when this is `true`. `undefined`
1000
+ * on an older backend: fall back to the order status (`getOrderDetails`).
1001
+ */
1002
+ credited?: boolean;
1003
+ /**
1004
+ * Present when `credited` is `false`. A `CREDIT_REFUSED_*` code (for example
1005
+ * `"CREDIT_REFUSED_MINT_CEILING"`) means the buyer's money was taken and no coins were added:
1006
+ * INVO is alerted, and the buyer must NOT be asked to pay again. `"REFUNDED"` or
1007
+ * `"CHARGEBACK_LOST"` means the payment went back to the buyer. `null` means the credit is
1008
+ * still being finished: poll `getOrderDetails` until the order is `completed`. `undefined`
1009
+ * when `credited` is not `false`.
1010
+ */
1011
+ reasonCode?: string | null;
955
1012
  raw: Record<string, unknown>;
956
1013
  }
957
1014
  /** Shape of the order-details reads (currency purchase + item purchase). */
@@ -959,6 +1016,13 @@ interface OrderDetailsResult {
959
1016
  order: Record<string, unknown>;
960
1017
  financialSummary: Record<string, unknown>;
961
1018
  statusTimeline: unknown;
1019
+ /**
1020
+ * Currency purchases on a Merchant of Record account only: the receipt INVO issued to the
1021
+ * buyer, once issued. Absent on Open, on storefront rails and on item purchases.
1022
+ */
1023
+ receiptNumber?: string;
1024
+ /** Merchant of Record only: link to the printable receipt page. Anyone with it can read it. */
1025
+ receiptUrl?: string;
962
1026
  raw: Record<string, unknown>;
963
1027
  }
964
1028
  interface ItemHistoryResult {
@@ -1056,7 +1120,7 @@ interface SteamFinalizeInput {
1056
1120
  orderId: string;
1057
1121
  }
1058
1122
  interface SteamFinalizeResult {
1059
- /** "success" once captured and credited. */
1123
+ /** `"success"` once Steam captured the payment (unchanged). Read `credited` for the currency. */
1060
1124
  status: string;
1061
1125
  orderId?: string;
1062
1126
  transactionId?: string;
@@ -1068,9 +1132,27 @@ interface SteamFinalizeResult {
1068
1132
  * balance from the original success, or from `playerBalance()` if you need
1069
1133
  * it fresh. (Documented wrong as "the current balance" until the audit
1070
1134
  * checked the replay body against the backend, which returns only
1071
- * status/order/transaction ids.)
1135
+ * status/order/transaction ids.) Also `true` whenever this call added nothing, including a
1136
+ * refused credit, so read `credited` rather than this.
1072
1137
  */
1073
1138
  alreadyProcessed: boolean;
1139
+ /**
1140
+ * Additive (backends from 2026-09-24). `status: "success"` means the PAYMENT succeeded; it
1141
+ * does not by itself mean the coins were added. `true`: the coins are in the balance (added
1142
+ * by this call or an earlier one). `false`: the payment succeeded and the coins were NOT
1143
+ * added: see `reasonCode`. Report a completed purchase only when this is `true`. `undefined`
1144
+ * on an older backend: fall back to the order status (`getOrderDetails`).
1145
+ */
1146
+ credited?: boolean;
1147
+ /**
1148
+ * Present when `credited` is `false`. A `CREDIT_REFUSED_*` code (for example
1149
+ * `"CREDIT_REFUSED_MINT_CEILING"`) means the buyer's money was taken and no coins were added:
1150
+ * INVO is alerted, and the buyer must NOT be asked to pay again. `"REFUNDED"` or
1151
+ * `"CHARGEBACK_LOST"` means the payment went back to the buyer. `null` means the credit is
1152
+ * still being finished: poll `getOrderDetails` until the order is `completed`. `undefined`
1153
+ * when `credited` is not `false`.
1154
+ */
1155
+ reasonCode?: string | null;
1074
1156
  raw: Record<string, unknown>;
1075
1157
  }
1076
1158
  interface PurchaseItemInput {
@@ -1186,6 +1268,18 @@ interface PlatformOrderStatusResult {
1186
1268
  usdAmount?: string | number | null;
1187
1269
  paymentMethod?: string;
1188
1270
  createdAt?: string;
1271
+ /**
1272
+ * Merchant of Record accounts only: the number of the receipt INVO issued to the buyer for
1273
+ * this card sale (for example `"IR-2026-00000123"`; `"IRS-..."` on the sandbox). Absent on
1274
+ * Open accounts, on storefront rails, and until the receipt has been issued.
1275
+ */
1276
+ receiptNumber?: string;
1277
+ /**
1278
+ * Merchant of Record accounts only: a link to the printable receipt page (no login). Anyone
1279
+ * with the link can read the receipt, so treat it like the receipt itself. Absent whenever
1280
+ * `receiptNumber` is.
1281
+ */
1282
+ receiptUrl?: string;
1189
1283
  raw: Record<string, unknown>;
1190
1284
  }
1191
1285
  interface PlatformRefundInput {
@@ -1193,6 +1287,18 @@ interface PlatformRefundInput {
1193
1287
  orderId?: string | number;
1194
1288
  clientRequestId?: string;
1195
1289
  reason?: string;
1290
+ /**
1291
+ * Card sale already refunded in part: refund what is left. Sent only when `true`. Without
1292
+ * it such a refund is refused with 409 `REFUND_REMAINING_REQUIRES_CONFIRMATION`
1293
+ * (`err.isRefundRemainingRequiresConfirmation`).
1294
+ */
1295
+ refundRemaining?: boolean;
1296
+ /**
1297
+ * Refund anyway within 120 seconds of the order's last refund. Sent only when `true`.
1298
+ * Without it such a refund is refused with 409 `REFUND_RECENTLY_ISSUED`
1299
+ * (`err.isRefundRecentlyIssued`).
1300
+ */
1301
+ confirmAdditionalRefund?: boolean;
1196
1302
  }
1197
1303
  interface PlatformRefundResult {
1198
1304
  /** "refunded" on success. A second refund of the same order throws a 409
@@ -1214,6 +1320,20 @@ interface PlatformRefundResult {
1214
1320
  processorRefundId?: string;
1215
1321
  /** Always true — INVO retains its fee; the customer is made whole minus that fee. */
1216
1322
  feeRetained?: boolean;
1323
+ /**
1324
+ * Card sale refunded in parts only (absent on a one-shot full refund): `true` while part
1325
+ * of the charge is still refundable, `false` on the refund that completes it.
1326
+ * `refundedAmount` and the other figures are then this refund's own share.
1327
+ */
1328
+ partialRefund?: boolean;
1329
+ /** Present and `true` only when this call recorded a refund that already existed; no new money moved. */
1330
+ adopted?: boolean;
1331
+ /** Refunds in parts only: the USD refunded on this order so far, this refund included. */
1332
+ refundedTotalUsd?: string;
1333
+ /** Refunds in parts only: the whole card charge, USD. */
1334
+ chargeTotalUsd?: string;
1335
+ /** Present only while something is left: the USD still refundable (send `refundRemaining: true`). */
1336
+ remainingUsd?: string;
1217
1337
  raw: Record<string, unknown>;
1218
1338
  }
1219
1339
  interface MountCheckoutOptions {
@@ -1991,6 +2111,18 @@ interface FirstCharge {
1991
2111
  confirmationUrl: string | null;
1992
2112
  expiresAt: string | null;
1993
2113
  message: string | null;
2114
+ /**
2115
+ * Merchant of Record accounts only: the number of the receipt INVO issued to the buyer for
2116
+ * this paid first period (for example `"IR-2026-00000123"`; `"IRS-..."` on the sandbox). Absent on
2117
+ * Open accounts, on storefront rails, and until the receipt has been issued.
2118
+ */
2119
+ receiptNumber?: string;
2120
+ /**
2121
+ * Merchant of Record accounts only: a link to the printable receipt page (no login). Anyone
2122
+ * with the link can read the receipt, so treat it like the receipt itself. Absent whenever
2123
+ * `receiptNumber` is.
2124
+ */
2125
+ receiptUrl?: string;
1994
2126
  raw: Record<string, unknown>;
1995
2127
  }
1996
2128
  /** Fields shared by `subscriptions.create` and `subscriptions.steamInit`. */
@@ -2661,6 +2793,18 @@ interface PurchaseStatusResult {
2661
2793
  listedUsd: string | null;
2662
2794
  /** What the coins are called in this game, for your own copy. */
2663
2795
  currencyName: string | null;
2796
+ /**
2797
+ * Merchant of Record accounts only: the number of the receipt INVO issued to the buyer for
2798
+ * this card sale (for example `"IR-2026-00000123"`; `"IRS-..."` on the sandbox). Absent on
2799
+ * Open accounts, on storefront rails, on every status but `credited`, and until the receipt has been issued.
2800
+ */
2801
+ receiptNumber?: string;
2802
+ /**
2803
+ * Merchant of Record accounts only: a link to the printable receipt page (no login). Anyone
2804
+ * with the link can read the receipt, so treat it like the receipt itself. Absent whenever
2805
+ * `receiptNumber` is.
2806
+ */
2807
+ receiptUrl?: string;
2664
2808
  raw: Record<string, unknown>;
2665
2809
  }
2666
2810
  /** A {@link PurchaseStatusResult} narrowed by {@link isPurchaseCredited}. */