When you have Phoenix controller, all your data send as JSON in body has keys in string format.
To prepare your code, you should use:
def new(conn, %{"invoice" => invoice_params}) do
variable = "Hello #{invoice_params["payorcode"]} Hooray *string2 here* day"
end
With map["key"] you can access parameters. Remember this will return nil when not found data in map (no data with selected key), and #{...} will replace it with "" - empty string.