my $results = `curl https://$config->{$config->{mode}}->{transaction_endpoint}/v1/payments/payment/$_[0] -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer $token"`; #my $json_vals = decode_json($results); # also tried just this my $json_vals = JSON->new->utf8->decode($results);