> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 5. Cash on Delivery

> Switch full and partial Cash on Delivery on or off for a sub-merchant using the Razorpay Method Management API.

Available in
🇮🇳 India

`cod` is a payment method with two instruments. COD needs no onboarding with a provider. Enabling an instrument makes it `activated` and enabled at once, and `estimated_activation_days` is `null`.

| Instrument | Meaning |
| - | - |
| `full` | The customer pays the whole order amount in cash on delivery. |
| `partial` | The customer pays part of the order amount online at checkout and the rest in cash on delivery. |

## 5.1 Fetch COD

```bash Curl theme={null}
curl -X GET "https://api.razorpay.com/v3/accounts/acc_TcdGEzmfKQzEl1/products/payment_gateway/payment_methods?method=cod" \
-u rzp_live_partner_[CLIENT_ID]:[CLIENT_SECRET]
```

The response holds one item, the `cod` payment method, with both instruments.

## 5.2 Enable or Disable COD

Switch each instrument with its own call:

```bash Curl theme={null}
curl -X PATCH https://api.razorpay.com/v3/accounts/acc_TcdGEzmfKQzEl1/products/payment_gateway/payment_methods \
-u rzp_live_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "X-Idempotency-Key: 6d2e8a14-0c7b-4f3e-a1d9-52b7c3e9f018" \
-H "Content-Type: application/json" \
-d '{
  "method": "cod",
  "instrument": "partial",
  "enabled": true
}'
```

> [!NOTE]
>
> **Handy Tips**
>
> * COD settings and rules have their own APIs, `/v3/accounts/{account_id}/cod_settings` and `/v3/accounts/{account_id}/cod_rules`. This API only switches the two instruments on or off.
> * The `payment_methods.cod` configuration in the Onboarding APIs holds one `enabled` switch for the whole store. COD has no capability there.

## Next Step

[Error Codes](https://razorpay.com/docs/partners/aggregators/onboarding-api/error-codes.md)
