order_created

Fired once, right after an order is created.

When: once, right after an order is created (API, module or dashboard), while it is still a draft.

FieldTypeDescription
idstringGreenLeaze order id.
cartIdstring | null
cartSecureKeystring | null
sourcestring | nullOrder origin.
shopShopWithout email.
customerCustomerFalls back to the checkout identity.
emailstring | null, optionalLegacy
firstNamestring | null, optionalLegacy
lastNamestring | null, optionalLegacy
commitmentIntervalInitial commitment.
paymentIntervalIntervalBilling period.
productsline[]All order lines, services included.

products[]: greenleazeId, id, combinationId, name, price (unit HT), vat, purchaseFeesPercentage, quantity, category as in the product line, plus rentalPriceTTC: monthly rent TTC of the line before monthly discount. There is no priceWithDiscount.

{
  "cartId": "cart_abc123",
  "cartSecureKey": "key_xyz789",
  "source": "dashboard",
  "id": "5b0f7c1e-2d7a-4a59-9d6b-3c1f0e0c9a11",
  "shop": { "id": "0d6e…", "name": "Ma Boutique", "group": { "id": "7a1c…" } },
  "customer": {
    "firstName": "Jean",
    "lastName": "Dupont",
    "email": "[email protected]",
    "phone": "+33612345678"
  },
  "commitment": { "referenceDate": null, "unit": "monthly", "value": 12 },
  "paymentInterval": { "referenceDate": null, "unit": "monthly", "value": 1 },
  "products": [
    {
      "greenleazeId": "c3f1…",
      "id": "8812",
      "combinationId": "8812-2",
      "name": "MacBook Pro 14\"",
      "price": 2082.5,
      "vat": 20,
      "purchaseFeesPercentage": 10,
      "rentalPriceTTC": 89.9,
      "quantity": 1,
      "category": "4b9e…"
    }
  ]
}