Alex avatar image
Alex asked

Method getSku() for Subscription Receipt return String "null"

When I test subscriptions in Sandbox mode I have a problem - my test subscription JSON looks like:

  "test.subscription.weekly": {
    "smallIconUrl": "http://",
    "title": "Test Subscription with dots",
    "itemType": "SUBSCRIPTION",
    "price": 1.0,
    "description": "Test Subscription with dots",
    "languageTitleMap": {
      "US": "Test Subscription with dots"
    "languageDescriptionMap": {
      "US": "Test Subscription with dots"
    "currencyPriceMap": {
      "US": 0.0
    "subscriptionParent": "test.subscription",
    "subscriptionBase": null,
    "term": "Weekly"

In this case in callback onPurchaseResponse I get receipt from response and method getSku() return String "null".

If I remove string

"subscriptionBase": null,

from subscription JSON then method getSku() return String return right sku - "test.subscription" (I think it is field subscriptionParent from JSON).

Why developer console generate JSON with field subscriptionBase? I can't test RVS with wrong SKU.

I think in production I will have the same problem.

I use amazon-appstore-sdk:3.0.2.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers