Subscribe to Apple Payment Updates

Hello, I’m implementing inAppPurchases and I can’t figure out how to set the appAccountToken value with apple upon purchase when using expo-in-app-purchases.

The expo docs state, To check the status of a subscription, you can use the...Status Update Notifications service on iOS.

Apple’s docs state that my app must send a value for appAccountToken, which they describe like so:

A UUID that associates the transaction with a user on your own service. If your app doesn’t provide an appAccountToken, this string is empty. For more information, see appAccountToken(_:).

When a customer initiates an in-app purchase, your app may create an appAccountToken(_:) and send it to the App Store. The App Store returns the same value in appAccountToken in the transaction information after the customer completes the purchase.

I believe I need to set the appAccountToken at purchase-time, so that I can check a user’s subscription status in the future. But I don’t see any way to pass that value via expo-in-app-purchases.

The main reason I need to check a user’s subscription status is that I don’t trust the purchase listener to catch subscription renewals when a user loads the app after the previous period expires and the subscription was auto-renewed. If my concern is unfounded, this is a non-issue. But the expo-in-app-purchases docs don’t seem super clear as to the limitations of the purchase listener.

Has anyone been able to use the payments listener to catch subscription renewals, without using a server to talk to Apple directly?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.