Shipping API retries can cause duplicate charges if not handled correctly
A developer article warns that retrying a shipping label API call after a timeout is risky, as the carrier may have already processed the label and issued a charge. The article explains that standard retry logic assumes operations are free, but paid APIs can result in duplicate purchases. It proposes a three-state result model—success, rejected, and unknown—to differentiate safe retries from dangerous ones. The recommended solution involves using a unique client reference to check for existing labels before creating new ones and implementing a resolution process for timeouts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in