Node.js: Automatic Syncing of iOS Subscription Status

Managing renewals and cancellations with transaction receipts in a Node.js runtime

Ross Bulat
12 min readJul 7, 2020

Automatic iOS Subscription renewal and cancellation in Node.js

Managing subscriptions for iOS apps is critical infrastructure to ensure users have access to the correct content, and equally as important, to ensure access to app content is closed off if that subscription expires or is cancelled. This can be achieved in an automated manner in the form of a Node.js runtime service that will automatically update a subscription status, whether renew or cancellation, from your app database upon every subscription period, whether that be on a monthly, bi-yearly or annual basis.

This issue will be solved in the context of JavaScript utilising a Node.js runtime in this article. A Gist containing the full service logic is included at the end of this article, or alternatively can be viewed here on Github.

Although React Native won’t be discussed in detail, this article assumes that the reader is using a package such as react-native-iap to trigger in-app purchases that in turn generate transaction receipts. The solution discussed here also does not rely on Subscription Webhooks, or server to server notifications

--

--

Ross Bulat

Programmer and Author. @ Parity Technologies, JKRB Investments