Skip to main content
GET
/
api
/
conversions
/
postback
curl -X GET "https://api.linquid.io/api/conversions/postback?lw_cid=abc123xyz789&amount=99.99&currency=USD&event=purchase&orderId=ORD-12345" \
  -H "X-API-Key: lw_your_api_key_here"
{
  "success": true,
  "data": {
    "conversionId": "conv_def456",
    "clickId": "abc123xyz789",
    "tracked": true
  }
}

Query Parameters

lw_cid
string
required
The click ID from the original redirect
amount
number
Conversion value/amount
currency
string
default:"USD"
ISO currency code
event
string
default:"conversion"
Conversion event type
orderId
string
Your unique order/transaction ID
payout
number
Cost/payout amount for ROI tracking
curl -X GET "https://api.linquid.io/api/conversions/postback?lw_cid=abc123xyz789&amount=99.99&currency=USD&event=purchase&orderId=ORD-12345" \
  -H "X-API-Key: lw_your_api_key_here"
{
  "success": true,
  "data": {
    "conversionId": "conv_def456",
    "clickId": "abc123xyz789",
    "tracked": true
  }
}

Integration Examples

Shopify Webhook

// Shopify order webhook handler
app.post('/webhooks/shopify/order', async (req, res) => {
  const order = req.body;

  // Extract click ID from order note attributes or URL params
  const clickId = order.note_attributes?.find(
    attr => attr.name === 'lw_cid'
  )?.value;

  if (clickId) {
    await fetch(
      `https://api.linquid.io/api/conversions/postback?` +
      `lw_cid=${clickId}&amount=${order.total_price}&currency=${order.currency}&orderId=${order.id}`,
      { headers: { 'X-API-Key': process.env.LINQUID_API_KEY } }
    );
  }

  res.sendStatus(200);
});

WordPress/WooCommerce

// WooCommerce order completed hook
add_action('woocommerce_thankyou', function($order_id) {
  $order = wc_get_order($order_id);
  $click_id = WC()->session->get('lw_cid');

  if ($click_id) {
    $url = 'https://api.linquid.io/api/conversions/postback?' . http_build_query([
      'lw_cid' => $click_id,
      'amount' => $order->get_total(),
      'currency' => $order->get_currency(),
      'orderId' => $order_id,
    ]);

    wp_remote_get($url, [
      'headers' => ['X-API-Key' => LINQUID_API_KEY]
    ]);
  }
});

Best Practices

Store the click ID early - Capture lw_cid from the landing page URL and store it in session/cookie immediately. Pass it through your checkout flow.
Idempotency - Include a unique orderId to prevent duplicate conversions if the postback is retried.