A clean query log next to a slow endpoint usually means the time goes somewhere nobody is timing. Here is the first check I run.
Add three timestamps to the request path and log them with the request id. One in the reverse proxy when the request is accepted, one at the first line of the handler, one when the response is written. Nginx gives you the first, and the other two are a few lines of middleware.
Then compare the spans. Accept to handler start is the time the request sat queued in front of your workers, with no database involved. Inside the handler, count query time and outbound call time separately, add them up, subtract from the handler span, and what is left over is serialization and object building.
In the payment integrations I have worked on, the slow part usually sat in that queue or in the call to a provider, not in Postgres. Which of those spans was the big one last time you measured a slow endpoint?