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

# Order complete webhook

> Receive order-complete events from your commerce platform to trigger automated post-purchase review request flows.

`POST {BASE_URL}/webhooks/order-complete`

## Headers

| Header                | Required                                                      |
| --------------------- | ------------------------------------------------------------- |
| `X-Merchant-Id`       | Yes                                                           |
| `X-Webhook-Signature` | Yes — HMAC-SHA256 of raw JSON body using your webhook secret. |

## Body parameters

<ParamField body="orderId" type="string" required>Order reference.</ParamField>
<ParamField body="customerEmail" type="string" required>Customer email.</ParamField>
<ParamField body="customerName" type="string" required>Customer name.</ParamField>
<ParamField body="customerID" type="string" required>Your internal customer ID.</ParamField>
<ParamField body="deliveryDate" type="string" required>ISO 8601 UTC delivery timestamp.</ParamField>
<ParamField body="products" type="array" required>Array of `{ productId, productName, quantity, price }`.</ParamField>
<ParamField body="reviewPageUrl" type="string" required>URL where customer lands to leave their review.</ParamField>

## Example

```json theme={null}
{
  "orderId": "ORDER-10045",
  "customerEmail": "customer@example.com",
  "customerName": "John Doe",
  "customerID": "CUST-123",
  "deliveryDate": "2026-01-20T10:00:00Z",
  "products": [
    { "productId": "SKU-001", "productName": "Classic Tee", "quantity": 1, "price": 59.95 }
  ],
  "reviewPageUrl": "https://yourstore.com/review"
}
```

## Signing the request

```javascript theme={null}
const crypto = require('crypto');
const body   = JSON.stringify(payload);
const sig    = crypto.createHmac('sha256', process.env.RF_WEBHOOK_SECRET)
                     .update(body).digest('hex');
// Header: X-Webhook-Signature: sig
```


## OpenAPI

````yaml openapi.yaml POST /webhooks/order-complete
openapi: 3.0.0
info:
  title: ReviewFlow API
  description: >-
    ReviewFlow is a fully managed ratings, reviews, and UGC platform by
    Tailoredd. This API covers batch reviews, product reviews, Q&A, media
    management, webhooks, tokens, analytics, incentives, and CSV export
    endpoints.
  version: 2.3.0
servers:
  - url: https://cdn.tailoredd.com/apiV2
    description: Production Gen 2 API front door
security: []
tags:
  - name: Batch Reviews
    description: Fetch rating summaries for multiple products in a single request.
  - name: Webhooks
    description: Receive post-purchase order events to trigger review request flows.
  - name: Tokens
    description: Validate and revoke review request tokens sent to customers.
  - name: CSV Export
    description: Asynchronous export of reviews or questions as CSV files.
  - name: Health
    description: Service availability and version check.
  - name: Cloudinary Media
    description: Upload, retrieve, and delete media assets attached to reviews.
  - name: Reviews & Ratings
    description: Create, read, moderate, and interact with product reviews.
  - name: Featured Reviews
    description: Feature or unfeature reviews for prominent display.
  - name: Questions & Answers
    description: Product Q&A with moderation and merchant answers.
  - name: Admin Dashboard
    description: Admin analytics and dashboard aggregation endpoints.
  - name: Custom Attributes (Growth+/Enterprise)
    description: Manage custom review form attributes like fit, quality, etc.
  - name: Incentive Claims
    description: Track and fulfill review incentive coupon claims.
  - name: Sentiment Analysis
    description: Filter reviews by NLP-derived sentiment labels.
  - name: Google Shopping Feed
    description: Generate and check eligibility for Google product reviews XML feed.
paths:
  /webhooks/order-complete:
    post:
      tags:
        - Webhooks
      summary: Order Complete Webhook
      description: |-
        Post-purchase webhook to generate review request tokens.

        Required Headers:
        - X-Merchant-Id: Your merchant ID
        - X-Webhook-Signature: HMAC-SHA256 signature of request body

        The signature is generated using your webhook secret.
      operationId: webhookOrderComplete
      parameters:
        - name: X-Merchant-Id
          in: header
          schema:
            type: string
          example: your-merchant-id
        - name: X-Webhook-Signature
          in: header
          schema:
            type: string
          description: HMAC-SHA256 signature of request body
          example: sha256=abc123...
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                orderId: order-sample-001
                customerEmail: customer@example.com
                customerName: John Doe
                customerID: CUST-123
                deliveryDate: '2025-11-27T10:00:00.000Z'
                products:
                  - productId: product-123
                    productName: Sample Product
                    quantity: 1
                    price: 99.99
                reviewPageUrl: https://merchant.com/review
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad Request / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
      required:
        - success
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Rating must be between 1 and 5
      required:
        - success
        - error

````