PHP 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.

PHP Client API#

The api follows the following practices:

  • Namespaced under Razorpay\Api.
  • Call $api->class->function() to access the api.
  • The PHP client throws exceptions instead of returning errors.
  • Options are passed as an array instead of multiple arguments, wherever possible.
  • All request and responses are communicated over JSON.


You can install Razorpay using a composer or by downloading the required ZIP file.


Run the below command on your composer:

composer require razorpay/razorpay:2.*

Download the ZIP File#

If you are not using a composer:

  • Download and unzip the latest file from the releases section. The is pre-compiled to include all dependencies.

  • Include the Razorpay.php file in your application and you can use the API as usual.


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