Eh, in that case you're asking for trouble by requiring the server to be successful. If I had to write an API like that I would definitely go with randomized tokens per logical request for dedupe on retries.
If it's a user facing transaction it should be a transaction resource that's created and then the server does the retries imo, with the user able to view the status.