Block Inc. , the company behind the Cash App platform, has agreed to pay $40 million to settle claims brought by New York state regulators .