API ReferenceIntegrationsKnowledge Base

.NET Client

The Razorpay Payment Gateway enables you to accept payments via debit card, credit card, netbanking (supports 3D Secure), UPI or through any of our supported wallets. Refer to the Payment Methods section for a list of payment methods we support.


  • .NET 4.5 with TLS version 1.2

TLS version 1.2 will work only with .NET version 4.5. Using it with a lower .NET version will lead to errors.

.NET Client API#

The .NET Client API follows the below practices:

  • Namespaced under Razorpay.Api.
  • The .NET client throws exceptions instead of returning errors.
  • Options are passed as a Dictionary instead of multiple arguments, wherever possible.
  • All requests and responses are communicated over JSON.


You can install Razorpay using the NuGet Package Manager or using the .NET Core command-line interface (CLI).

NuGet Package Manager#

  1. Download the latest source code zip file from the releases section on GitHub.
  2. Download the NuGet Package Manager and install it. Note:
    Nuget Package Manager only supports .NET 4.0 and higher. Make sure that you have the appropriate version of .NET installed.
  • Run the following command on the NuGet Package Manager:

    CopyInstall-Package Razorpay -Version {version_number}

Terminal/Command Prompt#

You must have .NET Core CLI installed on your system to use this method. Download .NET Core CLI.

  1. Download the latest source code file from the nuget.org.

  2. Run the following command:

    Copydotnet add package Razorpay --version {version_number}

In case the last command fails with "invalid cert received from server", run the following commands:

Copyyes | certmgr -ssl -m https://go.microsoft.com yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net yes | certmgr -ssl -m https://myget.org yes | certmgr -ssl -m https://nuget.org mozroots --import --sync --quiet