Razorpay Custom Checkout Integration - Best Practices
Custom Checkout is an integration provided by Razorpay where you can completely customize the checkout as per your requirements and use it as a white label solution.
You can configure payment methods, orders, company logo and also select custom color based on your convenience. This checkout supports all the major browsers (IE 9 and above).
Given below are some of the best practices to be followed for a smoother integration and payment experience:
While Razorpay strives to provide a positive payment experience to every customer, they might face payment exceptions such as:
- Late Authorization
- Payment Downtime
- Payment Errors
To overcome such exceptions and provide a smooth payment experience to your customers, use the Payments Rainy Day kit.
Orders help in binding multiple payment attempts against a single order. This helps to prevent multiple payments. Integrate with Orders API on your server-side and pass the
order_id to Checkout.
This is a mandatory step that allows you to confirm the authenticity of the details returned to the Checkout form for successful payments.
Read more: Learn how to verify payment signature.
Check the payment/order status, that is if the payment's status is
captured and the order's status is
paid before proving the services to the customers.
You can determine payment and order status using:
Implement webhooks or the query API to avoid any cases of callback failure (drop offs could be connectivity or network failure) and to verify the payment details via an S2S call. Some of the webhook events you should enable are:
Read more: Learn more about Webhooks.
callback_url if your customer's make online payments on browsers such as Instagram, Facebook Messenger, Opera, UC browsers and so on. This is because, these browsers do not support i-frame.
Follow these best practices if you accept card payments from customers:
- Validate the card number to avoid any payment failures. Learn more about Card Validation.
- Use the Saved card feature provided by Razorpay for better user experience and prevent payment failures because of incorrect card details.
Follow these best practices if you accept UPI collect payments from customers:
- Validate the VPA before initiating the payment request. Learn more about VPA Validation.
- Add a custom UPI Collect expiry based on the business requirement to provide enough time for the customer to complete the payment.
- Use the Saved VPA feature provided by Razorpay to provide a better customer experience and avoid payment failures.