本文列出處於淘汰期的 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.pendingOrderId 或 onHoldStateContext.renewalDeclined.pendingOrderId 取得待處理的訂單 ID。 |
startTimeMillis |
startTime |
expiryTimeMillis |
lineItems.expiryTime (購買時所獲取的各個訂閱項目都有各自的 expiryTime) |
autoResumeTimeMillis |
pausedStateContext.autoResumeTime |
autoRenewing |
lineItems.autoRenewingPlan.autoRenewEnabled |
priceCurrenceCode、priceAmountMicros |
lineItems.autoRenewingPlan.recurringPrice |
introductoryPriceInfo |
lineItems.offerPhase.introductoryPrice您也可以在已購買的訂閱項目中於 offer 找到這項資訊。 |
developerPayload |
(無對等欄位) 開發人員酬載已淘汰 |
paymentState |
(無對等欄位) 您可以從 subscriptionState 推測付款狀態:
|
cancelReason、userCancellationTimeMillis、cancelSurveyResult |
canceledStateContext |
linkedPurchaseToken |
linkedPurchaseToken (不變) |
purchaseType |
測試:透過 testPurchase促銷活動: signupPromotion |
priceChange |
lineItems.autoRenewingPlan.priceChangeDetails |
profileName、emailAddress、givenName、familyName、profileId |
subscribeWithGoogleInfo |
acknowledgementState |
acknowledgementState (no change) |
promotionType、promotionCode |
signupPromotion |
externalAccountId、obfuscatedExternalAccountId、obfuscatedExteranlProfileId |
externalAccountIdentifiers |