Move verify_payload function