Transfer Order Webhooks

Applies to: Transfer Orders API | Webhook Subscriptions API

Learn how to handle webhooks emitted by the Transfer Orders API on an inventory transfer event.

Link to section

Overview

The Transfer Orders API provides three webhook events that fire when transfer orders change:

  • transfer_order.created - Triggered when a new transfer order is created.
  • transfer_order.updated - Triggered when a transfer order is modified (items are added or removed, quantities are changed, statuses are updated, or items are received).
  • transfer_order.deleted - Triggered when a draft transfer order is deleted.

For the Fleet Foot Running Co. multi-location inventory management system, these webhooks enable:

  • Immediate notifications to source location managers when another store requests their inventory.
  • Real-time updates when transfer quantities or items change.
  • Alerts when transfers are canceled or completed.
  • Automatic synchronization across all store management systems.

For more information about how to implement Square API webhooks, see Square Webhooks.

Link to section

Transfer order webhooks for multi-location notifications

Fleet Foot Running Co. operates multiple store locations and managers need real-time visibility when other stores request inventory transfers from their location. By implementing transfer order webhooks, your application can automatically notify managers when transfer orders affecting their inventory are created, modified, or canceled—ensuring that they stay informed about stock movements across the entire retail network.

Link to section

Setting up webhook subscriptions

To receive transfer order notifications across all Fleet Foot Running Co. locations, create a webhook subscription that monitors all three transfer order events:

Create webhook subscription

Important

Store the signature_key securely. You need it to verify that webhook notifications are genuinely from Square.

Link to section

Webhook event payloads

Link to section

transfer_order.created event

When the Olympia store creates a transfer order requesting New Balance FuelCell shoes from Tacoma, the webhook fires immediately.

Link to section

transfer_order.updated event

The webhook fires for various update scenarios:

Scenario 1: Adding items to a draft

Scenario 2: Starting the transfer

Scenario 3: Receiving items (partial receipt)

Link to section

transfer_order.deleted event

When a draft transfer order is deleted.

{ "merchant_id": "FLEET_FOOT_MERCHANT_ID", "type": "transfer_order.deleted", "event_id": "evt_523e4567-e89b-12d3-a456-426614174004", "created_at": "2025-10-09T10:45:00.000Z", "data": { "type": "transfer_order", "id": "ABC123DELETEEXAMPLE", "deleted": true } }
Link to section

Processing webhook notifications

Your webhook endpoint should process notifications and alert the appropriate store managers.

Link to section

Best practices for webhook implementation

Link to section

Idempotent processing

Transfer order webhooks might be delivered multiple times. Use the event_id to ensure that you process each event only once.

async function processWebhook(event) { // Check if we've already processed this event if (await hasProcessedEvent(event.event_id)) { return { status: 'already_processed' }; } // Process the event await handleTransferOrderEvent(event); // Mark as processed await markEventProcessed(event.event_id); }
Link to section

Quick response times

Respond to webhook notifications within one minute to avoid receiving a retry request from Square.

app.post('/webhooks/transfer-orders', async (req, res) => { // Immediately acknowledge receipt res.status(200).send('OK'); // Process asynchronously processWebhookAsync(req.body); });
Link to section

Signature verification

Always verify webhook signatures to ensure that notifications are from Square.

function verifyWebhookSignature(request) { const signature = request.headers['x-square-hmacsha256-signature']; const body = JSON.stringify(request.body); const hash = crypto .createHmac('sha256', webhookSignatureKey) .update(request.headers['x-square-request-timestamp'] + body) .digest('base64'); return signature === hash; }
Link to section

Location-specific routing

Route notifications to the appropriate store managers based on their role.

Link to section

Testing webhook notifications

Square provides a webhook tester in the Developer Console. To test your Fleet Foot Running Co. notification system:

  1. Navigate to the Webhooks section in the Square Developer Console.
  2. Select your transfer order webhook subscription.
  3. Choose Send test event and choose the event type.
  4. Verify that your endpoint receives the notification and that managers get alerts.

You can also trigger real webhook events in the Square Sandbox environment by creating, updating, and deleting test transfer orders between your test locations.

Link to section

Webhook event flow example

The following shows a typical sequence of webhook events for a complete transfer between Fleet Foot Running Co. stores:

  1. 10:15 AM - Olympia creates a draft transfer → transfer_order.created (the Tacoma manager is notified).
  2. 10:30 AM - Olympia adds more items → transfer_order.updated (the Tacoma manager is notified of the changes).
  3. 11:00 AM - Tacoma starts the transfer → transfer_order.updated (the Olympia manager is notified of the shipment).
  4. Next day 9:30 AM - Olympia receives items → transfer_order.updated (both managers are notified of the completion).

This webhook-driven notification system ensures that all Fleet Foot Running Co. locations stay synchronized and that managers have real-time visibility into inventory movements affecting their stores.