The tool is almost completely irrelevant. The issue is not the tool, but the proper format of the HTTP request to send to the server. This was pointed our earlier.
You also said "When I use simple Key=Value pairs in the request body, it works. But when I use, what I call a "XML" style format in the body, it fails with a 'bad request'."
So, one has to ask, why change what works?
In this case, the tool has to be Lazarus and Free Pascal, and an HTTP component of some kind. I don't want to use any other language (like Java, PHP, CURL, etc.) I take your point though, that the Elavon server shd not care what tool was used to issue the request, as long as it is formatted properly and the correct Content-Type is selected.
As to "why change what works?"... the "working" call is only part of an .. at least... two step process. And even the first, now "working" step is incomplete, and cannot allow the second step to proceed. So, I have to "fix" the fist step, which.. doesn't work. I have to hand more info in the first "Get Key" step, which is explained on the Elavon dev help web page... shown in
a different format than the other "get key" example. Elavon dev helps are not that helpful. The examples are not cohesive.
Here is the logic trap:
Phase 1: Can I simply get a key from Elavon?
Answer: Yes, but not in the format explained on the Elavon dev help website. I had to use Elavon's PostMan "Get Key" example, which is not in the same format at what is shown on the Elavon dev help website, and it doesn't allow any more info to be sent, other than a request for a key.
Phase 2: I need to send much more info in the "Get Key" request sent to Elavon.
Answer: I cannot send more info, in the format shown on the Elavon dev help website. There is no Postman example of this.
Latest update from Elavon... (after my very lengthy email explaining all of this, their dev help (person or team) now understands what I am talking about, and is in the process of creating a PostMan example for me (and you all, once I post it up here). I will, in the next few days, try out Gus's latest iteration of his Elavon client.
Thanks to all for your continued assistance. We've been dealing with Elavon for many years and found them to be a great company to work with. This is the first attempt at using their API.