Below is a high-level representation of the Razorpay payment flow.
The customer selects an item on your website or app. An order is created and is sent to your server.
For every order created in your site, let's say,
order_ID a corresponding
razorpay_order_ID is created in Razorpay's servers.
To know how Orders are created in Razorpay, refer our Orders documentation.
In the client-side implementation of your application, the customer selects the appropriate payment method, clicks Pay and completes the payment. The payment details obtained from the customer are sent to your server.
By integrating with Razorpay, the payment details entered in the Checkout will be first 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.
View our platform-wise integration list to choose the right integration method for you. In case you do not have a website or app, you can use any of these Razorpay products to accept payments from customers.
The payment details collected from the customer are sent to your bank. 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. Once authorized, the transaction amount is retained with Razorpay and is not settled to your account immediately.
There could be situations when an authorized payment, yet to be debited from the customer's account, is interrupted by external factors such as network issues, technical errors at customer's bank's end, manual intervention and so on.
For detailed information about Late Authorization, refer
Once the payment is authorized by the customer's bank, you must verify if the authorized amount deducted from the customer's account is the same as the amount entered by the customer in the Checkout form. The authorized amount will be settled to your account only after this validation step.
Any authorization not followed by a capture within 5 days is automatically deemed void and a refund is initiated.
Standard capture is an authorization followed by a
delayed capture of the payment. In this scenario, if a customer has made the payment, the amount will be deducted from their bank account by Razorpay. The authorized amount will be settled to your account only after a
capture request is initiated by you.
This can be done either from the Dashboard or using the Capture API.
Auto Capture is the authorization followed by an 'immediate' capture of the payments. This enables the payments to be captured automatically before the end of the authorization period, thereby saving your time when processing Orders.
Auto Capture requires the implementation of Order API.
After a successful capture of the funds, the amount is settled to your account according to your settlement schedule.
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.
Refunds can be done either from the Dashboard or using the Refund API.