Repro Steps:
- Create a RevenueCat account with a sandbox and non-sandbox environment
- Create an entitlement in each environment with the identifier of “Membership” in both
- Navigate to the interactive docs (or you can do this in your own code if you already have it set up) (https://docs.revenuecat.com/reference#basic)
- Enter your api key for your sandbox environment and pass any user id to create a subscriber https://docs.revenuecat.com/reference#subscribers
- Try to grant them a promotional grant for that user id, the entitlement identifier of “Membership” and duration of “yearly” https://docs.revenuecat.com/reference#grant-a-promotional-entitlement
- Returned subscription entitlement shows is_sandbox: false
Returned subscription info (see is_sandbox: false).
{"request_date":"2021-12-02T21:52:16Z","request_date_ms":1638481936210,"subscriber":{"entitlements":{"Membership":{"expires_date":"2022-12-02T21:52:15Z","grace_period_expires_date":null,"product_identifier":"rc_promo_Membership_yearly","purchase_date":"2021-12-02T21:52:15Z"}},"first_seen":"2021-12-01T23:31:42Z","last_seen":"2021-12-01T23:31:42Z","management_url":null,"non_subscriptions":{},"original_app_user_id":"40069562-8047-4893-ac0f-a2c50f1be9de","original_application_version":null,"original_purchase_date":null,"other_purchases":{},"subscriptions":{"rc_promo_Membership_yearly":{"billing_issues_detected_at":null,"expires_date":"2022-12-02T21:52:15Z","grace_period_expires_date":null,"is_sandbox":false,"original_purchase_date":"2021-12-02T21:52:15Z","period_type":"normal","purchase_date":"2021-12-02T21:52:15Z","store":"promotional","unsubscribe_detected_at":null}}}
I can’t see what I’m doing wrong and this seems like a bug to me. I got memberships hooked up fine a year or so ago and am now adding in the ability to gift a membership. I have logic to check if sandbox flag is true when trying to process subscriptions in development and staging environments. This seems to be able to work fine in production but for testing I’d like the subscription to return is_sandbox true like the non-promotional subscriptions do.