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.

.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 Dictionary instead of multiple arguments, wherever possible.
  • All request and responses are communicated over JSON.


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

NuGet Package Manager#

  • Download the latest Source code zip file from the releases section on GitHub.

  • Download and install the NuGet Package Manager. Note:
    Nuget Package Manager only supports .NET 4.0 and .NET 4.5. Ensure 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 Command-Line Interface installed on your system to use this method.
Click here to download .NET Core Command-Line Interface.

  • Download the latest Source code file from the release section on GitHub.

  • Run the following command:

Copydotnet add package Razorpay --version {version_number}


In case the last command fails with "invalid cert received from server", run below 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


The Razorpay PHP SDK is released under the MIT License. Click here for details.