API ReferenceIntegrationsKnowledge Base

Payment Flow

Below is a high-level representation of the Razorpay payment flow.

Try it out#

You can test our Checkout by clicking the PAY WITH RAZORPAY. This initiates a ₹1 payment. Provide your phone number, email address, select your preferred payment method and complete the payment.

Live Transaction with Auto Refund:
This is a real transaction and money will be deducted from your account. However, the amount debited will be auto-refunded to your account in 5-7 working days.

Watch the animation below for more details on how the Razorpay Checkout form works.

1. Customers place an order on your website or app#

A customer visits your website or app, selects items they want to purchase and places an order. For each order placed by your customer, create a transaction_id or checkout_id on your server for your reference. For example, #trn-369.

3. Pass Order ID to the checkout and collect payment details#

Pass the order_id returned by Razorpay to your Checkout. This invokes the Checkout allowing your customer to make the payment using your client-side integration.

The customer selects the appropriate payment method, clicks Pay and completes the payment. The payment details entered by the customer are sent to the Razorpay servers. The payment details submitted are secured and stored by Razorpay as tokens. The generated tokens are exchanged with your servers for further use.

4. Authentication of a payment#

Internally, Razorpay sends an authentication request to the customer's bank. After appropriate authentication, Razorpay is authorized to deduct the amount from the customer's bank account.

For successful payments, the Checkout returns the following:

  • razorpay_order_id
  • razorpay_payment_id
  • razorpay_signature

Read more: Payment Life Cycle.

5. Capture the payment#

Once your customer completes the payment and Razorpay authenticates it, you must capture the payment. You can either:

  • Auto-capture payments.
  • Manually capture payments.

Read more: Learn more about Payment Capture Settings.

You can also verifying the payment signature. This allows you to ensure that the payment is received from an authentic source.

Settlements#

After a payment successful captured, the amount is settled to your account according to your settlement schedule.

Read more: Learn more about Settlements.

Refunds#

After the funds are settled to your account, customers could request for a refund. In such cases, you can initiate a refund and the funds are sent back to the customer's account.

Read more: Learn more about Refunds.

×