Skip to main content

order.deleted

Fired when an order is deleted from the store.

info

The payload is the full order object at the moment of deletion — not just the ID. Use this snapshot for reconciliation and audit logs.

Event Structure

{
"event_type": "order.deleted",
"payload": { ... }
}

Payload

{
"_id": "6764a1b2c3d4************",
"qid": "qid://qumra/Order/01JDXM************",
"app": "6720ff8e4a21************",
"account": "674b3c11d9a0************",
"market": "671a88f3bc45************",
"marketSnapshot": {
"name": "Saudi Arabia",
"code": "sa",
"currency": "SAR",
"countries": ["SA"]
},
"totalPrice": 350,
"totalPriceWithTax": 398.75,
"handel": "#1042",
"tax": "67205c8ab1c2************",
"taxAmount": 48.75,
"totalCompareAtPrice": 400,
"shippingAddress": "6764a0ff77e1************",
"paymentMethod": "67210def44a9************",
"manualPayment": null,
"paymentType": "gateway",
"channel": "STORE",
"salesLead": null,
"items": [
"6764a1b2c3d5************",
"6764a1b2c3d6************"
],
"status": "6764a1b2c3d7************",
"orderStatus": "cancelled",
"financialStatus": "refunded",
"fulfillmentStatus": "unfulfilled",
"deleted": true,
"paidAt": "2025-02-24T14:30:05.000Z",
"isFastOrder": false,
"freeze": false,
"priceWithShipping": 375,
"shippingPrice": 25,
"type": "account",
"shipping": {
"carrier": "mylerz",
"barCode": "MLZ-2025-********",
"reference": "REF-0001****",
"mylerzWarehouseId": "WH-RYD-***",
"status": "cancelled"
},
"currency": {
"code": "SAR",
"symbol": "ر.س",
"rate": 1
},
"createdAt": "2025-02-24T14:30:00.000Z",
"updatedAt": "2025-03-01T10:00:00.000Z"
}

Payload Fields

Same shape as order.created. The deleted flag is set to true and orderStatus will typically be cancelled.

Example Handler

app/routes/webhooks.orders.tsx
import { authenticate } from "~/qumra.server";

export async function action({ request }: { request: Request }) {
const { payload, topic, storeId } =
await authenticate.admin(request);

if (topic === "order.deleted") {
console.log(`Order deleted: ${payload.handel} (${payload._id})`);

// Remove from local DB, invalidate cache, update reports, etc.
}

return Response.json({ success: true });
}