Skip to content
Wertla

Wertla

Docs for shops

Short and concrete: how your products and orders reach Wertla. Every path goes through your merchant account.

Overview

There are two data streams: products (prices, stock, pictures) and orders (only order number, amount, currency, status and the click ID). No customer data.

Shopify

Install the Wertla app from the link in your merchant area. The app transfers products, variants, stock and GTIN, sets up the tracking pixel (only with marketing consent) and shows account, credit and campaigns. Optionally allow order status so cancellations and refunds arrive automatically.

WooCommerce

  1. Install and activate the "Wertla Connector" plugin.
  2. In the merchant area under Integrations, create a one-time code (valid 15 minutes).
  3. In the plugin under WooCommerce, Settings, Wertla, enter the code and connect. Key and secret are stored securely.
  4. Click "Sync now". After that, changes and order status run automatically.

Feed URL

Google Merchant XML, CSV and JSONL are supported. At least: id, title, link (on your domain), price, currency, availability; recommended: gtin (EAN), brand, image_link, shipping. We fetch the feed daily. Links outside your domain are rejected.

Google Merchant XML
<?xml version="1.0"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"><channel>
  <item>
    <g:id>SKU-1</g:id><title>Product name</title>
    <link>https://your-shop.example/p/sku-1</link>
    <g:price>129.90 EUR</g:price><g:availability>in stock</g:availability>
    <g:gtin>4006381333931</g:gtin><g:brand>Brand</g:brand>
    <g:image_link>https://your-shop.example/img/sku-1.jpg</g:image_link>
  </item>
</channel></rss>

CSV upload

Up to 10 MB, column names as in a Google Merchant feed. Preview first, then import: "merge" or "replace".

Server API for any shop

You report orders signed from your server. Create key and secret in the merchant area (shown only once).

Headers: x-spartio-key: <key>, x-spartio-signature: t=<unix seconds>,v1=<HMAC-SHA256 hex of "<t>.<body>" with the secret>. Window ±300 seconds, each signature counts once.

Fields: orderId, total (cent, as text), currency, clickId (from the spt_click parameter), status (pending, confirmed, cancelled, refunded), optional refundedTotal (cent) and placedAt (ISO 8601).

An order is billed after the return period. Cancelling or refunding before it ends costs nothing; afterwards a credit follows.

curl + openssl
BODY='{"orderId":"1001","total":"12990","currency":"EUR","clickId":"<spt_click>","status":"confirmed"}'
T=$(date +%s)
SIG=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')
curl -X POST https://wertla.de/api/v1/ingest/orders \
  -H 'content-type: application/json' \
  -H "x-spartio-key: $KEY" \
  -H "x-spartio-signature: t=$T,v1=$SIG" \
  -d "$BODY"
PHP
<?php
$body = json_encode([
  'orderId' => '1001', 'total' => '12990', 'currency' => 'EUR',
  'clickId' => $clickId, 'status' => 'confirmed',
]);
$t = time();
$sig = hash_hmac('sha256', $t . '.' . $body, $secret);
$ch = curl_init('https://wertla.de/api/v1/ingest/orders');
curl_setopt_array($ch, [
  CURLOPT_POST => true, CURLOPT_POSTFIELDS => $body, CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'content-type: application/json', 'x-spartio-key: ' . $key,
    'x-spartio-signature: t=' . $t . ',v1=' . $sig,
  ],
]);
$result = curl_exec($ch);
Node.js
import { createHmac } from 'node:crypto';

const body = JSON.stringify({ orderId: '1001', total: '12990', currency: 'EUR', clickId, status: 'confirmed' });
const t = Math.floor(Date.now() / 1000);
const sig = createHmac('sha256', secret).update(`${t}.${body}`).digest('hex');
await fetch('https://wertla.de/api/v1/ingest/orders', {
  method: 'POST',
  headers: { 'content-type': 'application/json', 'x-spartio-key': key, 'x-spartio-signature': `t=${t},v1=${sig}` },
  body,
});

JS snippet (no server code)

The snippet stores the click ID after consent and reports the order on the confirmation page. It is public and therefore not verifiable: orders stay "open" until you confirm them in the merchant area. If you want verified orders, use the server API.

After consent: Wertla.consent(true). On the confirmation page: Wertla.order({orderId: "1001", totalMinor: 12990, currency: "EUR"}).

Check tracking

In the merchant area under Onboarding, the tracking check shows whether orders arrived in the last 7 days. Click a test product on our site, order it and check the entry.

Attribution and billing

Attribution by the last click on a Wertla link inside the window (default 30 days). The commission rate is fixed at the first attribution. Details: merchant terms.

Guides to download

Detailed guides (Markdown) are in the repository under docs/merchants/: integration-shopify.md, integration-woocommerce.md, integrations.md.

Merchant terms and advertising policy

Frequently asked

Do I need a cookie banner?

Tracking stores the click ID only after consent to marketing cookies. Use your existing consent tool. Without consent there is no attribution and no commission.

What data goes to Wertla?

Order number, amount, currency, status and the click ID. No names, addresses or e-mails.

What is a valid click?

Not a bot, once per visitor and offer per day, possibly under a daily cap. You can dispute suspicious clicks.