Skip to main content
Solved

getCustomerInfo in sdk returns different data than curl request


Forum|alt.badge.img+1

I use react native (react-native-purchases 7.4.0) and while executing getCustomerInfo, i get the correct subscription status (It is a renewal in a subscription).

{
    "activeSubscriptions": [
        "rc_5_1m_1w0"
    ],
    "allExpirationDates": {
        "rc_5_1m_1w0": "2024-01-04T09:54:55Z"
    },
    "allExpirationDatesMillis": {
        "rc_5_1m_1w0": 1704362095000
    },
    "allPurchaseDates": {
        "rc_5_1m_1w0": "2023-12-04T09:54:55Z"
    },
    "allPurchaseDatesMillis": {
        "rc_5_1m_1w0": 1701683695000
    },
    "allPurchasedProductIdentifiers": [
        "rc_5_1m_1w0"
    ],
    "entitlements": {
        "active": {
            "month": [Object
            ]
        },
        "all": {
            "month": [Object
            ]
        },
        "verification": "NOT_REQUESTED"
    },
    "firstSeen": "2023-12-04T19:19:26Z",
    "firstSeenMillis": 1701717566000,
    "latestExpirationDate": "2024-01-04T09:54:55Z",
    "latestExpirationDateMillis": 1704362095000,
    "managementURL": "https://apps.apple.com/account/subscriptions",
    "nonSubscriptionTransactions": [],
    "originalApplicationVersion": "1.0",
    "originalAppUserId": "91ec1062-41c6-4d85-b514-7c0d429f7095",
    "originalPurchaseDate": "2023-11-01T09:53:44Z",
    "originalPurchaseDateMillis": 1698832424000,
    "requestDate": "2023-12-05T06:19:48Z",
    "requestDateMillis": 1701757188000
}

 

But, while executing an axios request on the endpoint https://api.revenuecat.com/v1/subscribers/91ec1062-41c6-4d85-b514-7c0d429f7095

{
    "request_date": "2023-12-05T06:44:20Z",
    "request_date_ms": 1701758660566,
    "subscriber": {
        "entitlements": {},
        "first_seen": "2023-12-04T19:19:26Z",
        "last_seen": "2023-12-04T19:19:26Z",
        "management_url": null,
        "non_subscriptions": {},
        "original_app_user_id": "91ec1062-41c6-4d85-b514-7c0d429f7095",
        "original_application_version": "1.0",
        "original_purchase_date": "2023-11-01T09:53:44Z",
        "other_purchases": {},
        "subscriptions": {}
    }
}

 

I do not get any entitlements/active subscriptions.

 

Does anybody know why this happens?
 

 

Best answer by cody

Hello @codingjohny!

We recently shipped a change that excludes StoreKit test transactions from our GET /subscribers endpoint by default. To include these transactions, please include the following header in your request:

`X-Is-Sandbox: true`

View original
Did this post help you find an answer to your question?

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 497 replies
  • Answer
  • December 7, 2023

Hello @codingjohny!

We recently shipped a change that excludes StoreKit test transactions from our GET /subscribers endpoint by default. To include these transactions, please include the following header in your request:

`X-Is-Sandbox: true`


Forum|alt.badge.img+1
  • Author
  • New Member
  • 1 reply
  • December 10, 2023
cody wrote:

Hello @codingjohny!

We recently shipped a change that excludes StoreKit test transactions from our GET /subscribers endpoint by default. To include these transactions, please include the following header in your request:

`X-Is-Sandbox: true`

Thanks! It works.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings