Skip to content
Community forum

Retrying add_to_cart on a flaky mobile connection

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

Our mobile app retries on timeout, and cart quantities sometimes double.

Link

1 answer

Accepted answer
Accepted answer

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.

Supero Integrations teamSupero team answered
Link

Your answer

Retrying add_to_cart on a flaky mobile connection | Supero Community