Skip to main content
This guide walks you through the minimum steps to have a working integration with Fire: receiving order events through an Integration Flow and injecting orders via the REST API.

Prerequisites

  • API credentials from the Fire dashboard (see Authentication)
  • A publicly accessible HTTPS endpoint on your side
  • Dashboard access to Settings → Integration Flows

Step 1: Configure an Integration Flow

In the Fire dashboard, go to Settings → Integration Flows → New flow, then:
  • Trigger: pick order.completed
  • Scope: account, vendor, and optionally specific stores
  • HTTP node: add one and set
    • Method: POST
    • URL: your HTTPS endpoint
    • Headers: Content-Type: application/json (plus any auth header — Bearer token / API key)
    • Body: paste the canonical example template the dashboard ships with (it produces { event, data, _meta })
  • Activate the flow
For a 10-minute walkthrough with screenshots-style detail, see Handle order events.
During development you can use a tool like ngrok to expose a local server to the internet. Paste the ngrok HTTPS URL into the flow’s HTTP node URL.

Step 2: Channel and service identifiers for orders

If you inject orders, your channel and service objects need Fire uid values (and related fields). Take those identifiers from publication webhook payloads — for example channel.updated and related events — or from the integration and channel setup you manage in the Fire dashboard (see Aggregator integrations).

Step 3: Handle the event

Your endpoint will receive POST requests from your flow whenever an order is completed. The body shape is the one your flow’s body template renders. With the canonical template, that’s:
{
  "event": {
    "id": "0d6e8a1c-1e7a-4b4f-8a3a-74ab0e9a9b21",
    "type": "order.completed",
    "createdAt": "2026-05-06T01:22:59.902Z"
  },
  "data": {
    "orderId": "21ec1f6c-c301-4528-b999-7836c1d21c6c",
    "orderCode": "OC-br-001",
    "status": "COMPLETED",
    "paymentStatus": "SUCCEEDED",
    "store": { /* ... */ },
    "client": { /* ... */ },
    "payments": { /* ... */ },
    "orderLines": [ /* ... */ ],
    "fulfillment": { /* ... */ }
  },
  "_meta": { "executionId": "...", "flowId": "...", "attempt": "1" }
}
A minimal handler:
import express from "express";

const app = express();
const seen = new Map(); // swap for Redis/DB in production

app.post("/fire/events", express.json(), async (req, res) => {
  const { event, data } = req.body ?? {};
  if (!event?.id) return res.status(400).end();

  // 1. Acknowledge fast (Fire times out at 30s)
  res.status(200).end();

  // 2. Deduplicate by event.id
  if (seen.has(event.id)) return;
  seen.set(event.id, Date.now());

  // 3. Dispatch by type
  switch (event.type) {
    case "order.completed":      return onOrderCompleted(data);
    case "order.cancelled":      return onOrderCancelled(data);
    case "order.invoiced": return onFiscalAuthorized(data);
    case "order.reversed":  return onFiscalCancelled(data);
  }
});

app.listen(8080);
See order.completed for the field-by-field payload reference.

Step 4: Inject orders

When your system receives an order (from an aggregator or any other source), inject it into Fire.
POST /v1/orders
Authorization: Bearer <your_api_key>
Content-Type: application/json

{
  "channelId": "channel_uber",
  "externalOrderId": "uber_order_xyz",
  "...": "see the full reference"
}
Once the order reaches status=COMPLETED and paymentStatus=SUCCEEDED, your flow fires and your handler runs. If the order is later cancelled, you’ll receive order.cancelled. See Inject order for the complete payload reference.

Step 5: Add fiscal events (Brazil only)

If you operate in Brazil and have fiscal emission enabled for a store, add a second flow with trigger order.invoiced (and another with order.reversed) — same HTTPS endpoint, same template — to receive the fiscal document context.

Next steps

Handle order events

Detailed walkthrough with auth and idempotency.

Events overview

Envelope, headers, retries, dedup.

order.completed reference

Full payload schema with the BR fiscal blocks.

API reference

Inject orders and call authenticated endpoints.