Skip to content
Track That Ride
Menu

Developer guide

Live delivery tracking for WooCommerce and Shopify stores

There is no Track That Ride plugin for WooCommerce or Shopify. You can still give store customers a live tracking link: when an order is ready to ship, a small piece of server code creates a Track That Ride delivery through the API, adds the tracking link to the order, and marks the order delivered when our webhook says so.

Who this is for: shops that deliver with their own drivers or a local courier on Track That Ride, and the developer who looks after the store. You need somewhere to run a little server code: a serverless function, a small Node.js app or your existing backend.

What will the finished flow look like?

  1. A customer’s order reaches the status you choose, for example “Processing” in WooCommerce or “paid and ready to fulfil” in Shopify.
  2. The store calls your endpoint (a store webhook).
  3. Your endpoint creates a Track That Ride delivery with POST /api/v1/rides, using the order’s address and your shop as the pickup.
  4. Your endpoint writes the tracking link back to the order, so it appears in the order page and emails.
  5. A driver delivers it with proof; Track That Ride sends delivery.completed to your endpoint.
  6. Your endpoint marks the order as completed in the store.

How do I create a delivery from an order?

Map the order to the six required fields and send the order number as order_id so you can match them later:

// Called by your store webhook handler with the order it received.
async function createDeliveryForOrder(order) {
  const res = await fetch('https://trackthatride.com/api/v1/rides', {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.TTR_API_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({
      customer_name: order.customerName,
      phone_number: order.phone,
      email: order.email,                 // Track That Ride emails the link when this is present
      address: order.shippingAddress,     // one line, e.g. "10 Example Street, Leeds LS1 1AA"
      pickup_address: process.env.SHOP_ADDRESS,
      pickup_contact_name: 'Shop counter',
      pickup_phone: process.env.SHOP_PHONE,
      estimated_pickup_time: new Date(Date.now() + 60 * 60 * 1000).toISOString(),
      order_id: String(order.number),
      notes: order.deliveryNote ?? undefined,
    }),
  });
  const ride = await res.json();
  if (!res.ok) throw new Error(`${res.status} ${ride.code ?? ride.error}`);
  return { rideId: ride.id, trackingUrl: `https://trackthatride.com/track/${ride.public_tracking_token}` };
}

Respond to the store’s webhook quickly and do this work afterwards; both platforms retry webhooks that time out, so store the order_id to rideId mapping and skip orders you have already handled.

How do I show the tracking link to the customer?

If the order has an email address, Track That Ride emails the customer the link when the delivery is created. To show it in your store as well, write trackingUrl back to the order with the platform’s own API:

  • WooCommerce: add a customer-visible order note, or store it in order meta and print it in your order emails, using the WooCommerce REST API.
  • Shopify: add the URL as the tracking link on the order’s fulfilment with the Admin API, so it appears in the shipping confirmation.

Check the current platform documentation for the exact calls; both change their APIs from time to time.

How do I close the order when it is delivered?

Register a Track That Ride webhook for delivery.completed and delivery.failed, verify its signature (see webhooks or the Node.js quickstart), find the order by ride_id, then:

  • on delivery.completed, mark the order completed or fulfilled; the payload includes proof-of-delivery links valid for 24 hours if you want to copy the photos into the order;
  • on delivery.failed, flag the order for your team; data.reason says why, and data.cancelled is true for cancellations.

What are the limits of this approach?

  • It is your code, not a plugin: you maintain it when the store platform changes.
  • Each order becomes one delivery from your shop to the customer. Split shipments need one delivery each.
  • Track That Ride does not plan multi-drop routes; your driver works through deliveries in the order you assign them.
  • Billing counts each delivery started, so orders you cancel before the driver sets off are not charged.

Sources

Checked on 12 October 2026. Always read the current official guidance; it changes.

  1. WooCommerce: Webhooks
  2. WooCommerce REST API documentation
  3. Shopify: Webhooks

Frequently asked questions

Is there a Track That Ride app in the Shopify App Store or a WooCommerce plugin?

No. This guide connects a store using the public API and webhooks instead.

Do I need a paid Track That Ride plan?

No. The Free plan includes the API and webhooks; you pay per delivery started from a prepaid balance.

Can customers track from inside my store?

Yes. Store the delivery’s public tracking token with the order, and your storefront page can open its live stream directly, because the public tracking endpoints allow cross-origin reads. The JavaScript quickstart shows how; otherwise link to the hosted tracking page.

What if the address cannot be found?

Track That Ride geocodes addresses on the server. If you already have coordinates from your checkout, send latitude and longitude with the delivery to skip the lookup.

Give your customers a live tracking link today

Sign up free, with no card. On the Free plan there is no monthly fee: top up a prepaid balance and pay only for the deliveries you run.

Sign-up happens on trackthatride.com.