Search Unity

Is there a way to know if a purchase is being made using an 'always approves' Test Card?

Discussion in 'Unity IAP' started by vitaliano_fanatee, Jul 1, 2021.

  1. vitaliano_fanatee

    vitaliano_fanatee

    Joined:
    Oct 9, 2020
    Posts:
    37
    Hi folks,

    Our QA Team do a lot of tests using the 'always approves' Test Card on Android, but the Analytics from these purchases are influencing our Analysis Team.
    Do you know if it is possible to distinguish a test purchase from a real purchase using the Unity IAP package?

    Cheers,
    Vitaliano
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No unfortunately there is not. We are redesigning the flow over the next few months, I will ensure to bring this up.
     
    Last edited: Jul 1, 2021
    myurchin and vitaliano_fanatee like this.
  3. vitaliano_fanatee

    vitaliano_fanatee

    Joined:
    Oct 9, 2020
    Posts:
    37
    Thanks for the reply.
    We will end up using this API on our server.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Does that API differentiate test purchases?
     
  5. vitaliano_fanatee

    vitaliano_fanatee

    Joined:
    Oct 9, 2020
    Posts:
    37
    The object it returns contains an property named 'purchaseType' which is set when the purchase was done with any other method than regular credit card with the following possible values:
    0. Test (i.e. purchased from a license testing account) 1. Promo (i.e. purchased using a promo code) 2. Rewarded (i.e. from watching a video ad instead of paying)
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, thanks. I have passed this along to engineering.
     
    vitaliano_fanatee likes this.
  7. ChrisoperRobi

    ChrisoperRobi

    Joined:
    Feb 23, 2015
    Posts:
    2
    Hello!
    Is there an update to this? Analytics are still showing test purchases for us which are very misleading and hard to remove manually from our calculations.
     
    Last edited: May 19, 2022
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    With the new Analytics beta going live soon, you can use separate environments, like Test and Development, for your test purchases. I would encourage you to try the beta https://support.unity.com/hc/en-us/articles/4408915768724-General-FAQ