order_confirmed

Fired when an order is validated, or a booking deposit is paid.

Payload: Order (full), with isBooking: false, or true for the booking case below.

When:

  1. The order is validated at the end of the payment funnel: status becomes validating, shopStatus becomes active.
  2. A GreenLeaze admin starts the order with "validate external shop".
  3. A booking deposit is paid (isBooking: true, status: "draft"). Kept for the some External App which creates its pending order from it; new integrations should use order_booked.

Destinations: webhook subscriptions, plus every active external app with a webhookValidateOrderUrl. For an order whose source is not "dashboard", apps set to useOnlyValidateForDashboardOrders are skipped. The order success URL receives the same payload (order success URL).

Response: a destination may answer { "shopifyOrderId": "…" } (or { "data": { "shopifyOrderId": "…" } }). GreenLeaze stores it as the order's externalOrderId. This is guaranteed only for the order success URL: it is the only order_confirmed delivery that registers a response callback.

{
  "cartId": "cart_abc123",
  "cartSecureKey": "key_xyz789",
  "shop": {
    "id": "0d6e…",
    "name": "Ma Boutique",
    "email": "[email protected]",
    "group": { "id": "7a1c…" }
  },
  "customer": {
    "id": "a41d…",
    "firstName": "Jean",
    "lastName": "Dupont",
    "email": "[email protected]",
    "phone": "+33612345678"
  },
  "source": "dashboard",
  "id": "5b0f7c1e-2d7a-4a59-9d6b-3c1f0e0c9a11",
  "transactionId": "GLZ-8F3K2",
  "status": "validating", // Don't check this field, only informative
  "shopStatus": "active",
  "isBooking": false,
  "externalOrderId": null,
  "rejected": null,
  "phone": "+33612345678",
  "email": "[email protected]",
  "firstName": "Jean",
  "lastName": "Dupont",
  "deliveryAddress": {
    "id": "e2b7…",
    "country": "FR",
    "company": null,
    "firstName": "Jean",
    "lastName": "Dupont",
    "city": "Paris",
    "street": "10 rue de la Paix",
    "postCode": "75002",
    "phone": "+33612345678",
    "isDelivery": true,
    "isInvoice": false,
    "isDefault": false,
    "description": null
  },
  "invoiceAddress": {
    "id": "f9a0…",
    "country": "FR",
    "company": null,
    "firstName": "Jean",
    "lastName": "Dupont",
    "city": "Paris",
    "street": "10 rue de la Paix",
    "postCode": "75002",
    "phone": "+33612345678",
    "isDelivery": false,
    "isInvoice": true,
    "isDefault": true,
    "description": null
  },
  "duration": 12,
  "monthlyRentalPayment": 93.89,
  "rentalPriceTTC": 93.89,
  "commitment": { "referenceDate": null, "unit": "monthly", "value": 12 },
  "paymentInterval": { "referenceDate": null, "unit": "monthly", "value": 1 },
  "themeParams": null,
  "trackingData": null,
  "deliveryMode": {
    "name": "Livraison standard",
    "price": "0.00",
    "delay": 7,
    "tags": "",
    "externalId": null,
    "shopExternalAppId": null
  },
  "company": null,
  "hasCompany": false,
  "services": [
    {
      "greenleazeId": "9d41…",
      "serviceId": "0c55…",
      "name": "Assurance casse",
      "vat": 20,
      "rentalPriceTTC": 3.99,
      "tags": ["insurance"]
    }
  ],
  "products": [
    {
      "greenleazeId": "c3f1…",
      "id": "8812",
      "combinationId": "8812-2",
      "name": "MacBook Pro 14\"",
      "price": 2082.5,
      "vat": 20,
      "rentalPriceTTC": 89.9,
      "purchaseFeesPercentage": 10,
      "priceWithDiscount": 2082.5,
      "quantity": 1,
      "category": "4b9e…"
    }
  ]
}