How Magic Checkout Works

Understand the Razorpay Magic Checkout flow and how it works.


Given below is a complete end-to-end flow about how you can use Magic Checkout.

  1. Enable the Magic Checkout feature for your Razorpay account.
  2. If you want to provide Cash on Delivery to your customers, enable the COD payment method.
  3. If you are integrating Magic Checkout on your , create the coupons and shipping info webhook URLs on your server and pass those to Razorpay.
  4. Create the order using our and send the order_id to Razorpay Checkout.
    Handy Tips
    This step is not needed if you are using our Magic Checkout WooCommerce plugin.
  5. The customer clicks the pay button to open the Razorpay Checkout pop-up page. Based on the feature you enable:
    • Coupon Code: The customer can enter coupon codes generated at your end and avail discounts.
    Add Coupon on Checkout
    • Shipping Address: The customer is asked to enter their shipping and billing addresses or select from existing saved addresses. In case of a new address, the zipcode is verified in the background to determine whether COD should be displayed to the customer. Shipping charges will be applied based on your configuration.
    Verified zipcode and shipping charges
    • Cash on Delivery: The customer is shown COD as a payment method, the COD charges and the associated shipping charges. Cash on delivery charges will be applied based on your configuration.
    Cash on delivery as a payment method and charges
  6. The customer provides the necessary details, reviews the order summary and confirms the order.
    Magic Checkout order summary
  7. Razorpay sends the customer and order details to you via APIs.

Was this page helpful?