弃用

本文档列出了处于弃用期的 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

周期性订阅的 SubscriptionPurchaseV2 字段

purchases.subscriptionv2 包含一些新字段,用于提供有关新订阅对象的更多详细信息。下表显示了旧订阅端点中的字段与 purchases.subscriptionv2 中相应字段的对应关系。

SubscriptionPurchase SubscriptionPurchaseV2
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