Billing Fragment

Hello, where I can find some documentation about Billing Fragment and what JSON returned mean?
I’m in trouble because I did not understand if the call of billing fragment from the App (so after integrating the services) returns values always based on the type of plan: that is, if I set a plan for device, when I call the getsubscriptions the array returned is the set of subscriptions I have for that device? if instead I have a plan set for business, when I call the getsubscriontions the array contains the subscriptions of the business? is this operation automatic from service (inferred info in the call)?
In general, as I said, I would like to understand the information returned by the function getSubscriptions because I have to understand what it means “valid subscription”.
Thank you