Skip to the tool
MoveAheadPayments Toolbox

Razorpay error code: SERVER_ERROR

An unexpected error occurred on Razorpay's side while processing the request. Their documented description is "We are facing some trouble completing your request at the moment. Please try again shortly." — it is transient and the remedy is a retry.

SERVER_ERRORRetryableHTTP 500

The same request can succeed later. Retry with backoff.

What it means

Something failed inside Razorpay rather than at a downstream bank (which would be GATEWAY_ERROR) or in your request (BAD_REQUEST_ERROR). There is nothing to fix in your integration. What matters is that your code treats it as transient rather than as a definitive failure, and that a retry cannot create a duplicate.

Common causes

  • A transient internal failure at Razorpay.
  • Capacity problems during a traffic peak — festival sales and salary dates are the predictable ones in India.
  • A partial outage affecting one API surface while others stay healthy.

How to fix it

  1. Retry after a short delay, with exponential backoff and a cap on attempts.
  2. Use an idempotency key on any request that creates something, so a retry of a request whose response you never saw cannot create a second order or payment.
  3. Do not mark an order failed on a single 500. Fetch its status before deciding — a request that timed out may have succeeded.
  4. Alert on a sustained rate rather than on individual occurrences. One is noise; a run of them is an incident worth raising with Razorpay support.

Tools that help

Frequently asked questions

How do I stop a retry creating a duplicate order?
Send an idempotency key with the original request and reuse it verbatim on every retry. Razorpay returns the original result rather than creating a second entity. Without one, a retry after a timeout is genuinely a second request and will be treated as such.