Ruby Client

Learn how to install the Ruby server-side SDK to interact with Razorpay APIs to start accepting payments from your customers.


  1. Add the below line to your Gemfile of the application:

    Copygem 'razorpay'
  2. Execute the following command:

    Copy$ bundle

    Alternatively, you can install it by executing the following command:

    Copy$ gem install razorpay

Video Tutorial🔗

Watch this video to know how to integrate Razorpay Payment Gateway with Ruby-based website.

Payment Capture Settings🔗

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.

  • Auto-capture payments (recommended)
    Authorized payments can be automatically captured. You can auto-capture all payments using global settings on the Razorpay Dashboard. Watch Out!
    Payment capture settings work only if you have integrated with Orders API in your server side. Know more about the Orders API.
  • Manually capture payments
    Each authorized payment can also be captured individually. You can manually capture payments:

Know more about Capture Settings for payments.

Address Verification System🔗

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.