Objects reused across webhook payloads, the Order (full) payload, and per-destination options.
Objects
Shop
| Field | Type | Description |
|---|---|---|
id | string | Shop id. |
name | string | Shop name. |
email | string | Shop contact email. Order (full) payloads only. |
group.id | string | null | Shop group id. |
Customer
| Field | Type | Description |
|---|---|---|
id | string, optional | GreenLeaze customer id. Absent while no customer account is linked to the order. |
firstName | string | null | |
lastName | string | null | |
email | string | null | |
phone | string | null |
In order_created, order_confirmed and the other Order (full) payloads, each field falls back to the identity captured during checkout when no customer account exists yet.
Address
| Field | Type | Description |
|---|---|---|
id | string, optional | Address id. "greenleaze-address" when replaced by the GreenLeaze billing address (payload options). Absent for an address captured during checkout and not saved yet. |
country | string | Country code, e.g. "FR". |
company | string | null, optional | |
firstName | string | null | Legacy - Take customer data |
lastName | string | null | Legacy - Take customer data |
street | string | |
postCode | string | |
city | string | |
phone | string | null | Legacy - Take customer data |
isDelivery | boolean | Legacy - Kept for compatibility |
isInvoice | boolean | Legacy - Kept for compatibility |
isDefault | boolean | Legacy - Kept for compatibility |
description | string | null | Legacy - Kept for compatibility |
Interval
Used by commitment and paymentInterval.
| Field | Type | Description |
|---|---|---|
value | number | null | Number of units. |
unit | "monthly" | "weekly" | "yearly" | null | |
referenceDate | string | null | Date the interval is anchored on. |
{ "value": 12, "unit": "monthly" } as commitment = a 12-month commitment; as paymentInterval, { "value": 1, "unit": "monthly" } = billed monthly.
Company
{ "name": string, "siret": string }, the B2B customer company.
User
The GreenLeaze or shop user behind an action.
| Field | Type | Description |
|---|---|---|
id | string | |
username | string | null | Login identifier (email or legacy login). |
displayName | string | null | |
email | string | null | |
role | string | ADMIN, SHOP, … |
Order (full) payload
order_confirmed, order_booked, order_booking_cancelled, order_archived and order_unarchived share this payload. The payload options apply to all five.
| Field | Type | Description |
|---|---|---|
id | string | GreenLeaze order id. |
transactionId | string | null | Customer-facing order reference. |
cartId | string | null | Shop cart id given at creation. |
cartSecureKey | string | null | Shop cart key given at creation. |
source | string | null | Order origin given at creation ("dashboard" for dashboard orders; free-form for API / module orders). |
status | string | Order status. |
shopStatus | string | null | Order shopStatus. |
isBooking | boolean | true when the payload describes a booking (deposit paid, order not yet finalised). |
externalOrderId | string | null | Id of the order on the shop platform, once known (see order success URL). |
finalizeUrl | string, optional | Present only when isBooking is true: link where the customer finalises the order. |
rejected | boolean | null | true when the order was rejected and is back in draft. null when it was never rejected. |
shop | Shop | Includes email. |
customer | Customer | Always the real buyer: the payload options do not change it. |
email | string | null | Buyer email. Replaced by [email protected] with the greenleazeCustomer option. |
firstName | string | null | Buyer first name. Replaced by the GreenLeaze entity name with greenleazeCustomer. |
lastName | string | null | Buyer last name. Replaced likewise. |
phone | string | null | Buyer phone. Never replaced. |
deliveryAddress | Address, optional | Present only when the chosen delivery option needs an address. Falls back to the invoice address. |
invoiceAddress | Address, optional | Billing address (falls back to the delivery address). Replaced with the greenleazeInvoiceAddress option. |
duration | number | null | Commitment length, in commitment.unit. |
commitment | Interval | Initial commitment. |
paymentInterval | Interval | Billing period. |
monthlyRentalPaymentLegacy | number | Legacy field - Kept for compatibility |
rentalPriceTTC | number | Monthly rent TTC of the order: products and services, monthly discounts applied. |
deliveryMode | object | See below. |
discount | number, optional | Discount code amount in € TTC: the code's value for a fixed-amount code, 0 for a percentage code. Absent when no code was used. |
company | Company | null | B2B customer company. |
hasCompany | boolean | true for a B2B order. |
themeParams | object | null | Theme parameters given at creation, passed through as is. |
trackingData | any JSON | null | Tracking data given at creation, passed through as is. |
services | Service line[] | Additional services (insurance…) on the order. |
products | Product line[] | Rented products. Service lines are not in this list. |
deliveryMode:
| Field | Type | Description |
|---|---|---|
name | string | Delivery option name, truncated to 32 characters ("Livraison" when unknown). |
price | string | Initial fees TTC after their discount, formatted with two decimals, e.g. "0.00". |
delay | number | Always 7. |
tags | string | Delivery option tags configured by the shop ("" when none). |
externalId | string | null | Carrier id on the shop platform. |
shopExternalAppId | string | null | External app that owns that carrier. |
Product line (products[]):
| Field | Type | Description |
|---|---|---|
greenleazeId | string | GreenLeaze order line id. |
id | string | null | Shop product id. |
combinationId | string | null | Shop variant / combination id. |
name | string | Product name. |
price | number | Unit price HT, before discount. |
priceWithDiscount | number | Unit price HT after discount. Carries the undiscounted price when includeDiscountInProducts is off (payload options). |
vat | number | VAT rate (%). |
quantity | number | |
rentalPriceTTC | number | Monthly rent TTC of the line (quantity included, monthly discount applied). |
purchaseFeesPercentage | number | null | |
category | string | null | GreenLeaze product category id. |
Service line (services[]):
| Field | Type | Description |
|---|---|---|
greenleazeId | string | GreenLeaze order line id. |
serviceId | string | GreenLeaze additional-service id. |
name | string | |
vat | number | |
rentalPriceTTC | number | Monthly price TTC. |
tags | string[], optional | Service tags (e.g. "insurance"). Present on order_confirmed, order_booked and order_booking_cancelled; absent on order_archived / order_unarchived and on the order success URL. |
Per-destination payload options
The Order (full) events go through a transformer that can be configured directly in GreenLeaze Dashboard. It can make three edits for each destination:
| Option | Default | Effect when on |
|---|---|---|
greenleazeCustomer | off | Top-level email → [email protected]; firstName / lastName → the GreenLeaze billing entity's name. customer and phone are untouched. |
greenleazeInvoiceAddress | off | invoiceAddress → the GreenLeaze billing address (id: "greenleaze-address"). |
includeDiscountInProducts | on | When off, products[].priceWithDiscount carries the undiscounted unit price. |
Where the flags come from:
| Destination | Flags read from |
|---|---|
| External-app destination | The app configuration (greenleazeEmailAddressInWebhook, greenleazeInvoiceAddressInWebhook, includeDiscountsInProductsInWebhook). |
Webhook subscription linked to an app (externalAppId) | The app configuration, unless config.order.flagsFrom is "destination". |
| Webhook subscription with no linked app | config.order.* on the subscription. Unset = defaults above. |
| Order success URL | The shop's primary active app (a commerce platform over api / other, ties broken by lowest app id), else the defaults. |
