Skip to main content
Available in🇮🇳 India
Standard Checkout offers prepaid payment methods such as UPI, cards, netbanking, wallets and EMI. With Cash on Delivery (COD) activated on your account, Cash on Delivery appears as an additional payment method inside the same checkout. You do not need to build and maintain a separate COD flow outside Razorpay Checkout. You get one integration, one checkout surface and one set of order events.

What Happens When a Customer Chooses COD

  1. The customer selects Cash on Delivery on the Checkout page.
  2. Checkout displays the COD convenience fee you configured and the total payable on delivery.
  3. Razorpay records the selection and marks the order as placed with COD.
  4. Razorpay notifies you with the payment.pending webhook, with method=cod.
  5. You begin fulfilment. Your delivery partner collects cash at the doorstep.
Watch Out!A COD order is placed through Razorpay Checkout, but the amount is collected by you (or your logistics partner) in cash at delivery. No payment is processed through Razorpay for a COD order, so no settlement is generated for it. Use the COD webhook and the Dashboard order view to reconcile.

COD Capabilities

COD comes in three layers. The first is the foundation. The other two recover orders that would otherwise be lost when a prepaid payment fails.
Handy TipsRun capabilities 1 and 2 in production for at least a week before enabling capability 3. Automatic placement changes customer behaviour on failures and should only be introduced once your COD fulfilment and reconciliation are proven.
Given below is how Cash on Delivery appears in the payment method list when no cod_fee is passed on the order: Checkout payment method list showing Cash on Delivery with no convenience fee When you pass a cod_fee, the fee appears against the method: Checkout payment method list showing Cash on Delivery with a 50 rupee extra charge

Responsibilities

COD splits cleanly between you and Razorpay.

Prerequisites

Activate COD

Write to your Razorpay Account Manager or Partner Manager to request activation. If you do not have an Account Manager, raise a request with our support team. Share the following details in your request:

What Happens Next

End to end, expect roughly 7-10 business days from a complete request to live activation, assuming your integration is ready. If any details are missing, our team reaches out before activating.

Integration at a Glance

If COD is already active on your account, integration is four steps and touches only your order creation call and your webhook handler. No change is needed to your Checkout initialisation code.

1. Control Where COD Appears

Once COD is active on your account, it is shown on every Checkout session by default. Razorpay does not filter it for you. If an order is not COD-eligible under your own rules, such as an unserviceable pincode, an order value above your COD cap or a customer with prior RTOs, you must hide it explicitly. Run your eligibility checks before you open Checkout, then pass cod in the hide array of the display configuration:
Checkout options
The hide array sits alongside the other display controls, blocks, sequence and preferences, described in Understand the Configuration. You only need the hide entry to suppress COD.
Watch Out!Hiding always wins. If you hide COD, it does not render even if you passed a cod_fee on the order.

2. Create the Order With a COD Fee

Pass cod_fee in the Orders API when a convenience fee applies to the order. Omit it entirely when no fee applies. Do not pass 0 explicitly. All amounts are in paise.
In this example, the customer sees an item total of ₹1,299, a COD fee of ₹49 and ₹1,348 payable on delivery.

cod_fee Attribute

cod_fee : integer The convenience fee added when the customer pays by COD, in paise. Optional. Pass a value of 0 or more. It must not exceed amount. If you pass a negative value and COD is active on your account, COD is offered with no convenience fee.

What the Customer Sees

3. Open Checkout

No change to your Checkout initialisation code. When COD is active on your account and is not hidden for the order, Standard Checkout renders Cash on Delivery alongside the other payment methods, with the fee passed in cod_fee.

4. Receive the COD Webhook and Start Fulfilment

A COD order does not generate a payment. There is no payment.captured event and no settlement. Treat the payment.pending webhook with method=cod as your signal to begin fulfilment. Verify the signature exactly as you do for your existing Razorpay webhooks.
Handy TipsYour existing webhooks are unaffected. Current subscriptions continue to fire exactly as before. You will see the option to subscribe to payment.pending on the Dashboard once COD is activated on your MID.
Given below is a sample payment.pending payload for a COD order:
payment.pending

Fields to Key Your Logic On

Watch Out!The amount field in the webhook is the total amount payable, including the cod_fee. The cod_fee is not sent separately in the webhook, because you set it yourself for every order.

5. Reconcile

Razorpay does not settle COD amounts. Track each COD order in your system with three values:
  • The order amount.
  • The COD fee.
  • The total payable on delivery.
Reconcile the cash collected by your delivery partner against the total payable. The Dashboard order view and the payment.pending webhook are your two sources of truth for what was placed.

Automatic COD Placement on Payment Failure

Watch Out!This requires separate activation on your MID. Ask your Account Manager explicitly.
Without automatic placement, a failed prepaid payment lands the customer on the retry screen with COD surfaced at the top. With it, Checkout moves the customer directly into the COD flow.

Behaviour on the Retry Screen

This is capability 2 and is included by default with COD. Retry screen after a failed payment, with Cash on Delivery listed above the other retry options

Behaviour With Automatic Placement

This is capability 3. What the customer sees depends on whether a COD fee applies to the order. In both cases, a sheet replaces the retry screen offering Pay Online and Pay on Delivery. What differs is whether the COD order is placed on its own.

Flow A: No COD Fee on the Order

The sheet tells the customer the order can still be placed with Cash on Delivery at no extra charge. The Pay on Delivery button fills over 15 seconds, and the customer can stop it by tapping it. Automatic COD placement with no fee, showing the Pay on Delivery button filling with a Click to Stop label

Flow B: COD Fee Applies

The sheet names the extra charge the customer pays if they continue with COD. Nothing is placed automatically. The customer must tap Pay on Delivery. Automatic COD placement with a fee, showing the extra charge and a Pay on Delivery button that requires an explicit tap

Guardrails

  • Automatic placement fires only on a genuine, confirmed payment failure returned by the payment processor. It does not fire when the customer abandons Checkout, cancels the payment themselves, or the session times out.
  • If the customer refreshes during the automatic placement screen, they see the same screen. The order is never placed twice.
  • RTO risk on automatically placed COD orders sits with you, as it does for all COD orders.

Validation and Errors

How the Orders API handles each cod_fee and currency condition is given below:
Watch Out!A negative cod_fee is not rejected. The order is created and COD is offered with no convenience fee, which means you collect only the order amount at delivery. Validate the fee on your side before you create the order so a calculation error does not silently drop your COD fee.

Test Your Integration

Run the checks below on your test MID with your test credentials before you go live. Ask our team to activate COD on your test account first.
  • An order created with cod_fee succeeds.
  • An order created without cod_fee, with COD active, succeeds.
  • A negative cod_fee succeeds, and COD is offered with no convenience fee.
  • A cod_fee greater than amount is rejected with 400.
  • A non-INR currency is rejected with 400.
  • COD appears in the payment method list, labelled Cash on Delivery.
  • When cod_fee was passed, the fee and total payable on delivery display against COD.
  • When COD is hidden using the display configuration, it does not render.
  • A COD order can be placed successfully.
  • After a prepaid failure with COD active, COD is surfaced on the retry screen.
  • If automatic placement is active, the no-fee flow shows the 15-second loader and Cancel works.
  • If automatic placement is active, the with-fee flow shows the consent sheet and requires confirmation.
  • payment.pending is received with method=cod when a COD order is placed.
  • Signature verification passes.
  • Your fulfilment trigger fires exactly once per COD order.