淘汰項目

本文列出處於淘汰期的 Google Play Developer API 和相關功能。

淘汰時間表 - 2026 年 5 月 19 日至 2028 年 8 月 31 日

本節中的功能和 API 將於 2026 年 5 月 19 日淘汰,並於 2028 年 8 月 31 日停用。不過,您可以在 2028 年 11 月 1 日前,為已淘汰的項目申請延期。

已淘汰的訂閱 API

本節列出已淘汰的 API。

API 可更換
subscriptions.cancel subscriptionsv2.cancel
subscriptions.defer subscriptionsv2.defer
Order.lineItems.subscriptionDetails.offer_phase Order.lineItems.subscriptionDetails.offer_phase_details

淘汰時間表 - 2025 年 5 月 21 日至 2027 年 8 月 31 日

本節中的功能和 API 將於 2025 年 5 月 21 日淘汰,並於 2027 年 8 月 31 日停止服務。不過,您可以在 2027 年 11 月 1 日前,為已淘汰的項目申請延期。

已淘汰的訂閱 API

本節列出已淘汰的 API。

API 可更換
subscriptions.get subscriptionsv2.get
subscriptions.refund 呼叫 subscriptionsv2.get 取得 SubscriptionPurchaseLineItem。latest_successful_order_id, 然後呼叫 Orders.refund 來退款。
subscriptions.revoke subscriptionsv2.revoke
SubscriptionPurchaseV2。 latestOrderId SubscriptionPurchaseLineItem. latest_successful_order_id
RealTimeDeveloperNotification. SubscriptionNotification.subscriptionId 不更換
RealTimeDeveloperNotification. SubscriptionNotification。 notificationType SUBSCRIPTION_PRICE_CHANGE_CONFIRMED SUBSCRIPTION_PRICE _CHANGE_UPDATED

週期或經常性訂閱項目的 PurchasePurchaseV2 欄位

purchases.subscriptionv2 包含新欄位,可提供新訂閱物件的詳細資訊。下表顯示舊版訂閱項目端點的欄位如何對應至 purchases.subscriptionv2 中的對應欄位。

訂閱購買 訂閱購買第 2 版
countryCode regionCode
orderId lineItems.latestSuccessfulOrderId
您可以從 inGracePeriodStateContext.renewalDeclined.pendingOrderIdonHoldStateContext.renewalDeclined.pendingOrderId 取得待處理的訂單 ID。
startTimeMillis startTime
expiryTimeMillis lineItems.expiryTime (購買時所獲取的各個訂閱項目都有各自的 expiryTime)
autoResumeTimeMillis pausedStateContext.autoResumeTime
autoRenewing lineItems.autoRenewingPlan.autoRenewEnabled
priceCurrenceCodepriceAmountMicros lineItems.autoRenewingPlan.recurringPrice
introductoryPriceInfo lineItems.offerPhase.introductoryPrice
您也可以在已購買的訂閱項目中於 offer 找到這項資訊。
developerPayload (無對等欄位) 開發人員酬載已淘汰
paymentState (無對等欄位)
您可以從 subscriptionState 推測付款狀態:
  • 付款處理中:
    • SUBSCRIPTION_STATE_PENDING (有待處理交易的新交易)
    • SUBSCRIPTION_STATE_IN_GRACE_PERIOD
    • SUBSCRIPTION_STATE_ON_HOLD
  • 已收到付款:
    • SUBSCRIPTION_STATE_ACTIVE
  • 免費試用:
    • lineItems.offerPhase.freeTrial
  • 延遲升級/降級:
    • lineItems.deferredItemReplacement
cancelReasonuserCancellationTimeMilliscancelSurveyResult canceledStateContext
linkedPurchaseToken linkedPurchaseToken (不變)
purchaseType 測試:透過 testPurchase
促銷活動:signupPromotion
priceChange lineItems.autoRenewingPlan.priceChangeDetails
profileNameemailAddressgivenNamefamilyNameprofileId subscribeWithGoogleInfo
acknowledgementState acknowledgementState (no change)
promotionTypepromotionCode signupPromotion
externalAccountIdobfuscatedExternalAccountIdobfuscatedExteranlProfileId externalAccountIdentifiers