Advanced Error Handling ๐งผ
Errors in HTTPโ
Retry safety ๐๏ธโ
PAYSTRAX Gateway does not support native idempotency keys โ there's no built-in way to guarantee a repeated request is deduplicated the way some other gateways handle it. Retry safety depends on the underlying processor's behaviour, and duplicate submissions must be managed at the integrator level.
What this means in practiceโ
- Check before you retry. Don't assume a timeout means nothing happened โ GET the payment first to see if it already succeeded.
- Only resubmit the exact same payload when
failure.retry_possibleistrue. This is PAYSTRAX Gateway's own signal that a retry is safe; retrying after afalseresponse risks a duplicate charge instead of a fix. - Treat network timeouts as indeterminate, not failed. The request may have succeeded on PAYSTRAX Gateway's side even if your client never received the response โ see Unknown state.
- Build your own dedup reference if you need one. Since there's no gateway-enforced idempotency key, consider tagging each attempt with a unique value your own system can check against before resubmitting.
See Handle errors for how to read a response and decide whether a retry is warranted in the first place.