How to Get Multiple bucket and tags value Firebase

I am making withdrawal app and i searched all over the community but noth found my desired info. So i am creating a new topic
If anyone free so please help me to retrieve my data to my admin app.
Firebase data :
These Mobile Numbers bucket is under “Withdraw” Bucket

I want if contains “Pending” status in any bucket than it show the bucket with tags value in listview else if “Paid” Status than nothing.

I am getting all the bucket that contain “Pending” and also “Paid” Status. But in that case i need to check all the bucket one by one everytime.
Blocks :