Fix bug where payload send as ruby hash

- Dump ruby hash into json. Verfied via
unit and integration tests.