def METHOD_NAME(id=None, email=None):
    if id:
        return db.payments.find_one({"Txn": id, "Reversed": {"$ne": True}})
    elif email:
        res = db.payments.find({"Email": email, "Expiry":{"$gt": datetime.utcnow()}, "Reversed": {"$ne": True}}, limit=1)
        for payment in res:
            return payment