A user has multiple in-app accounts and an Apple account. He purchase the subscription on one in-app account and then cancels it immediately, at which point the payment is deducted once and the subscription stays in effect. Then he logs into a second in-app account and initiates a subscription with the same Apple account, at this point can he get the subscription service on the second in-app account without paying for it? If so, how to deal with it?
Subscription on different in-app account with the same account
The Apple ID can only one 1 have subscription per product (and subscription group) at a time. That purchase has an originalTransactionID
(OTID) which is static for that Apple ID and subscription group. That primary key should be associated to your in-app account in your system - anonymous or not.
In your example, that 2nd in-app account should not get access (per your business policy noted) because it should see this same subscription purchase OTID already associated with in-app account 1.