## Retry Policy

In case of getting a code "501" (see the [Response Codes](/content/integration/seamless-wallet-api/general/response-codes)) in response to a failed Credit or Cancel request, RubyPlay will trigger the retry policy on our side.

RubyPlay applies different retry policies depending on the request type:

Cancel requests are retried as follows:
Up to 10 immediate retries without delay.
If still unsuccessful, retries continue with a 1-minute delay between attempts.
Retries continue until RubyPlay receives a successful response from the Operator.

Credit requests follow a multi-stage retry policy:

Stage 1 — Initial retry window
RubyPlay performs retries for up to 30 seconds, with a 1-second delay between attempts (up to 10 retries depending on timing).
During this stage, the player will not see an error.

Stage 2 — Additional immediate retries
If no valid response is received after the initial retry window, RubyPlay performs up to 10 additional retries without delay.

Stage 3 — Long-term retries
If still unsuccessful, retries continue every 1 minute until RubyPlay receives an HTTP 200 “OK” from the Operator.

RubyPlay will never retry the Debit request.