@bpgraves, GetAwaiter().GetResult() isn't polling. It's the synchronous form of await: it blocks until the HTTP response for that one POST arrives, which for RecordCCPayment is the 202, and then your code moves on while the operation is still running. The cancellation token only caps how long you wait for that response; it doesn't touch the operation on the server, which is why the 409 didn't change. There's nothing to override. The polling is a separate loop of GETs to the Location URL, and it doesn't need async or await. Same pattern you're already using, on the same Client so it stays in the same session:
var resp = Client.PostAsync(RESTmethod, httpContent, cancelAfterDelay.Token).GetAwaiter().GetResult();
if (resp.StatusCode == HttpStatusCode.Accepted)
{
var statusUrl = new Uri(resp.RequestMessage.RequestUri, resp.Headers.Location);
while (Client.GetAsync(statusUrl).GetAwaiter().GetResult().StatusCode == HttpStatusCode.Accepted)
Task.Delay(1000).Wait();
}
The status URL answers 202 while the operation is running and 204 once it's done, so the loop exits on its own. If that POST is coming back 204 instead of 202, the operation was already finished and the loop won't run, which would mean the 409 is coming from a different call.