Shared objects

Objects reused across webhook payloads, the Order (full) payload, and per-destination options.

Objects

Shop

FieldTypeDescription
idstringShop id.
namestringShop name.
emailstringShop contact email. Order (full) payloads only.
group.idstring | nullShop group id.

Customer

FieldTypeDescription
idstring, optionalGreenLeaze customer id. Absent while no customer account is linked to the order.
firstNamestring | null
lastNamestring | null
emailstring | null
phonestring | 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

FieldTypeDescription
idstring, optionalAddress id. "greenleaze-address" when replaced by the GreenLeaze billing address (payload options). Absent for an address captured during checkout and not saved yet.
countrystringCountry code, e.g. "FR".
companystring | null, optional
firstNamestring | nullLegacy - Take customer data
lastNamestring | nullLegacy - Take customer data
streetstring
postCodestring
citystring
phonestring | nullLegacy - Take customer data
isDeliverybooleanLegacy - Kept for compatibility
isInvoicebooleanLegacy - Kept for compatibility
isDefaultbooleanLegacy - Kept for compatibility
descriptionstring | nullLegacy - Kept for compatibility

Interval

Used by commitment and paymentInterval.

FieldTypeDescription
valuenumber | nullNumber of units.
unit"monthly" | "weekly" | "yearly" | null
referenceDatestring | nullDate 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.

FieldTypeDescription
idstring
usernamestring | nullLogin identifier (email or legacy login).
displayNamestring | null
emailstring | null
rolestringADMIN, 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.

FieldTypeDescription
idstringGreenLeaze order id.
transactionIdstring | nullCustomer-facing order reference.
cartIdstring | nullShop cart id given at creation.
cartSecureKeystring | nullShop cart key given at creation.
sourcestring | nullOrder origin given at creation ("dashboard" for dashboard orders; free-form for API / module orders).
statusstringOrder status.
shopStatusstring | nullOrder shopStatus.
isBookingbooleantrue when the payload describes a booking (deposit paid, order not yet finalised).
externalOrderIdstring | nullId of the order on the shop platform, once known (see order success URL).
finalizeUrlstring, optionalPresent only when isBooking is true: link where the customer finalises the order.
rejectedboolean | nulltrue when the order was rejected and is back in draft. null when it was never rejected.
shopShopIncludes email.
customerCustomerAlways the real buyer: the payload options do not change it.
emailstring | nullBuyer email. Replaced by [email protected] with the greenleazeCustomer option.
firstNamestring | nullBuyer first name. Replaced by the GreenLeaze entity name with greenleazeCustomer.
lastNamestring | nullBuyer last name. Replaced likewise.
phonestring | nullBuyer phone. Never replaced.
deliveryAddressAddress, optionalPresent only when the chosen delivery option needs an address. Falls back to the invoice address.
invoiceAddressAddress, optionalBilling address (falls back to the delivery address). Replaced with the greenleazeInvoiceAddress option.
durationnumber | nullCommitment length, in commitment.unit.
commitmentIntervalInitial commitment.
paymentIntervalIntervalBilling period.

monthlyRentalPayment
Legacy

numberLegacy field - Kept for compatibility
rentalPriceTTCnumberMonthly rent TTC of the order: products and services, monthly discounts applied.
deliveryModeobjectSee below.
discountnumber, optionalDiscount code amount in € TTC: the code's value for a fixed-amount code, 0 for a percentage code. Absent when no code was used.
companyCompany | nullB2B customer company.
hasCompanybooleantrue for a B2B order.
themeParamsobject | nullTheme parameters given at creation, passed through as is.
trackingDataany JSON | nullTracking data given at creation, passed through as is.
servicesService line[]Additional services (insurance…) on the order.
productsProduct line[]Rented products. Service lines are not in this list.

deliveryMode:

FieldTypeDescription
namestringDelivery option name, truncated to 32 characters ("Livraison" when unknown).
pricestringInitial fees TTC after their discount, formatted with two decimals, e.g. "0.00".
delaynumberAlways 7.
tagsstringDelivery option tags configured by the shop ("" when none).
externalIdstring | nullCarrier id on the shop platform.
shopExternalAppIdstring | nullExternal app that owns that carrier.

Product line (products[]):

FieldTypeDescription
greenleazeIdstringGreenLeaze order line id.
idstring | nullShop product id.
combinationIdstring | nullShop variant / combination id.
namestringProduct name.
pricenumberUnit price HT, before discount.
priceWithDiscountnumberUnit price HT after discount. Carries the undiscounted price when includeDiscountInProducts is off (payload options).
vatnumberVAT rate (%).
quantitynumber
rentalPriceTTCnumberMonthly rent TTC of the line (quantity included, monthly discount applied).
purchaseFeesPercentagenumber | null
categorystring | nullGreenLeaze product category id.

Service line (services[]):

FieldTypeDescription
greenleazeIdstringGreenLeaze order line id.
serviceIdstringGreenLeaze additional-service id.
namestring
vatnumber
rentalPriceTTCnumberMonthly price TTC.
tagsstring[], optionalService 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:

OptionDefaultEffect when on
greenleazeCustomeroffTop-level email → [email protected]; firstName / lastName → the GreenLeaze billing entity's name. customer and phone are untouched.
greenleazeInvoiceAddressoffinvoiceAddress → the GreenLeaze billing address (id: "greenleaze-address").
includeDiscountInProductsonWhen off, products[].priceWithDiscount carries the undiscounted unit price.

Where the flags come from:

DestinationFlags read from
External-app destinationThe 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 appconfig.order.* on the subscription. Unset = defaults above.
Order success URLThe shop's primary active app (a commerce platform over api / other, ties broken by lowest app id), else the defaults.