In App Purchase

I’m facing an issue with In-App Purchases. I’ve completed the setup successfully. I logged in with User A's Apple account on an iPhone and completed a purchase. After that, I logged in with User B's account on the same iPhone. When I try to make the same purchase, I get the following error:

“Purchase is a duplicate and will not be reported.”

Because the purchase was already made using User A’s Apple ID, I’m unable to make the same purchase again using User B’s account on the same device.

Could you please guide me on how to handle this situation?

Steps:

  1. Logged in to your app with User A (my app's unique user ID).
  2. Purchased a subscription using a sandbox Apple ID.
  3. Logged out User A and logged in with User B (my app’s unique user ID) on the same device.
  4. Tried to purchase the same subscription with the same sandbox Apple ID for User B, and got: "Purchase is a duplicate and will not be reported."

Are you using the same sandbox Apple ID for the purchase, or two separate ones? It's not clear from your steps.

If one sandbox account has already purchased the subscription, then you can't make the same purchase again in the same account.

User A should use Sandbox Account A.

User B should use Sandbox Account B.

Hello @Dhrumil2103 !

Purchases made on App Store are tied to an Apple Account (previously known as Apple ID). You have an option to associate a purchase with an account in your app's system using appAccountToken so that you can recognize purchases made by the same account in your system.

See Testing at all stages of development with Xcode and the sandbox for more information on testing in-app purchases.

@darkpaw Thanks for your participation.

Yes, I am using the same sandbox Apple ID for the purchase.

I understand your point and am already aware of this behavior. Let me provide an example:

In my login flow, users log in using a Unique ID and Password. I logged in as User A on an iPhone 14 and completed a purchase. After that, I logged out User A and logged in as User B. When I initiated the purchase flow for User B, I received the following error: “Purchase is a duplicate and will not be reported.”

How should we handle this situation for User B, especially since Apple don't provide any option for switching Apple accounts?. So how can i manage this scenario.

@App Store Commerce Engineer Thanks for your participation.

I believe appAccountToken is used to retrieve transaction information or status, right? However, I’ve already implemented this logic on the backend to track transaction status and details.

In App Purchase
 
 
Q