Errors

List of errors that could arise during Razorpay OAuth integration.


Given below is a list of errors you might face while integrating with Razorpay OAuth.

ErrorCauseSolution
The authorization grant type is not supported by the authorization server.
  • The response_type is not provided or is not code.
  • The client_id is not provided.
  • Ensure that you pass the response_type as code.
  • Provide your application client_id.
A server error occurred while serving this error.One or more of the following is not provided:
  • State
  • Scope
  • Redirect URI
Ensure that you enter the state, scope and redirect_uri .
The requested scope is invalid, unknown or malformedThe scope entered is invalid.Use a valid scope. Possible values are read_only and read_write .
Client authentication failedThe client_id or redirect_uri provided is wrong.Use a valid client_id and redirect_uri .
Access is forbiddenThe scope entered is invalid.Use a valid scope. Possible values are read_only and read_write .

ErrorCauseSolution
Check the client_id parameterThe client_id is not provided.Provide your application client_id .
Check the client_secret parameterThe client_secret provided is not a string.Ensure that the client_secret is a string.
Invalid Client or Grant typeThe client_id does not exist.Use a valid client_id .
Access deniedThe client_secret provided is wrong.Use a valid client_secret .
Check that all required parameters have been provided
  • The grant_type provided is invalid.
  • The authorization_code is not provided.
  • Use a valid grant_type.
  • Ensure that you enter the authorisation code.
Check the redirect_uri parameterThe redirect_uri is not provided or is not a string.Ensure that the redirect_uri is a valid string.
Client authentication failedThe redirect_uri provided does not match the one configured with the client.Use the redirect_uri that is configured with the client.
Only allowed modes are test or liveThe mode used is not valid.Only use either live or test mode.
Mode can be only set to live for production clientsA production client is using test mode API keys.Ensure that you only use live API keys if you are a production client.
Cannot decrypt the authorization codeThe authorization_code provided is invalid.Use a valid authorisation code.
Authorization code has expiredThe authorization_code provided has expired.Use a valid authorisation code.
Authorization code has been revokedThe authorization_code provided has been revoked.Use a valid authorisation code.
Authorization code was not issued to this clientThe authorization_code provided does not belong to the client id used.Ensure that the authorization_code belongs to the client id used.
Invalid redirect URIThe redirect_uri entered is incorrect.Ensure that the redirect_uri entered matches the one added in the application settings.

In addition to the

, you may also face the below errors when refreshing a token.

ErrorCauseSolution
Check the refresh_token parameterThe refresh token is not provided.Ensure that you enter the refresh token in the request.
Cannot decrypt the refresh tokenAn invalid refresh token is provided.Use a valid refresh token.
Token is not linked to clientThe refresh token provided:
  • Does not belong to the client id.
  • Has expired.
Use a valid refresh token that belongs to the client id provided.
Token has been revokedThe refresh token provided has been revoked.Use a valid refresh token.

ErrorCauseSolution
Could not validate the token provided
  • The access token used is invalid, has expired or has already been revoked.
  • The access token used does not belong to the OAuth client id provided.
  • Use a valid access token that has not been revoked yet.
  • Ensure that the access token belongs to the OAuth client id provided.
The server encountered an error. The incident has been reported to adminsThe server was not able to process the request.Retry after some time.

Was this page helpful?