Submit order data to LoudCrowd for attribution and commission calculation.
This endpoint allows you to send order data to LoudCrowd so that orders can be properly attributed to creators and commissions can be calculated. LoudCrowd uses this data to identify which orders are attributed to creators and calculate the commissions earned from each order.
Note: The Events API is a single endpoint (
POST https://api.loudcrowd.com/event/ecomm
). Behavior is selected via theX-LC-TOPIC
header (ORDER_CREATE
,ORDER_UPDATE
,ORDER_CANCEL
). For refunds/returns specifics, see the Submit Return Event guide.
Prerequisites
Before using this endpoint, ensure that:
- LoudCrowd SDK is installed on your ecommerce site
- LoudCrowd shoppable program has been set up to generate affiliate links
Authentication
The API uses HMAC-SHA256 signature authentication. Each request must include:
- X-LC-SHOP-ID: Your LoudCrowd internal shop ID (found in the LoudCrowd dashboard)
- X-Signature: SHA256 hexdigest of the UTF-8 encoded JSON payload
- X-LC-TOPIC: Event type (
ORDER_CREATE
,ORDER_UPDATE
, orORDER_CANCEL
) - Content-Type:
application/json
Important Notes
Refund Line Item IDs
The refund_line_item_id
is crucial for LoudCrowd to distinguish between new refunds and existing ones. These IDs must be:
- Unique for each line item returned in the order
- Consistent between multiple order update events
- Different for each refund entity in a single order
Providing lc_anon_id
If you haven't configured the order confirmation script, you can get the tracking ID using:
window.loudcrowd.identifyDevice();
Gross Taxation Policy
For regions using gross taxation (tax included in price):
- Amount: Send the gross amount (item price with tax included)
- Tax: Send the VAT amount
Use this formula to extract tax from gross amounts:
tax = round(amount - (amount / (1 + tax_rate)), 2)
Where tax_rate
is the decimal representation (e.g., 0.2 for 20% VAT).
Best Practices
- Security: Keep your pre-shared key secret and never store it in source code
- Error Handling: Always check for 200 status code responses and handle 400+ errors
- Logging: Build internal logging around status code errors
- Timing: Send events as soon as orders are placed
- Consistency: Build a back-fill pipeline alongside the events API
- Validation: Ensure all required fields are present and properly formatted