Prerequisites🔗
- .NET 4.5 with TLS version 1.2
Handy Tips
TLS version 1.2 will work only with .NET version 4.5. Using it with a lower .NET version will lead to errors. Refer to the FAQs section.
Install the .NET server-side SDK to interact with Razorpay APIs to start accepting payments.
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.
Handy Tips
TLS version 1.2 will work only with .NET version 4.5. Using it with a lower .NET version will lead to errors. Refer to the FAQs section.
The .NET Client API follows the below practices:
Razorpay.Api
.You can install Razorpay using the NuGet Package Manager or using the .NET Core command-line interface (CLI).
Run the following command on the NuGet Package Manager:
CopyInstall-Package Razorpay -Version {version_number}
Note:
You must have .NET Core CLI installed on your system to use this method. Download .NET Core CLI.
Download the latest source code file from the nuget.org.
Run the following command:
Copydotnet add package Razorpay --version {version_number}
Note:
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
After payment is authorized
, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time.
Know more about Capture Settings for payments.
If you are accepting international payments, you can use Razorpay's Address Verification System (AVS). AVS verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments.
Know more about Address Verification System.
Razorpay PHP SDK is released under the MIT License.
If you have any queries, raise a ticket on Razorpay Support Portal.
If you have a feature request, create an issue on GitHub.