This article presents a new credibility estimation of the probability distributions of risks under Bayes settings in a completely nonparametric framework. In contrast to the Ferguson's Bayesian nonparametric method, it does not need to specify a mathematical form of the prior distribution (such as a Dirichlet process). We then show the applications of the method in general insurance premium pricing, a procedure commonly known as experience rating, which utilizes the insured's claim experience to calculate a proper premium under a given premium principle (referred to as a risk measure). As this method estimates the probability distributions of losses, not just the means and variances, it provides a unified nonparametric framework to experience rating for arbitrary premium principles. This encompasses the advantages of the well-known Bühlmann's and Ferguson's approaches, while it overcomes their drawbacks. We first establish a linear Bayes method and prove its strong consistency in nonparametric settings that require only knowledge of the first two moments of the loss distributions considered as a stochastic process. Then an empirical Bayes method is developed for the more general situation where a portfolio of risks is observed but no knowledge is available or assumed on their loss and prior distributions, including their moments. It is shown to be asymptotically optimal. The performance of our estimates in comparison with traditional methods is also evaluated through theoretical analysis and numerical studies, which show that our approach produces premium estimates close to the optima.