如何通过 Google Play 结算库获取应用内产品或订阅的“福利”?

问题描述 投票:0回答:1

我正在使用 Google Play Billing Library 版本 3 来获取可用的应用内产品和订阅。

querySkuDetailsAsync
对象上调用
BillingClient
后,我正确地获取了每个产品的
SkuDetails

在 Google Play 控制台中,我在“福利”字段中输入了一些福利,但是,我没有看到任何获取它们的方法。

我可以获得产品的名称、价格、描述,但无法获得好处。



如何获得应用内产品或订阅的好处?

android google-play google-play-console
1个回答
0
投票

正如 Starwave 提到的,您可以通过此 api 从订阅中获得好处。

GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}

回复:

    {
  "packageName": "app.test",
  "productId": "month_id",
  "basePlans": [
    ....
  ],
  "listings": [
    {
      "title": "Monthly subscription",
      "benefits": [
        "Lesser price",
        "Another benefit"
      ],
      "languageCode": "en-US"
    }
  ],
  "taxAndComplianceSettings": {
    "eeaWithdrawalRightType": "WITHDRAWAL_RIGHT_SERVICE",
    "taxRateInfoByRegionCode": {
      "US": {
        "eligibleForStreamingServiceTaxRate": true
      }
    }
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.