Given a quiver with potential, Kontsevich-Soibelman constructed a Hall algebra on the cohomology of the stack of representations of (Q,W). In particular cases, one recovers the positive part of the Yangian of a quiver Q defined by Maulik-Okounkov. For general pairs, the Hall algebra has nice structural properties, for example Davison-Meinhardt showed that it satisfies a PBW theorem. Their proof uses the decomposition theorem and the number of generators in a given dimension involves the intersection cohomology of the coarse moduli space of representations X(d) of Q. One can define a K-theoretic version of this algebra using categories of singularities that depend on the stack of representations of (Q,W). In particular cases, these Hall algebras are positive parts of quantum affine algebras. For more general pairs, these algebras also satisfy a PBW theorem. The proof uses a K-theoretic version of the intersection cohomology of X(d) and replaces the use of the decomposition theorem in cohomology with semi-orthogonal decompositions inspired by geometric invariant theory.