file_merchant = "select name from merchant_category where id=%s;" fetch_application_data = "select offer_id, loan_amount, state, co_applicant_name, lender_id, aadhaar_card from consumer_application where id = %s" digio_vkyc = "select id from digio_vkyc where application_id = %s and kyc_status = 'approved' and kyc_journey ='complete'" karza_vkyc = "SELECT JSON_UNQUOTE(JSON_EXTRACT(kvw.`data`, '$.approvedByAuditor')) AS approved_by_auditor, applicant_type FROM karza_video_webhooks kvw where kvw.application_id = %s and JSON_UNQUOTE(JSON_EXTRACT(kvw.`data`, '$.approvedByAuditor')) = 'ACCEPTED'" mandate = "select id from mandate where consumer_application_id = %s and status = 'active'" emi_details = "select processing_fee, upfront_from_customer, legal_charges from emi_calculation where application_id = %s" pro_forma = "select insurance_premium_amount, merchant_collected_advance_amount, insurance_premium_applicable, insurance_premium_by_merchant, processing_fee_by_merchant from pro_forma_invoice where application_id = %s and insurance_premium_by_merchant = 0 and insurance_premium_applicable = 1" total_paid_charges = "SELECT IFNULL(SUM(amount), 0) as amount from payment_transactions pt where pt.application_id = %s" check_co_app = "Select co_applicant_name, merchant_id from consumer_application where id = %s" online_payments = "Select id from online_payments where application_id = %s and payment_link is not null limit 1" merchant_details = "select id, is_collected, is_processing_fees, collect_advance_amount, insurance_premium from merchant where id = %s" users = "select id, name from users where id in (%s)" fetch_files = "select id from consumer_application_files where file_type = %s and consumer_application_id = %s" consent_logs = "select id from consent_log where application_id = %s and applicant_type = %s"