iOS app login email id and in-app purchases apple id conflict - in-app-purchase

I have built an app that runs on both Android and Apple phones. User sign up using an email id and on Android we are using Authorize.net payment gateway to buy subscription. On iPhone we are implementing in-app purchase.
When user sign up on iPhone using EmailAddress1 and buy the subscription using apple id signed in on that iPhone this workflow is working fine.
However when the iPhone user tries to sign up using another email address EmailAddress2 on this same iPhone and try to buy the subscription, it says in the in-app purchase that a subscription already exist.
However that existing subscription is for EmailAddress1 and second time we are trying to buy for EmailAddress2
I am using two different email ids to sign up. should this not recognize that the both users have different email ids (and using same apple id to buy the subscription)? please help.

Related

What information goes to app developer when user buys in-app purchase on ios 16?

What information goes to app developer when user buys in-app purchase (subscription)? Are anything of the following revealed to developers?
Unique Identifier
First and last name
Apple ID
Email
Age
Address
I'm asking from perspective of developing a protection from creating multiple premium accounts by one user.

Required to sign Paid Applications Agreement to enable initial IAP testing on iOS?

I'm developing a iOS app containing in-app purchases.
I'm having problems testing the app because it can't download IAP products from iTunes. Do I need to sign the Paid Applications Agreement even to perform initial (local) testing?
To test the purchase add one user / email ID which is not an apple ID under User and Groups >> Sandbox Account in iTunes account.
Refer below screenshot for the same
and If you are not able to get the IAP products from iTunes try this link and check wheather the store is working for you.
https://sandbox.itunes.apple.com/verifyReceipt?uo=8&at=11ld4k
if the link responsd with status code its working.
Resolved after signed the Apple Paid Applications contract.

Auto Renewable Subscription issue with different sandbox users on Same device

I am using Auto Renewable Monthly Subscription in my application and successfully implemented workflow. I am testing application in development mode i.e with sandbox environment. I have added two Sandbox users in iTunes connect > User and Roles Section.
Query -
When user monthly subscribe service using first sandbox account and successfully subscribed product. then user Sign Out first sandbox account from device Settings > iTunes and App Store Section and then again login with second sandbox test user.
When user again open application then it show alert - "you are currently Subscribed to this" with option to manage and Ok, Rather than asking to perform purchase with new second sandbox user. Please guide me what should be the correct behaviour.
How can I add cancel subscription within app and test with sandbox environment.
How does auto renewable - renew subscription and validate subscription work?
Kindly Suggest , I will be very thankful for guide lines.
First of all,SandBox payment validity is 5 mins for monthly recurring payments. And for app inApp Payment details will save in appStoreReceiptURL this url, Apple will check based on Purchase_id(it will create in iTunes) and appStoreReceiptURL, If you want to use another Sandbox tester email You need to delete app and re install.then you will proceed to payment via SandBox.
2) There is no option to cancel Auto-renewable to sandbox payments.
3) Auto renewable will not work in Sandbox payments, it's for just testing purpose how inApp will work with out payment.

can we purchase same Non Consumable In app purchase for other users using same apple id?

I have business models like user must have to select one plan with non consumable in app purchase at the time of registration.
But In case like, when my friends wants to use the app and he told me to register his account from my device and pay with my apple id. So I logged out my account and trying to register his account. then I can not purchase same Non Consumable In App Purchase. As Apple Id remains same.
Does anyone have idea of how to solve such instances.
Thanks,

Non-Consumable IAP for an app with registered users

We have an app that has users accounts, it is cross platform for iOS, Android and Win phone, We are starting to suggest Non-Consumable IAP on all platforms.
The idea is that when a user bought this product it will be available to him on any platform. for that we are attaching the purchase to it's account in our app. So when he is logged in our server will notify the app that the user did purchase the product (No matter on what platform) and unlock it for him.
NOW FOR THE PROBLEM
Lets say user A bought the product with his AppStore account, We attach the purchase to its "OurApp-account". Now user B is logging in to our app with his "OurApp-account" but the AppStore account is still User A account.
In this case Apple will give him the product for free because it will refer to user A AppStore account.
What we need is that user B will have to change the App store account and purchase the product again.
Any Idea how can we do this ?
Thanks

Resources