Difference between iOS and Android In-App-Purchase Subscription

Andrea Huang
1 min readMay 4, 2021

Apple App-Server-Notification vs Google Real-Time-Developer-Notification

  • iOS or Apple App Store use original_transaction_id to identify and trace the subscription of a customer. The same original_transaction_id is associated with a customer for a subscription group. When customers renew the subscription later, the same original_transaction_id is included in the App Server Notification for developer to associate with the customer’s subscription.
  • iOS has an event field transaction_id for each follow up event, including App Server Notification and validate Receipt Response. transaction_id is different for each event/response.
  • Android or Google Play using orderId to identify and trace the subscription of a customer. But unlike iOS, when customers renew the subscription later, a different orderId is introduced.
  • Like iOS, Google send out Real Time Developer Notification (RTDN) for subscription events like cancel, renew etc. in which orderId is included to associate with the customer’s current subscription(since one customer might more than one orderId is he/she has cancelled/expired a subscription then renew).
  • Upon the very first purchase or an renew event, an ordinary orderId like GPA.3313–1491–5744–95440 is generated and included in the response of receipt verification.
  • In a follow up event the orderId will look like GPA.3313–1491–5744–95440..2, the ..2 part means it is the third follow up event(and yes, the first followup event will be ..0).

Testing

  • iOS: Apple App Store will auto renew every 3 minutes, for 5 times,
  • Android: Google Play Store will auto renew every 5 minutes for 6 times.

--

--

Andrea Huang

我的Patrick是個6歲的小男孩。我想記錄下此時我想與他分享的感悟。雖然他此時未必能理解,但是等到適當的時機,他可以讀到來自媽媽當年的分享