@invonetwork/web-sdk 3.18.0 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +11 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/server.cjs +7 -2
- package/dist/server.d.cts +48 -14
- package/dist/server.d.ts +48 -14
- package/dist/server.js +7 -2
- package/dist/{types-BnnVi5ws.d.cts → types-CCqgVhzf.d.cts} +25 -4
- package/dist/{types-BnnVi5ws.d.ts → types-CCqgVhzf.d.ts} +25 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6940139: D-PRICE-012: a subscription card refund, and a lost chargeback not covered by the chargeback guarantee, now cost the partner the whole refunded amount, INVO's card fee included, exactly as a Platform Commerce card refund does. There is no separate payment processor fee on a refund any more: `processingFeeUsd` reads `"0.00"` and `processingFeeBasis` `"none"`.
|
|
8
|
+
|
|
9
|
+
Additive, optional fields:
|
|
10
|
+
|
|
11
|
+
- `RefundResult.cardFeeChargedToPartnerUsd` and `RefundResult.partnerDebitedUsd` on `subscriptions.refund` (the 200 receipt and the 202 `pending_approval` body). `undefined` on a receipt stored before this release.
|
|
12
|
+
- `card_fee_charged_to_partner_usd` and `partner_debited_usd` on the `refund` block of `subscription.refunded` (`SubscriptionRefundDetail`) and on `purchase.disputed` (`PurchaseEventData`, subscription and Platform Commerce losses; `null` where not applicable).
|
|
13
|
+
|
|
14
|
+
README: subscription refund costs, lost chargebacks and the "What did I earn?" answer updated.
|
|
15
|
+
|
|
3
16
|
## 3.18.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1134,9 +1134,10 @@ export const POST = createWebhookHandler({
|
|
|
1134
1134
|
case "subscription.expired": // the retry budget ran out (or a Steam row was never authorised)
|
|
1135
1135
|
await revokeAt(event.data.subscription_id, event.data.final_period_end); // NOT ended_at; null if nothing was ever paid
|
|
1136
1136
|
break; // failure_code "steam_containment" is no longer sent (spending is not restricted by origin)
|
|
1137
|
-
case "subscription.refunded": { // your revenue is reversed, plus
|
|
1138
|
-
const r = event.data.refund; // older events carry no partner_total_reversed_usd
|
|
1139
|
-
await recordReversal(event.data.subscription_id,
|
|
1137
|
+
case "subscription.refunded": { // your revenue is reversed, plus INVO's card fee on a card refund
|
|
1138
|
+
const r = event.data.refund; // older events carry no partner_debited_usd / partner_total_reversed_usd
|
|
1139
|
+
await recordReversal(event.data.subscription_id,
|
|
1140
|
+
r.partner_debited_usd ?? r.partner_total_reversed_usd ?? r.partner_revenue_reversed_usd);
|
|
1140
1141
|
break; // event.data.subscription_canceled: a full refund cancels (subscription.canceled is sent with it)
|
|
1141
1142
|
}
|
|
1142
1143
|
case "subscription.refund_requested": // a refund over your daily limit is waiting for INVO; nothing moved
|
|
@@ -1156,7 +1157,7 @@ export const POST = createWebhookHandler({
|
|
|
1156
1157
|
|---|---|
|
|
1157
1158
|
| Has the member paid for the period they are in? | `subscription.renewed` for that period, or `paidThrough` on `get` |
|
|
1158
1159
|
| Should I revoke access? | only on `subscription.expired` (at `final_period_end`) or `subscription.canceled` (at `access_until`); **never** on `payment_failed`, `past_due` or `authentication_required` |
|
|
1159
|
-
| What did I earn? | `split.partner_revenue_usd` on `subscription.renewed`, minus `split.international_card_fee_usd` (the same figure as `split.pass_through_fees_usd`; subtract it once), minus `refund.
|
|
1160
|
+
| What did I earn? | `split.partner_revenue_usd` on `subscription.renewed`, minus `split.international_card_fee_usd` (the same figure as `split.pass_through_fees_usd`; subtract it once), minus `refund.partner_debited_usd` (revenue reversed plus INVO's card fee: the whole refunded price) on any `subscription.refunded`; on refunds before 2026-09-28, `refund.partner_total_reversed_usd`, and before 2026-09-17, which carry neither, `refund.partner_revenue_reversed_usd`; minus `partner_debited_usd` on a lost chargeback (`purchase.disputed`) |
|
|
1160
1161
|
| Should I grant anything on a renewal's `purchase.completed`? | **No.** Every paid card renewal also sends `purchase.completed` (`data.metadata.source === "subscription_renewal"`) for the coins its charge minted, and the renewal spends them in the same step. Act on `subscription.renewed`. The two share the mint order id: `order_id` there is `mint_order_id` here |
|
|
1161
1162
|
| Did a refund end the subscription? | `subscription_canceled` on `subscription.refunded`, and the `subscription.canceled` sent with it (`cancel_cause: "full_refund"`; the two are sent together and may arrive in any order) |
|
|
1162
1163
|
|
|
@@ -1204,7 +1205,8 @@ if (isRefundPendingApproval(r)) { // narrows r; status =
|
|
|
1204
1205
|
// r.status === "refunded". r.isFullRefund, r.fundingShape ("card" for every card period since 2026-09-17),
|
|
1205
1206
|
// r.cardRefundedUsd (card-only periods: equals the amount, partial included), r.balanceDeltaCoins,
|
|
1206
1207
|
// r.partnerRevenueReversedUsd (your revenue reversed; INVO's fee is retained),
|
|
1207
|
-
// r.
|
|
1208
|
+
// r.cardFeeChargedToPartnerUsd (INVO's card fee on the refunded part, charged to you),
|
|
1209
|
+
// r.partnerDebitedUsd (the two together: the whole refunded price), r.processingFeeUsd ("0.00" since 2026-09-28),
|
|
1208
1210
|
// r.subscriptionCanceled (a full refund cancels the subscription), r.idempotentReplay on a repeat,
|
|
1209
1211
|
// r.revenueShareAttribution?.netAttributedAmountUsd (the corrected figure to pay your recipient).
|
|
1210
1212
|
}
|
|
@@ -1216,7 +1218,8 @@ for (const w of r.warnings ?? []) log(w.code); // "REASON_RECOMMENDED"
|
|
|
1216
1218
|
**What else happens.**
|
|
1217
1219
|
|
|
1218
1220
|
- **A full refund cancels the subscription** immediately (`subscriptionCanceled: true`, `subscriptionStatus: "canceled"`), and you receive `subscription.canceled` (`canceled_by: "partner"`, `cancel_cause: "full_refund"`) together with `subscription.refunded`; the two are sent together and may arrive in any order. A partial refund leaves it live. Before 2026-09-17 a full refund did not cancel.
|
|
1219
|
-
- **You bear the card
|
|
1221
|
+
- **You bear the whole refunded amount, INVO's card fee included** (since 2026-09-28), on any refund that returns money to a card, exactly as on a Platform Commerce card refund: your revenue is reversed and INVO's card fee on the refunded part is deducted from your revenue as its own line (`cardFeeChargedToPartnerUsd`). Across partial refunds of one charge it adds up to exactly INVO's fee on it. `partnerDebitedUsd` (and `partnerTotalReversedUsd`, the same value) is the two together, which equals the refunded price before tax. There is no separate payment processor fee: `processingFeeUsd` reads `"0.00"` (`processingFeeBasis: "none"`). The 1.5% international card fee is not returned. A coin refund has no fee. Example, Open tier, US card: a $9.99 period refunded in full reverses $9.24 of revenue and charges the $0.75 card fee, a $9.99 debit; a $100 period leaves you at -$4.80 (-$6.30 on a card issued outside the US). A receipt stored before 2026-09-28 (a replay) carries neither new field.
|
|
1222
|
+
- **A lost chargeback costs what a refund does.** Not covered by the chargeback guarantee, it reverses your share and charges INVO's card fee on every charge (`purchase.disputed`: `card_fee_charged_to_partner_usd`, `partner_debited_usd`). A fraud chargeback the guarantee covers costs you nothing; the Open-tier dispute fee pass-through is unchanged.
|
|
1220
1223
|
- **INVO emails the member** when a refund executes (the amount, where it went, and whether the subscription ended). Your `reason` is not in that email.
|
|
1221
1224
|
- **Refunds of periods charged through Steam are not supported yet**: `409 STEAM_REFUND_NOT_SUPPORTED` (`err.isSteamRefundNotSupported`); periods of a Steam subscription that the wallet covered entirely are refundable in coins.
|
|
1222
1225
|
|
|
@@ -2177,7 +2180,7 @@ export const POST = createWebhookHandler({
|
|
|
2177
2180
|
|---|---|---|
|
|
2178
2181
|
| `purchase.completed` | every currency-purchase rail, **and every paid card subscription renewal** | grant currency (payload: `transaction_id, order_id, player_email, identity_id, usd_amount, currency_amount, currency_name, new_balance, rail`, `metadata`). `metadata` echoes what you passed to `createCheckout`/`purchaseCurrency` (all rails); `order_id` is also on every webhook as a secondary reconciliation key (`getOrderDetails`). Card purchases also carry `partner_fee_usd` and `international_card_fee_usd`, the card fees charged to you (the player paid the listed price). **Skip it when `metadata.source` is `"subscription_renewal"`**: those coins are spent by the renewal itself; grant on `subscription.renewed`. |
|
|
2179
2182
|
| `purchase.failed` | `platform` rail only | handle failures |
|
|
2180
|
-
| `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would:
|
|
2183
|
+
| `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would: your share is reversed and INVO's card fee stays charged to you, on a Platform Commerce sale and on every subscription charge (`card_fee_charged_to_partner_usd`, and `partner_debited_usd` = share reversed plus that fee, since 2026-09-28). A subscription dispute also carries `processing_fee_usd`, which reads `"0.00"`. Coin purchase disputes carry none of these keys: a lost one takes back the player's coins, not your share. A Steam chargeback carries the same keys as a lost card dispute with `payment_intent_id`, `charge_id` and `dispute_id` `null`, plus `rail: "steam"` and `steam_transid`. **If you revoke on `purchase.refunded`, handle this too:** a Steam chargeback no longer arrives as `purchase.refunded` |
|
|
2181
2184
|
| `purchase.refunded` | `game` / `steam` rails | handle refunds. Only coins the player still has from that purchase are taken back, never below zero. A Steam partial refund carries `fully_refunded: false` |
|
|
2182
2185
|
| `item.purchased` | every item purchase | **grant the in-game item** (payload includes `transaction_id, order_id, player_email, identity_id, item_id, item_name, item_quantity, unit_price, total_price, currency_name, new_balance, fee_breakdown`) |
|
|
2183
2186
|
| `platform_commerce.purchased` | every Platform Commerce purchase (balance immediately; **card after payment settles**) | **fulfill the ecommerce order** — never on the browser confirm (payload: `transaction_id, order_id, funding_source, player_email, identity_id, item_id, item_name, item_quantity, total_price`; + `unit_price, currency_name, new_balance` on balance; `total_price_usd` on card; `fee_breakdown`) |
|
|
@@ -2187,7 +2190,7 @@ export const POST = createWebhookHandler({
|
|
|
2187
2190
|
| `subscription.authentication_required` | a card issuer wants the cardholder to authenticate (card rail) | **not a failure** — relay `confirmation_url` before `expires_at` |
|
|
2188
2191
|
| `subscription.canceled` | a cancel request (yours, or the member's from Steam: `canceled_by`), or a full refund (`cancel_cause: "full_refund"`) | revoke at `access_until` |
|
|
2189
2192
|
| `subscription.expired` | the retry budget ran out, or a Steam row was never authorised (`steam_authorization_abandoned`). `steam_containment` is **no longer returned**: spending is not restricted by which rail bought the currency | **revoke at `final_period_end`** (not `ended_at`; `null` if nothing was ever paid) |
|
|
2190
|
-
| `subscription.refunded` | a period refund | record the reversal (`refund.
|
|
2193
|
+
| `subscription.refunded` | a period refund | record the reversal (`refund.partner_debited_usd` = revenue reversed plus INVO's card fee, the whole refunded price; `refund.card_fee_charged_to_partner_usd`; `refund.partner_total_reversed_usd`, the same value as `partner_debited_usd`; `refund.partner_revenue_reversed_usd`, `refund.processing_fee_usd` (`"0.00"` since 2026-09-28), `is_full_refund`, `subscription_canceled`, `initiation`, `refund_request_id`, `revenue_share_attribution`) |
|
|
2191
2194
|
| `subscription.refund_requested` / `subscription.refund_approved` / `subscription.refund_rejected` | a refund over the game's daily self-serve limit became a request / INVO approved it (sent together with `subscription.refunded`, and `subscription.canceled` on a full refund, in any order) / INVO rejected it | track the request (`request_id, status, subscription_id, item_id, period_seq, client_request_id, amount_usd, reason, requested_at, daily_cap_usd, executed_today_usd, player_email, identity_id, metadata`; approved adds `decided_at, transaction_id`; rejected adds `decided_at, decision_reason`) |
|
|
2192
2195
|
| `transfer.received` / `transfer.claim_expired` / `transfer.refunded` | sends & transfers | reconcile claim state — credited to the recipient (by any claim path, the hosted claim page included) / not collected within 24h / returned to the sender |
|
|
2193
2196
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-
|
|
1
|
+
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-CCqgVhzf.cjs';
|
|
2
|
+
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-CCqgVhzf.cjs';
|
|
3
3
|
|
|
4
4
|
/** The four device-approval flows (`begin.flow`). */
|
|
5
5
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-
|
|
1
|
+
import { A as ApproveResult, C as ConfirmReceiptResult, P as PurchaseStatusResult, a as PurchaseCredited, b as PurchaseExpired, c as PurchaseRefunded, d as PurchaseRefused, e as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, L as LinkDeviceResult, j as PendingCollectResult, D as DestinationsQuery, k as DestinationsResult, B as BalanceResult, E as EnrollmentBeginResult, l as EnrollmentVerifyResult, R as RecoveryBeginResult, m as RecoveryCompleteResult } from './types-CCqgVhzf.js';
|
|
2
|
+
export { n as BalanceRow, o as CheckoutPurchaseStatus, p as DestinationGame, I as InvoError, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, u as PendingCollectItem, v as PurchaseRefusalReason, w as Rail, V as VerificationMethod } from './types-CCqgVhzf.js';
|
|
3
3
|
|
|
4
4
|
/** The four device-approval flows (`begin.flow`). */
|
|
5
5
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
package/dist/server.cjs
CHANGED
|
@@ -1186,7 +1186,7 @@ function receiptFields(raw) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
1188
|
// src/version.ts
|
|
1189
|
-
var SDK_VERSION = "3.
|
|
1189
|
+
var SDK_VERSION = "3.19.0";
|
|
1190
1190
|
|
|
1191
1191
|
// src/shared/types.ts
|
|
1192
1192
|
function isRefundPendingApproval(r) {
|
|
@@ -2051,6 +2051,9 @@ function toRefundResult(raw, subscriptionId, clientRequestId) {
|
|
|
2051
2051
|
processingFeeBorneBy: optionalString(raw, "processing_fee_borne_by"),
|
|
2052
2052
|
processingFeeTransactionId: optionalString(raw, "processing_fee_transaction_id"),
|
|
2053
2053
|
partnerTotalReversedUsd: optionalString(raw, "partner_total_reversed_usd"),
|
|
2054
|
+
// ---- additive (2026-09-28, D-PRICE-012): undefined on a receipt stored before it ----
|
|
2055
|
+
cardFeeChargedToPartnerUsd: optionalString(raw, "card_fee_charged_to_partner_usd"),
|
|
2056
|
+
partnerDebitedUsd: optionalString(raw, "partner_debited_usd"),
|
|
2054
2057
|
initiation: optionalString(raw, "initiation"),
|
|
2055
2058
|
refundRequestId: optionalString(raw, "refund_request_id"),
|
|
2056
2059
|
raw
|
|
@@ -2577,7 +2580,9 @@ var SubscriptionsServer = class {
|
|
|
2577
2580
|
* and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
|
|
2578
2581
|
* credits coins. Your revenue is reversed for the refunded portion
|
|
2579
2582
|
* (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
|
|
2580
|
-
*
|
|
2583
|
+
* whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
|
|
2584
|
+
* `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
|
|
2585
|
+
* `processingFeeUsd` reads `"0.00"`). **A full refund
|
|
2581
2586
|
* cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
|
|
2582
2587
|
* with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
|
|
2583
2588
|
* order); a partial one does not. INVO emails the member.
|
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-
|
|
2
|
-
export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-
|
|
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-CCqgVhzf.cjs';
|
|
2
|
+
export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-CCqgVhzf.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.
|
|
9
|
+
declare const SDK_VERSION = "3.19.0";
|
|
10
10
|
|
|
11
11
|
interface VerifyWebhookOptions {
|
|
12
12
|
/** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
|
|
@@ -112,13 +112,26 @@ interface PurchaseEventData {
|
|
|
112
112
|
*/
|
|
113
113
|
developer_revenue_reversed_usd?: string | null;
|
|
114
114
|
/**
|
|
115
|
-
* Additive (2026-09-27), on a lost subscription purchase.disputed
|
|
116
|
-
*
|
|
117
|
-
* `
|
|
118
|
-
*
|
|
119
|
-
* card fee simply stays charged to you as on a refund). Absent on coin purchase disputes.
|
|
115
|
+
* Additive (2026-09-27), on a lost subscription purchase.disputed. Since 2026-09-28
|
|
116
|
+
* (D-PRICE-012) always `"0.00"`: a lost dispute charges INVO's card fee instead
|
|
117
|
+
* (`card_fee_charged_to_partner_usd`), not a separate processor fee. `null` where it does not
|
|
118
|
+
* apply (for example a Platform Commerce dispute). Absent on coin purchase disputes.
|
|
120
119
|
*/
|
|
121
120
|
processing_fee_usd?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Additive (2026-09-28, D-PRICE-012), on a lost Platform Commerce or subscription
|
|
123
|
+
* purchase.disputed: INVO's card fee on the lost amount, charged to you, USD decimal string.
|
|
124
|
+
* A lost dispute not covered by the chargeback guarantee costs you exactly what a refund of
|
|
125
|
+
* the same charge does, on every charge. `"0.00"` when the guarantee covered it; `null` where
|
|
126
|
+
* it does not apply (including a settlement replay). Absent on coin purchase disputes.
|
|
127
|
+
*/
|
|
128
|
+
card_fee_charged_to_partner_usd?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Additive (2026-09-28, D-PRICE-012), same events: your whole debit for the lost dispute,
|
|
131
|
+
* `developer_revenue_reversed_usd` plus `card_fee_charged_to_partner_usd`. `"0.00"` when the
|
|
132
|
+
* guarantee covered it; `null` where it does not apply.
|
|
133
|
+
*/
|
|
134
|
+
partner_debited_usd?: string | null;
|
|
122
135
|
/** On a lost subscription purchase.disputed: the subscription and period it concerns. */
|
|
123
136
|
subscription_id?: string | null;
|
|
124
137
|
period_seq?: number | null;
|
|
@@ -528,21 +541,40 @@ interface SubscriptionRefundDetail {
|
|
|
528
541
|
partner_revenue_reversed_usd: string;
|
|
529
542
|
/** "full" | "prorata". */
|
|
530
543
|
partner_revenue_reversal_mode: string;
|
|
531
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* Additive (2026-09-17). Since 2026-09-28 (D-PRICE-012) always `"0.00"`: a card refund charges
|
|
546
|
+
* INVO's card fee (`card_fee_charged_to_partner_usd`), not a separate processor fee. Older
|
|
547
|
+
* events carried the processor fee here.
|
|
548
|
+
*/
|
|
532
549
|
processing_fee_usd?: string;
|
|
533
|
-
/** Additive (2026-09-17). "actual" | "estimated" | "none". */
|
|
550
|
+
/** Additive (2026-09-17). "actual" | "estimated" | "none"; `"none"` since 2026-09-28. */
|
|
534
551
|
processing_fee_basis?: string;
|
|
535
552
|
/** Additive (2026-09-17). Always "partner". */
|
|
536
553
|
processing_fee_borne_by?: string;
|
|
537
|
-
/**
|
|
554
|
+
/**
|
|
555
|
+
* Additive (2026-09-17). Everything this refund took from your revenue; since 2026-09-28 the
|
|
556
|
+
* same value as `partner_debited_usd`.
|
|
557
|
+
*/
|
|
538
558
|
partner_total_reversed_usd?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you
|
|
561
|
+
* (the card fee is not returned on a refund). `"0.00"` on a coin refund. Absent on older events.
|
|
562
|
+
*/
|
|
563
|
+
card_fee_charged_to_partner_usd?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Additive (2026-09-28, D-PRICE-012). Your whole debit: `partner_revenue_reversed_usd` plus
|
|
566
|
+
* `card_fee_charged_to_partner_usd`, the refunded price before tax on a card refund. Absent on
|
|
567
|
+
* older events; read `partner_total_reversed_usd` there.
|
|
568
|
+
*/
|
|
569
|
+
partner_debited_usd?: string;
|
|
539
570
|
[key: string]: unknown;
|
|
540
571
|
}
|
|
541
572
|
/**
|
|
542
573
|
* `subscription.refunded`: its own shape. Your revenue for the refunded portion is
|
|
543
574
|
* reversed (`refund.partner_revenue_reversed_usd`); INVO's fee is retained; on a card refund
|
|
544
|
-
* you
|
|
545
|
-
* `refund.
|
|
575
|
+
* you bear the whole refunded amount, INVO's card fee included (`refund.card_fee_charged_to_partner_usd`,
|
|
576
|
+
* since 2026-09-28). "What did I earn" subtracts `refund.partner_debited_usd` (older events:
|
|
577
|
+
* `refund.partner_total_reversed_usd`, then `partner_revenue_reversed_usd`).
|
|
546
578
|
* A FULL refund cancels the subscription (`subscription_canceled: true`), and a
|
|
547
579
|
* `subscription.canceled` with `cancel_cause: "full_refund"` is sent with it (sent together and may arrive in any order).
|
|
548
580
|
* A partial one does not.
|
|
@@ -912,7 +944,9 @@ declare class SubscriptionsServer {
|
|
|
912
944
|
* and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
|
|
913
945
|
* credits coins. Your revenue is reversed for the refunded portion
|
|
914
946
|
* (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
|
|
915
|
-
*
|
|
947
|
+
* whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
|
|
948
|
+
* `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
|
|
949
|
+
* `processingFeeUsd` reads `"0.00"`). **A full refund
|
|
916
950
|
* cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
|
|
917
951
|
* with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
|
|
918
952
|
* order); a partial one does not. INVO emails the member.
|
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-
|
|
2
|
-
export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-
|
|
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-CCqgVhzf.js';
|
|
2
|
+
export { b3 as CardSetupStatus, b4 as CheckoutWarning, b5 as CurrencyBalance, b6 as CurrencyPurchaseQuoteBreakdown, p as DestinationGame, b7 as DeviceApprovalChannel, b8 as DeviceApprovalEnrollment, b9 as DeviceApprovalFlow, ba as DeviceApprovalPollStatus, bb as DeviceEnrollmentDecision, bc as DeviceEnrollmentRespond, bd as FeeTakenFrom, be as FirstCharge, bf as FirstChargeStatus, bg as FundingSource, bh as InboundPendingItem, q as InvoErrorInfo, r as InvoHooks, s as InvoRequestInfo, t as InvoResponseInfo, bi as LinkedIdentityEmail, bj as MinPurchaseWarning, bk as PlatformPurchaseStatus, w as Rail, bl as RefundInitiation, bm as RefundPendingApproval, bn as RefundProcessingFeeBasis, bo as RefundReceipt, bp as RefundRevenueShareAttribution, bq as RefundWarning, br as SandboxClockState, bs as SavedCard, bt as SteamPack, bu as SteamUserSession, bv as Subscription, bw as SubscriptionBaseInput, bx as SubscriptionConsent, by as SubscriptionConsentInput, bz as SubscriptionFundingRail, bA as SubscriptionInterval, bB as SubscriptionRevenueShare, bC as SubscriptionRevenueShareInput, bD as SubscriptionStatus, bE as UnacknowledgedPurchaseOutcome, V as VerificationMethod, bF as isRefundPendingApproval } from './types-CCqgVhzf.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.
|
|
9
|
+
declare const SDK_VERSION = "3.19.0";
|
|
10
10
|
|
|
11
11
|
interface VerifyWebhookOptions {
|
|
12
12
|
/** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
|
|
@@ -112,13 +112,26 @@ interface PurchaseEventData {
|
|
|
112
112
|
*/
|
|
113
113
|
developer_revenue_reversed_usd?: string | null;
|
|
114
114
|
/**
|
|
115
|
-
* Additive (2026-09-27), on a lost subscription purchase.disputed
|
|
116
|
-
*
|
|
117
|
-
* `
|
|
118
|
-
*
|
|
119
|
-
* card fee simply stays charged to you as on a refund). Absent on coin purchase disputes.
|
|
115
|
+
* Additive (2026-09-27), on a lost subscription purchase.disputed. Since 2026-09-28
|
|
116
|
+
* (D-PRICE-012) always `"0.00"`: a lost dispute charges INVO's card fee instead
|
|
117
|
+
* (`card_fee_charged_to_partner_usd`), not a separate processor fee. `null` where it does not
|
|
118
|
+
* apply (for example a Platform Commerce dispute). Absent on coin purchase disputes.
|
|
120
119
|
*/
|
|
121
120
|
processing_fee_usd?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Additive (2026-09-28, D-PRICE-012), on a lost Platform Commerce or subscription
|
|
123
|
+
* purchase.disputed: INVO's card fee on the lost amount, charged to you, USD decimal string.
|
|
124
|
+
* A lost dispute not covered by the chargeback guarantee costs you exactly what a refund of
|
|
125
|
+
* the same charge does, on every charge. `"0.00"` when the guarantee covered it; `null` where
|
|
126
|
+
* it does not apply (including a settlement replay). Absent on coin purchase disputes.
|
|
127
|
+
*/
|
|
128
|
+
card_fee_charged_to_partner_usd?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Additive (2026-09-28, D-PRICE-012), same events: your whole debit for the lost dispute,
|
|
131
|
+
* `developer_revenue_reversed_usd` plus `card_fee_charged_to_partner_usd`. `"0.00"` when the
|
|
132
|
+
* guarantee covered it; `null` where it does not apply.
|
|
133
|
+
*/
|
|
134
|
+
partner_debited_usd?: string | null;
|
|
122
135
|
/** On a lost subscription purchase.disputed: the subscription and period it concerns. */
|
|
123
136
|
subscription_id?: string | null;
|
|
124
137
|
period_seq?: number | null;
|
|
@@ -528,21 +541,40 @@ interface SubscriptionRefundDetail {
|
|
|
528
541
|
partner_revenue_reversed_usd: string;
|
|
529
542
|
/** "full" | "prorata". */
|
|
530
543
|
partner_revenue_reversal_mode: string;
|
|
531
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* Additive (2026-09-17). Since 2026-09-28 (D-PRICE-012) always `"0.00"`: a card refund charges
|
|
546
|
+
* INVO's card fee (`card_fee_charged_to_partner_usd`), not a separate processor fee. Older
|
|
547
|
+
* events carried the processor fee here.
|
|
548
|
+
*/
|
|
532
549
|
processing_fee_usd?: string;
|
|
533
|
-
/** Additive (2026-09-17). "actual" | "estimated" | "none". */
|
|
550
|
+
/** Additive (2026-09-17). "actual" | "estimated" | "none"; `"none"` since 2026-09-28. */
|
|
534
551
|
processing_fee_basis?: string;
|
|
535
552
|
/** Additive (2026-09-17). Always "partner". */
|
|
536
553
|
processing_fee_borne_by?: string;
|
|
537
|
-
/**
|
|
554
|
+
/**
|
|
555
|
+
* Additive (2026-09-17). Everything this refund took from your revenue; since 2026-09-28 the
|
|
556
|
+
* same value as `partner_debited_usd`.
|
|
557
|
+
*/
|
|
538
558
|
partner_total_reversed_usd?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you
|
|
561
|
+
* (the card fee is not returned on a refund). `"0.00"` on a coin refund. Absent on older events.
|
|
562
|
+
*/
|
|
563
|
+
card_fee_charged_to_partner_usd?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Additive (2026-09-28, D-PRICE-012). Your whole debit: `partner_revenue_reversed_usd` plus
|
|
566
|
+
* `card_fee_charged_to_partner_usd`, the refunded price before tax on a card refund. Absent on
|
|
567
|
+
* older events; read `partner_total_reversed_usd` there.
|
|
568
|
+
*/
|
|
569
|
+
partner_debited_usd?: string;
|
|
539
570
|
[key: string]: unknown;
|
|
540
571
|
}
|
|
541
572
|
/**
|
|
542
573
|
* `subscription.refunded`: its own shape. Your revenue for the refunded portion is
|
|
543
574
|
* reversed (`refund.partner_revenue_reversed_usd`); INVO's fee is retained; on a card refund
|
|
544
|
-
* you
|
|
545
|
-
* `refund.
|
|
575
|
+
* you bear the whole refunded amount, INVO's card fee included (`refund.card_fee_charged_to_partner_usd`,
|
|
576
|
+
* since 2026-09-28). "What did I earn" subtracts `refund.partner_debited_usd` (older events:
|
|
577
|
+
* `refund.partner_total_reversed_usd`, then `partner_revenue_reversed_usd`).
|
|
546
578
|
* A FULL refund cancels the subscription (`subscription_canceled: true`), and a
|
|
547
579
|
* `subscription.canceled` with `cancel_cause: "full_refund"` is sent with it (sent together and may arrive in any order).
|
|
548
580
|
* A partial one does not.
|
|
@@ -912,7 +944,9 @@ declare class SubscriptionsServer {
|
|
|
912
944
|
* and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
|
|
913
945
|
* credits coins. Your revenue is reversed for the refunded portion
|
|
914
946
|
* (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
|
|
915
|
-
*
|
|
947
|
+
* whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
|
|
948
|
+
* `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
|
|
949
|
+
* `processingFeeUsd` reads `"0.00"`). **A full refund
|
|
916
950
|
* cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
|
|
917
951
|
* with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
|
|
918
952
|
* order); a partial one does not. INVO emails the member.
|
package/dist/server.js
CHANGED
|
@@ -3,7 +3,7 @@ export { InvoError } from './chunk-YW2PYARQ.js';
|
|
|
3
3
|
import { createHmac, timingSafeEqual } from 'crypto';
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
|
-
var SDK_VERSION = "3.
|
|
6
|
+
var SDK_VERSION = "3.19.0";
|
|
7
7
|
|
|
8
8
|
// src/shared/types.ts
|
|
9
9
|
function isRefundPendingApproval(r) {
|
|
@@ -868,6 +868,9 @@ function toRefundResult(raw, subscriptionId, clientRequestId) {
|
|
|
868
868
|
processingFeeBorneBy: optionalString(raw, "processing_fee_borne_by"),
|
|
869
869
|
processingFeeTransactionId: optionalString(raw, "processing_fee_transaction_id"),
|
|
870
870
|
partnerTotalReversedUsd: optionalString(raw, "partner_total_reversed_usd"),
|
|
871
|
+
// ---- additive (2026-09-28, D-PRICE-012): undefined on a receipt stored before it ----
|
|
872
|
+
cardFeeChargedToPartnerUsd: optionalString(raw, "card_fee_charged_to_partner_usd"),
|
|
873
|
+
partnerDebitedUsd: optionalString(raw, "partner_debited_usd"),
|
|
871
874
|
initiation: optionalString(raw, "initiation"),
|
|
872
875
|
refundRequestId: optionalString(raw, "refund_request_id"),
|
|
873
876
|
raw
|
|
@@ -1394,7 +1397,9 @@ var SubscriptionsServer = class {
|
|
|
1394
1397
|
* and reclaims the coins it minted (`balanceDeltaCoins` is signed), a partial refund
|
|
1395
1398
|
* credits coins. Your revenue is reversed for the refunded portion
|
|
1396
1399
|
* (`partnerRevenueReversedUsd`), INVO's fee is retained, and on a card refund you bear the
|
|
1397
|
-
*
|
|
1400
|
+
* whole refunded amount, INVO's card fee included (`cardFeeChargedToPartnerUsd`;
|
|
1401
|
+
* `partnerDebitedUsd` is the sum; since 2026-09-28, with no separate processor fee:
|
|
1402
|
+
* `processingFeeUsd` reads `"0.00"`). **A full refund
|
|
1398
1403
|
* cancels the subscription** (`subscriptionCanceled`, and a `subscription.canceled` event
|
|
1399
1404
|
* with `cancel_cause: "full_refund"`, sent together with `subscription.refunded` in any
|
|
1400
1405
|
* order); a partial one does not. INVO emails the member.
|
|
@@ -2657,7 +2657,7 @@ interface RefundResult {
|
|
|
2657
2657
|
/** `true` when the card refund had already been issued by an earlier attempt and this call recorded it. */
|
|
2658
2658
|
processorRefundAdopted: boolean;
|
|
2659
2659
|
invoFeeRetained: boolean;
|
|
2660
|
-
/** Your revenue reversed for the refunded portion (revenue only;
|
|
2660
|
+
/** Your revenue reversed for the refunded portion (revenue only; INVO's card fee charged to you is `cardFeeChargedToPartnerUsd`). */
|
|
2661
2661
|
partnerRevenueReversedUsd: string | null;
|
|
2662
2662
|
/** `full` | `prorata` | `none` (`none` on `pending_approval`). */
|
|
2663
2663
|
partnerRevenueReversalMode: string | null;
|
|
@@ -2675,16 +2675,37 @@ interface RefundResult {
|
|
|
2675
2675
|
/** The subscription's status after this call (`canceled` after a full refund). */
|
|
2676
2676
|
subscriptionStatus?: string | null;
|
|
2677
2677
|
/**
|
|
2678
|
-
*
|
|
2679
|
-
*
|
|
2678
|
+
* Kept for compatibility. Since 2026-09-28 (D-PRICE-012) a card refund charges no separate
|
|
2679
|
+
* payment processor fee: this reads `"0.00"` with `processingFeeBasis` `"none"`, and INVO's
|
|
2680
|
+
* card fee on the refunded part is `cardFeeChargedToPartnerUsd` instead. A receipt stored
|
|
2681
|
+
* before that release may still carry the processor fee here (`actual` or `estimated`).
|
|
2680
2682
|
*/
|
|
2681
2683
|
processingFeeUsd?: string | null;
|
|
2682
2684
|
processingFeeBasis?: RefundProcessingFeeBasis | (string & {}) | null;
|
|
2683
2685
|
/** Always `partner`. */
|
|
2684
2686
|
processingFeeBorneBy?: string | null;
|
|
2685
2687
|
processingFeeTransactionId?: string | null;
|
|
2686
|
-
/**
|
|
2688
|
+
/**
|
|
2689
|
+
* Everything this refund took from your revenue. Since 2026-09-28 the same value as
|
|
2690
|
+
* `partnerDebitedUsd` (`partnerRevenueReversedUsd` plus `cardFeeChargedToPartnerUsd`); on an
|
|
2691
|
+
* older stored receipt, `partnerRevenueReversedUsd` plus the processor fee then charged.
|
|
2692
|
+
*/
|
|
2687
2693
|
partnerTotalReversedUsd?: string | null;
|
|
2694
|
+
/**
|
|
2695
|
+
* Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you:
|
|
2696
|
+
* a card refund costs you the whole refunded amount, as a Platform Commerce card refund does.
|
|
2697
|
+
* Across partial refunds of one charge it adds up to exactly INVO's fee on that charge.
|
|
2698
|
+
* `"0.00"` on a coin refund and on the 202 `pending_approval` body. `undefined` on a receipt
|
|
2699
|
+
* stored before that release (a replay of an older refund).
|
|
2700
|
+
*/
|
|
2701
|
+
cardFeeChargedToPartnerUsd?: string | null;
|
|
2702
|
+
/**
|
|
2703
|
+
* Additive (2026-09-28, D-PRICE-012). Your whole debit for this refund:
|
|
2704
|
+
* `partnerRevenueReversedUsd` plus `cardFeeChargedToPartnerUsd`, which equals the refunded
|
|
2705
|
+
* price before tax on a card refund. `"0.00"` on the 202 body. `undefined` on a receipt stored
|
|
2706
|
+
* before that release; read `partnerTotalReversedUsd` there.
|
|
2707
|
+
*/
|
|
2708
|
+
partnerDebitedUsd?: string | null;
|
|
2688
2709
|
initiation?: RefundInitiation | (string & {}) | null;
|
|
2689
2710
|
/** The refund request INVO approved, or `null` for your own self-serve refund. */
|
|
2690
2711
|
refundRequestId?: string | null;
|
|
@@ -2657,7 +2657,7 @@ interface RefundResult {
|
|
|
2657
2657
|
/** `true` when the card refund had already been issued by an earlier attempt and this call recorded it. */
|
|
2658
2658
|
processorRefundAdopted: boolean;
|
|
2659
2659
|
invoFeeRetained: boolean;
|
|
2660
|
-
/** Your revenue reversed for the refunded portion (revenue only;
|
|
2660
|
+
/** Your revenue reversed for the refunded portion (revenue only; INVO's card fee charged to you is `cardFeeChargedToPartnerUsd`). */
|
|
2661
2661
|
partnerRevenueReversedUsd: string | null;
|
|
2662
2662
|
/** `full` | `prorata` | `none` (`none` on `pending_approval`). */
|
|
2663
2663
|
partnerRevenueReversalMode: string | null;
|
|
@@ -2675,16 +2675,37 @@ interface RefundResult {
|
|
|
2675
2675
|
/** The subscription's status after this call (`canceled` after a full refund). */
|
|
2676
2676
|
subscriptionStatus?: string | null;
|
|
2677
2677
|
/**
|
|
2678
|
-
*
|
|
2679
|
-
*
|
|
2678
|
+
* Kept for compatibility. Since 2026-09-28 (D-PRICE-012) a card refund charges no separate
|
|
2679
|
+
* payment processor fee: this reads `"0.00"` with `processingFeeBasis` `"none"`, and INVO's
|
|
2680
|
+
* card fee on the refunded part is `cardFeeChargedToPartnerUsd` instead. A receipt stored
|
|
2681
|
+
* before that release may still carry the processor fee here (`actual` or `estimated`).
|
|
2680
2682
|
*/
|
|
2681
2683
|
processingFeeUsd?: string | null;
|
|
2682
2684
|
processingFeeBasis?: RefundProcessingFeeBasis | (string & {}) | null;
|
|
2683
2685
|
/** Always `partner`. */
|
|
2684
2686
|
processingFeeBorneBy?: string | null;
|
|
2685
2687
|
processingFeeTransactionId?: string | null;
|
|
2686
|
-
/**
|
|
2688
|
+
/**
|
|
2689
|
+
* Everything this refund took from your revenue. Since 2026-09-28 the same value as
|
|
2690
|
+
* `partnerDebitedUsd` (`partnerRevenueReversedUsd` plus `cardFeeChargedToPartnerUsd`); on an
|
|
2691
|
+
* older stored receipt, `partnerRevenueReversedUsd` plus the processor fee then charged.
|
|
2692
|
+
*/
|
|
2687
2693
|
partnerTotalReversedUsd?: string | null;
|
|
2694
|
+
/**
|
|
2695
|
+
* Additive (2026-09-28, D-PRICE-012). INVO's card fee on the refunded part, charged to you:
|
|
2696
|
+
* a card refund costs you the whole refunded amount, as a Platform Commerce card refund does.
|
|
2697
|
+
* Across partial refunds of one charge it adds up to exactly INVO's fee on that charge.
|
|
2698
|
+
* `"0.00"` on a coin refund and on the 202 `pending_approval` body. `undefined` on a receipt
|
|
2699
|
+
* stored before that release (a replay of an older refund).
|
|
2700
|
+
*/
|
|
2701
|
+
cardFeeChargedToPartnerUsd?: string | null;
|
|
2702
|
+
/**
|
|
2703
|
+
* Additive (2026-09-28, D-PRICE-012). Your whole debit for this refund:
|
|
2704
|
+
* `partnerRevenueReversedUsd` plus `cardFeeChargedToPartnerUsd`, which equals the refunded
|
|
2705
|
+
* price before tax on a card refund. `"0.00"` on the 202 body. `undefined` on a receipt stored
|
|
2706
|
+
* before that release; read `partnerTotalReversedUsd` there.
|
|
2707
|
+
*/
|
|
2708
|
+
partnerDebitedUsd?: string | null;
|
|
2688
2709
|
initiation?: RefundInitiation | (string & {}) | null;
|
|
2689
2710
|
/** The refund request INVO approved, or `null` for your own self-serve refund. */
|
|
2690
2711
|
refundRequestId?: string | null;
|
package/package.json
CHANGED