@AzhaguBanca Welcome to the community
SOAP response should be handled differently compared to JSON parsing.
So here in your case,
pm.environment.set("paymentid", jsonData['soap:Envelope']['soap:Body']['tns:DetailPayment']['tns:PaymentId']);
I have tried roughly based on the visible response. If not working, please provide me the full response
Also kindly read the below link if you need to know more about SOAP response parsing.
Please create a separate topic in future for your queries, so that it will be addressed. Also I request you to consider the points here for your next query here.