Ruby on rails and Klarna API

Hi, I’m fairly new to this, but have done some applications in Ruby on rails. Now to my problem I want to be able to print the html snippet in Klarna, however, I get out the whole body and not just div. in the control I have sliced response = https_client.request (request)

response.body [‘html_snippet’] response.read_body

what have I done wrong