Skip to main content

Platform Webhooks

Configure your e-commerce platform to send order and customer data to edrone automatically via webhooks.

Key takeaway

Webhooks let your platform push data to edrone in real-time. This is essential for order tracking, especially when JavaScript tracking isn't available (e.g., headless checkout, external payment processors).

Overview​

When a customer completes an order on your store, the platform can send a webhook to edrone with the order details. edrone processes this data and forwards it to the Trace API.

Your Platform → Webhook → api.edrone.me → Trace API

Shopify​

Webhook URL​

https://api.edrone.me/shopifywebhook?app_id=YOUR_APP_ID

Setup in Shopify Admin​

  1. Go to Settings → Notifications → Webhooks
  2. Click Create webhook
  3. Configure:
    • Event: Order creation (orders/create)
    • Format: JSON
    • URL: https://api.edrone.me/shopifywebhook?app_id=YOUR_APP_ID
  4. Click Save

For order cancellations, create another webhook:

  • Event: Order cancellation (orders/cancelled)
  • URL: Same as above

Supported events​

EventAction in edrone
orders/createCreates order event with products, customer data, totals
orders/cancelledCreates order_cancel event

Payload mapping​

edrone extracts the following from Shopify's webhook payload:

Shopify fieldedrone field
emailemail
billing_address.first_namefirst_name
billing_address.last_namelast_name
billing_address.countrycountry
billing_address.citycity
billing_address.phonephone
order_numberorder_id
total_priceorder_payment_value, base_payment_value
currencyorder_currency, base_currency
created_atutc_time
line_items[].product_idproduct_ids (pipe-separated)
line_items[].nameproduct_titles (pipe-separated)
line_items[].skuproduct_skus (pipe-separated)
buyer_accepts_marketingsubscriber_status (1 if true)
cancel_reasonTriggers order_cancel action

If buyer_accepts_marketing is true in the Shopify payload:

  • subscriber_status is set to 1
  • customer_tags is set to "From PopUp"

This automatically subscribes the customer to your newsletter.


Shoper​

Webhook URL​

https://api.edrone.me/shoperwebhook?app_id=YOUR_APP_ID

Setup in Shoper Admin​

  1. Go to Integrations → Webhooks (or Ustawienia → Webhooki)
  2. Click Add webhook
  3. Configure:
    • Event: order.create
    • URL: https://api.edrone.me/shoperwebhook?app_id=YOUR_APP_ID
    • Format: JSON
  4. Save

Supported events​

EventDescription
order.createNew order placed
order.editOrder modified
order.paidPayment confirmed
order.statusOrder status changed

Expected payload format​

Shoper should send JSON with this structure:

{
"email": "customer@example.com",
"order_id": "12345",
"sum": "199.99",
"currency_name": "PLN",
"date": "2024-01-15T10:30:00Z",
"promo_code": "WINTER20",
"origin": "web",
"billingAddress": {
"firstname": "Jan",
"lastname": "Kowalski",
"country": "Poland",
"city": "Warsaw",
"phone": "+48123456789"
},
"products": [
{
"product_id": "SKU123",
"name": "Product Name",
"quantity": 2
}
]
}

Payload mapping​

Shoper fieldedrone field
emailemail
billingAddress.firstnamefirst_name
billingAddress.lastnamelast_name
billingAddress.countrycountry
billingAddress.citycity
billingAddress.phonephone
order_idorder_id
sumorder_payment_value, base_payment_value
currency_nameorder_currency, base_currency
dateutc_time
promo_codecoupon
originorder_origin
products[].product_idproduct_ids (pipe-separated)
products[].nameproduct_titles (pipe-separated)
products[].quantityproduct_counts (pipe-separated)

Shoper Newsletter Subscription​

For tracking newsletter subscriptions from Shoper:

Webhook URL​

https://api.edrone.me/shoper-subscribe-webhook?app_id=YOUR_APP_ID

Setup​

  1. In Shoper Admin, create webhook for subscriber.create event
  2. Point to the URL above

This tracks when customers subscribe to your newsletter directly in Shoper.


Testing webhooks​

Using cURL​

Test your Shopify webhook setup:

curl -X POST "https://api.edrone.me/shopifywebhook?app_id=YOUR_APP_ID" \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"order_number": "TEST-001",
"total_price": "99.99",
"currency": "USD",
"created_at": "2024-01-15T10:30:00Z",
"billing_address": {
"first_name": "Test",
"last_name": "User",
"country": "United States",
"city": "New York"
},
"line_items": [
{
"product_id": "123",
"name": "Test Product",
"sku": "SKU123"
}
]
}'

Test your Shoper webhook setup:

curl -X POST "https://api.edrone.me/shoperwebhook?app_id=YOUR_APP_ID" \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"order_id": "TEST-001",
"sum": "199.99",
"currency_name": "PLN",
"date": "2024-01-15T10:30:00Z",
"billingAddress": {
"firstname": "Test",
"lastname": "User",
"country": "Poland",
"city": "Warsaw"
},
"products": [
{
"product_id": "123",
"name": "Test Product",
"quantity": 1
}
]
}'

Troubleshooting​

Webhook not received​

  1. Check App ID - Ensure app_id parameter is correct in the URL
  2. Check URL - Verify the full webhook URL is correct
  3. Check payload - Ensure JSON is valid and contains required fields
  4. Check platform logs - Most platforms show webhook delivery status

Order not appearing in edrone​

  1. Missing email - Order must have customer email
  2. Invalid JSON - Payload must be valid JSON
  3. Missing app_id - Query parameter app_id is required

Duplicate orders​

Webhook may be called multiple times. edrone handles duplicates automatically - orders with the same order_id update the existing record.


Custom platform integration​

If your platform isn't Shopify or Shoper, you can send webhooks directly to the Trace API:

curl -X POST "https://api.edrone.me/trace" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "app_id=YOUR_APP_ID&\
sender_type=server&\
action_type=order&\
email=customer@example.com&\
first_name=John&\
last_name=Doe&\
order_id=ORD-12345&\
order_payment_value=199.99&\
base_payment_value=199.99&\
order_currency=USD&\
base_currency=USD&\
product_ids=SKU1|SKU2&\
product_titles=Product 1|Product 2&\
product_counts=1|2&\
country=United States&\
city=New York"

See Trace API Reference for all available fields.