Submit Return Event

How to submit refunds/returns using the Events API.

This guide explains how to submit return and refund data to LoudCrowd so commissions are correctly adjusted when items are returned. These requests use the same single endpoint as order events and are selected by header.

  • Endpoint: POST https://api.loudcrowd.com/event/ecomm
  • Topic header: X-LC-TOPIC: ORDER_UPDATE
  • Authentication and base payload: see Submit Order Event

Important Notes

Refund Line Item ID Management

The refund_line_item_id is critical for proper commission tracking:

  • Uniqueness: Each refund must have a unique refund_line_item_id.
  • Consistency: Use the same refund ID across multiple updates to the same refund.
  • Deduplication: LoudCrowd uses these IDs to prevent duplicate refund processing.

Commission Adjustment Logic

When processing returns:

  1. Full Refund: If the refund amount equals the line item amount, the entire line item is disqualified for commissions.
  2. Partial Refund: If the refund amount is less than the line item amount, commissions are adjusted proportionally.
  3. Multiple Refunds: Each refund must have a unique ID to track partial returns correctly.

Order Amount Updates

When submitting return events:

  • Update the amount field to reflect the new total after refunds.
  • Update platform_updated_at to the current timestamp.
  • Include all original line_items plus the new refund_line_items.

Common Scenarios

Full Item Return

{
  "refund_line_item_id": "REFUND_001",
  "line_item_id": "1",
  "platform_refunded_at": "2021-01-03T10:00:00Z",
  "sku": "SKU1",
  "variant_sku": "VARIANT1",
  "amount": "100.00",
  "tax": "6.00",
  "quantity": "2"
}

Partial Item Return

{
  "refund_line_item_id": "REFUND_002",
  "line_item_id": "1",
  "platform_refunded_at": "2021-01-03T10:00:00Z",
  "sku": "SKU1",
  "variant_sku": "VARIANT1",
  "amount": "50.00",
  "tax": "3.00",
  "quantity": "1"
}