A novel method to solve nonlinear contact between two bodies with plane strain behavior is presented in this paper. This method is based on the Boundary Integral Equation (BIE) and the Isogeometric Analysis (IGA). Unlike works that divide the boundary into elements, this method evaluates it as a single element, reducing the degrees of freedom in the solution. Moreover, the Particle Swarm Optimization Algorithm (PSO) was used in order to estimate the deformation when two bodies are in contact and there is penetration between them. The obtained results were compared with the Finite Element Method (FEM) and the Hertz contact equation.