> ## 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.

# Create a Review Request

> Create a Review Request using the Razorpay Orders Review API.

Available in
🇮🇳 India

Use this endpoint to create a review request that asks a customer to review a purchase. Set exactly one of `order_id` and `external_order`:

* `order_id` references an existing Razorpay Order.
* `external_order` carries the details of a sale that happened outside Razorpay, such as a POS bill or a marketplace order.

> [!NOTE]
>
> **Handy Tips**
>
> Create is idempotent, scoped to one request per order per merchant. The idempotency key is `external_order.receipt`, or `order_id`. The first call returns `201`, and a repeat returns `200` with the stored entity. Field changes sent on a replay are ignored.

```bash Curl theme={null}
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/orders/review_requests \
-H "content-type: application/json" \
-d '{
  "customer": {
    "name": "Ananya",
    "contact": "+919812345621",
    "email": "ananya@example.com"
  },
  "external_order": {
    "receipt": "RISTA-88921",
    "source": "pos",
    "fulfillment": "instant",
    "purchased_at": 1752739200,
    "line_items": [
      {
        "sku": "SKU-BT-114",
        "name": "Attikan Estate",
        "quantity": 1,
        "image_url": "https://cdn.example.com/attikan.jpg"
      }
    ]
  }
}'
```

```json Success theme={null}
{
  "id": "rvreq_Nct0mnpQ12abcd",
  "entity": "order.review_request",
  "status": "created",
  "is_razorpay_order": false,
  "applies_to": ["product", "order"],
  "order_id": null,
  "external_order": {
    "receipt": "RISTA-88921",
    "source": "pos",
    "fulfillment": "instant",
    "line_items": [
      {
        "sku": "SKU-BT-114",
        "name": "Attikan Estate",
        "variant_id": "250g-wb",
        "quantity": 1,
        "image_url": "https://cdn.example.com/attikan.jpg"
      }
    ],
    "purchased_at": 1752739200,
    "delivered_at": null
  },
  "cancelled_at": null,
  "reviews": [],
  "notes": {},
  "created_at": 1752739210
}
```

```json Failure theme={null}
{
  "error": {
    "code": "BAD_REQUEST_ERROR",
    "description": "Set exactly one of order_id and external_order.",
    "source": "business",
    "step": "payment_initiation",
    "reason": "input_validation_failed",
    "field": "external_order"
  }
}
```

## Request Parameters

**order\_id** `string`

Reference to an existing Razorpay Order. Mutually exclusive with `external_order`. Set exactly one of the two.

**external\_order** `object`

Embedded order details for a non-Razorpay sale. Mutually exclusive with `order_id`. Set exactly one of the two.

**external\_order.receipt** `string` *required*

The merchant's own order id, the same field as `receipt` on a Razorpay Order. It must be unique per merchant and 1-256 characters long. It acts as the idempotency key.

**external\_order.source** `string`

Origin platform of the order, such as `pos`, `business` or a marketplace name. Razorpay sets this for platform-fetched orders (`shopify`, `woocommerce`).

**external\_order.fulfillment** `string`

Fulfilment type of the order. Use `instant` for counter or POS sales, and `pending_delivery` for shipped orders.

**external\_order.line\_items** `array`

The items on the order, 1-100 of them. Each item takes `sku`, `name`, `variant_id`, `quantity` and `image_url`. The `name` and `image_url` appear in the WhatsApp message and on the review page.

**external\_order.purchased\_at** `integer`

Unix timestamp when the order was purchased.

**external\_order.delivered\_at** `integer`

Unix timestamp when the order was delivered.

**customer** `object`

The customer's contact details, with `name`, `contact` and `email`. `contact` is required unless `customer_id` is set. This object is write-only.

**customer\_id** `string`

Razorpay Customer id, prefixed `cust_`. When set, contact details come from the Customer and `customer` may be omitted.

**applies\_to** `array of strings`

What the customer is asked to review: `product`, `order`, or both, as an array. The default is `["product", "order"]`. It must not be empty.

**notes** `json object`

Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`.

## Response Parameters

See the [Review Request entity](https://razorpay.com/docs/api/orders/reviews/review-request-entity.md) for the full list of response parameters.

## Errors

> [accordion] Authentication failed.
>
> **Code:** `401`
>
> The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:
>
> * Different keys for test mode and live modes.
> * Expired API key.
>
> **Solution:** The API keys must be active and entered correctly with no whitespace before or after the keys.

> [accordion] Set exactly one of order\_id and external\_order.
>
> **Code:** `400`
>
> The request body carried both `order_id` and `external_order`, or neither. The two are mutually exclusive, and exactly one is required.
>
> **Solution:** Pass `order_id` for a Razorpay sale, or `external_order` for a sale made outside Razorpay, but not both.

> [accordion] The field external\_order.receipt is required.
>
> **Code:** `400`
>
> `external_order` was sent without a `receipt`. The receipt is the merchant order id and the idempotency key, so it is mandatory on an external order.
>
> **Solution:** Include `external_order.receipt`, unique per merchant and 1-256 characters long.

> [accordion] contact is required unless customer\_id is set.
>
> **Code:** `400`
>
> Neither `customer.contact` nor `customer_id` was provided, so Razorpay has no way to reach the customer.
>
> **Solution:** Pass `customer.contact`, or set `customer_id` to link an existing Razorpay Customer.

> [accordion] Reviews are not enabled for this merchant.
>
> **Code:** `400`
>
> The review collection feature is not active on your account.
>
> **Solution:** Contact Razorpay support to enable review collection for your account.

> [accordion] Duplicate request. This request has already been processed.
>
> **Code:** `200`
>
> A review request already exists for this `order_id` or `external_order.receipt`. Create is idempotent, so the existing entity is returned instead of a new one.
>
> **Solution:** No action needed. Use the returned entity. Field changes sent on the replay are ignored.

> [accordion] Rate limit exceeded.
>
> **Code:** `429`
>
> You exceeded the create rate limit of 10 requests per second per merchant (burst 20).
>
> **Solution:** Throttle your create calls and retry after a short delay.
