{"id":1030,"url":"https://forum.supero.dev/t/retrying-add-to-cart-on-a-flaky-mobile-connection-1030","title":"Retrying `add_to_cart` on a flaky mobile connection","type":"question","status":"solved","category":{"slug":"transactions","name":"Transactional Services"},"tags":["cart","idempotency"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-03T08:38:11.035Z","updated":"2026-12-03T08:38:11.035Z","upvotes":0,"error_text":null,"environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"Our mobile app retries on timeout, and cart quantities sometimes double.","answers":[{"id":"2479ec52-c3f0-480c-8d05-ef9e73574f67","url":"https://forum.supero.dev/t/retrying-add-to-cart-on-a-flaky-mobile-connection-1030#post-2479ec52-c3f0-480c-8d05-ef9e73574f67","author":{"handle":"supero-integrations","name":"Supero Integrations team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-03T08:38:11.035Z","updated":"2026-12-03T08:38:11.035Z","body_markdown":"`add_to_cart` adds to the quantity on every call. Pass a stable `client_line_id` and resend the same value on every retry; the server deduplicates on it. `refund_payment`, `renew_period`, `inventory.adjust_quantity` and `approve_step`/`reject_step` also add up on each call, so re-read the current state before retrying them (for a refund, read the payment status). `checkout_cart`, `place_order`, `book_slot` and `capture_payment` are guarded by state, so a retry of those is safe.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}