End-to-end example
This walkthrough follows one booking from quote to refund:
- A customer saves a quote on the website and books it.
- The reservation system confirms the cabin.
- Before sailing, the customer adds two shore excursions in the mobile app: a second purchase order, on another channel.
- The deposit and the excursions are paid.
- The customer cancels the excursions and receives a refund; a part of the deposit is refunded as well.
Every request and response below was captured from the order engine's routers running against a database, with the reservation system simulated. Identifiers are those the service generated. The tenant is the Meridian Voyages reference tenant; your tenant's channel and moment codes may differ. The commands use $BASE and $TOKEN; see Environments.
The data: a 7-night Western Mediterranean cruise departing 12 April 2027, a balcony cabin for two guests (PAX-01, PAX-02) at €2,380.00 after a 10% early-booking promotion, and a classic drinks package for both at €308.00.
1. Quote and book
Save and accept the quote
The website prices the selection in the quote store (POST /quote-store/quotes) and receives a quote reference. When the customer is ready to book, the website accepts the quote (POST /quote-store/quotes/{reference}/accept) and reads its frozen conditions (GET /quote-store/quotes/{reference}/frozen-conditions). The frozen-conditions document is the frozen object in the conversion request below: the accepted lines, amounts, promotions and the versions they were priced with.
Track the quotation on a trip
The quotation opens the trip. The customer can leave and come back; the quotation is saved.
/order-orchestration/quotationsTrack the quote on a new tripcurl -X POST "$BASE/order-orchestration/quotations" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0001" \
-H "Idempotency-Key: efaf1029-bfb3-4618-ae20-12191c8878bb" \
-H "Content-Type: application/json" \
-d '{
"channel": "web",
"market": "IT",
"createdBy": {
"actorRef": "CUST-20419",
"kind": "customer"
},
"customerRef": "CUST-20419",
"anchor": {
"productType": "cruise",
"productId": "MED7-2027-04-12",
"unitRef": "BALCONY-B2",
"departureAt": "2027-04-12T17:00:00Z",
"returnAt": "2027-04-19T08:00:00Z",
"market": "IT"
},
"passengers": 2,
"quote": {
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"currency": "EUR",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"offerId": "ALL-INCLUSIVE-2027",
"promotionIds": [
"EARLY-BOOKING-10"
]
}
}'
HTTP/1.1 201
X-Request-Id: req-0001
{
"quotationRef": "QT-E419E9088B0D",
"tripId": "TRP-B2BD5A9771E4",
"intentId": "INT-E7814BE45E5F",
"status": "open",
"channel": "web",
"market": "IT",
"productCode": "MED7-2027-04-12",
"createdBy": {
"actorRef": "CUST-20419",
"kind": "customer"
},
"customerRef": "CUST-20419",
"agencyRef": null,
"passengers": 2,
"quote": {
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"currency": "EUR",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"offerId": "ALL-INCLUSIVE-2027",
"promotionIds": [
"EARLY-BOOKING-10"
]
},
"conversion": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:05:37.000Z",
"lastAccessedAt": "2026-11-02T09:05:37.000Z"
}
Resume it
Only the customer or agent who created the quotation can resume it. Anyone else gets 403 not_creator.
/order-orchestration/quotations/QT-E419E9088B0DResume the saved quotationcurl -X GET "$BASE/order-orchestration/quotations/QT-E419E9088B0D?customerRef=CUST-20419" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0002"
HTTP/1.1 200
X-Request-Id: req-0002
{
"quotation": {
"quote": {
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quoteRef": "Q-2027-58213",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteVersion": 2
},
"market": "IT",
"status": "open",
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"intentId": "INT-E7814BE45E5F",
"agencyRef": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"createdBy": {
"kind": "customer",
"actorRef": "CUST-20419"
},
"updatedAt": "2026-11-02T09:05:37.000Z",
"conversion": null,
"passengers": 2,
"customerRef": "CUST-20419",
"productCode": "MED7-2027-04-12",
"quotationRef": "QT-E419E9088B0D",
"lastAccessedAt": "2026-11-02T09:06:14.000Z"
},
"trip": {
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise"
},
"status": "quotation",
"tripId": "TRP-B2BD5A9771E4",
"changes": [],
"startAt": "2027-04-12T17:00:00Z",
"version": 2,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:05:37.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-E419E9088B0D"
],
"purchaseOrderIds": []
},
"alternatives": []
}
Convert it
Conversion creates the booking purchase order from the frozen conditions. The ownership rules route the cabin to the reservation system and the drinks package to the onboard system, and each receives a create request. Send an Idempotency-Key: if the response is lost, the retry is safe.
/order-orchestration/quotations/QT-E419E9088B0D/convertConvert the quotation into the booking purchase ordercurl -X POST "$BASE/order-orchestration/quotations/QT-E419E9088B0D/convert" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0003" \
-H "Idempotency-Key: 7ac926d7-5cf4-478b-abdc-a05e8298b52c" \
-H "Content-Type: application/json" \
-d '{
"frozen": {
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"frozenAt": "2026-11-02T09:04:00Z",
"currency": "EUR",
"market": "IT",
"channel": "web",
"configVersion": 9,
"storeVersion": 14,
"customerRef": "CUST-20419",
"lines": [
{
"lineRef": "q-line-1",
"productType": "cruise",
"productCode": "MED7-2027-04-12",
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"quantity": 1,
"passengerIds": [
"PAX-01",
"PAX-02"
],
"amountMinor": 238000,
"offerId": "ALL-INCLUSIVE-2027",
"promotionIds": [
"EARLY-BOOKING-10"
],
"explanation": [
{
"layer": "base",
"ruleId": "base-balcony",
"mode": "select",
"basis": "passenger",
"input": 0,
"contribution": 264400,
"runningTotal": 264400,
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"flag": "public",
"reason": {
"key": "layer.base",
"params": {}
}
},
{
"layer": "promotion",
"ruleId": "EARLY-BOOKING-10",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"contribution": -26400,
"runningTotal": 238000,
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"flag": "public",
"reason": {
"key": "layer.promotion",
"params": {}
}
}
],
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineRef": "q-line-2",
"productType": "beverage",
"productCode": "DRINKS-CLASSIC-7N",
"description": "Classic drinks package, 7 nights",
"quantity": 2,
"passengerIds": [
"PAX-01",
"PAX-02"
],
"amountMinor": 30800,
"offerId": "ALL-INCLUSIVE-2027",
"promotionIds": [],
"explanation": []
}
],
"promotions": [
{
"promotionId": "EARLY-BOOKING-10",
"version": 3,
"postBookingPolicy": "keep"
}
],
"totalMinor": 268800
},
"actorRef": "CUST-20419",
"moment": "booking",
"booker": {
"kind": "customer",
"ref": "CUST-20419",
"displayName": "Giulia Rossi"
},
"payer": {
"kind": "customer",
"ref": "CUST-20419",
"displayName": "Giulia Rossi"
}
}'
HTTP/1.1 200
X-Request-Id: req-0003
{
"quotation": {
"quote": {
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quoteRef": "Q-2027-58213",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteVersion": 2
},
"market": "IT",
"status": "converted",
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"intentId": "INT-E7814BE45E5F",
"agencyRef": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"createdBy": {
"kind": "customer",
"actorRef": "CUST-20419"
},
"updatedAt": "2026-11-02T09:06:51.000Z",
"conversion": {
"poId": "PO-5BEE8AAD2A57",
"convertedAt": "2026-11-02T09:06:51.000Z",
"convertedBy": "CUST-20419"
},
"passengers": 2,
"customerRef": "CUST-20419",
"productCode": "MED7-2027-04-12",
"quotationRef": "QT-E419E9088B0D",
"lastAccessedAt": "2026-11-02T09:06:14.000Z"
},
"purchaseOrder": {
"poId": "PO-5BEE8AAD2A57",
"type": "standard",
"lines": [
{
"lineId": "L-A610167BDD4D",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 1,
"ownership": {
"ruleId": "anchor-reservation",
"process": "create"
},
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"externalRef": "RSV-66D6FC0F-000001",
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteLineRef": "q-line-1",
"sourceSystem": "reservation",
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineId": "L-BB4F731FB7C8",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 2,
"ownership": {
"ruleId": "beverage-phase1",
"process": "create"
},
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [],
"quoteLineRef": "q-line-2",
"sourceSystem": "onboard"
}
],
"payer": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"terms": {},
"booker": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"market": "IT",
"moment": "booking",
"origin": {
"channel": "web",
"actorRef": "CUST-20419"
},
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"version": 3,
"currency": "EUR",
"sequence": 1,
"createdAt": "2026-11-02T09:06:51.000Z",
"revisions": [],
"updatedAt": "2026-11-02T09:06:51.000Z",
"totalMinor": 268800,
"attribution": {},
"fullPayment": false,
"finalisation": {
"at": "2026-11-02T09:06:51.000Z",
"channel": "web"
},
"quotationRef": "QT-E419E9088B0D",
"partiesLocked": true,
"frozenConditions": {
"document": {
"lines": [
{
"lineRef": "q-line-1",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 1,
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineRef": "q-line-2",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 2,
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": []
}
],
"market": "IT",
"channel": "web",
"currency": "EUR",
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"promotions": [
{
"version": 3,
"promotionId": "EARLY-BOOKING-10",
"postBookingPolicy": "keep"
}
],
"totalMinor": 268800,
"customerRef": "CUST-20419",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
},
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
}
}
}
The retry with the same key is answered from the stored response, marked Idempotent-Replayed: true. No second order is created.
/order-orchestration/quotations/QT-E419E9088B0D/convertRetry the conversion with the same Idempotency-KeyHTTP/1.1 200
X-Request-Id: req-0004
Idempotent-Replayed: true
{
"quotation": {
"quote": {
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quoteRef": "Q-2027-58213",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteVersion": 2
},
"market": "IT",
"status": "converted",
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"intentId": "INT-E7814BE45E5F",
"agencyRef": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"createdBy": {
"kind": "customer",
"actorRef": "CUST-20419"
},
"updatedAt": "2026-11-02T09:06:51.000Z",
"conversion": {
"poId": "PO-5BEE8AAD2A57",
"convertedAt": "2026-11-02T09:06:51.000Z",
"convertedBy": "CUST-20419"
},
"passengers": 2,
"customerRef": "CUST-20419",
"productCode": "MED7-2027-04-12",
"quotationRef": "QT-E419E9088B0D",
"lastAccessedAt": "2026-11-02T09:06:14.000Z"
},
"purchaseOrder": {
"poId": "PO-5BEE8AAD2A57",
"type": "standard",
"lines": [
{
"lineId": "L-A610167BDD4D",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 1,
"ownership": {
"ruleId": "anchor-reservation",
"process": "create"
},
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"externalRef": "RSV-66D6FC0F-000001",
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteLineRef": "q-line-1",
"sourceSystem": "reservation",
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineId": "L-BB4F731FB7C8",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 2,
"ownership": {
"ruleId": "beverage-phase1",
"process": "create"
},
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [],
"quoteLineRef": "q-line-2",
"sourceSystem": "onboard"
}
],
"payer": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"terms": {},
"booker": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"market": "IT",
"moment": "booking",
"origin": {
"channel": "web",
"actorRef": "CUST-20419"
},
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"version": 3,
"currency": "EUR",
"sequence": 1,
"createdAt": "2026-11-02T09:06:51.000Z",
"revisions": [],
"updatedAt": "2026-11-02T09:06:51.000Z",
"totalMinor": 268800,
"attribution": {},
"fullPayment": false,
"finalisation": {
"at": "2026-11-02T09:06:51.000Z",
"channel": "web"
},
"quotationRef": "QT-E419E9088B0D",
"partiesLocked": true,
"frozenConditions": {
"document": {
"lines": [
{
"lineRef": "q-line-1",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 1,
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineRef": "q-line-2",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 2,
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": []
}
],
"market": "IT",
"channel": "web",
"currency": "EUR",
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"promotions": [
{
"version": 3,
"promotionId": "EARLY-BOOKING-10",
"postBookingPolicy": "keep"
}
],
"totalMinor": 268800,
"customerRef": "CUST-20419",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
},
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
}
}
}
2. The reservation system confirms
The reservation system sends booking.confirmed as an inbound status event. The cabin line moves to fulfilment confirmed, the trip is anchored to the reservation reference, and the drinks line still waits for the onboard system (pendingFeedback).
/order-orchestration/trips/TRP-B2BD5A9771E4/viewRead the trip after the reservation system confirmscurl -X GET "$BASE/order-orchestration/trips/TRP-B2BD5A9771E4/view" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0005"
HTTP/1.1 200
X-Request-Id: req-0005
{
"trip": {
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise",
"reservationRef": "RSV-66D6FC0F-000001"
},
"status": "booked",
"tripId": "TRP-B2BD5A9771E4",
"changes": [
{
"at": "2026-11-02T09:06:51.000Z",
"data": {
"moment": "booking",
"channel": "web",
"totalMinor": 268800
},
"kind": "purchase_order_added",
"poId": "PO-5BEE8AAD2A57",
"summary": "standard order on web at booking: 2 line(s)"
},
{
"at": "2026-11-02T09:07:28.000Z",
"kind": "anchored",
"poId": "PO-5BEE8AAD2A57",
"summary": "anchored to reservation RSV-66D6FC0F-000001 (reservation)"
}
],
"startAt": "2027-04-12T17:00:00Z",
"version": 4,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:07:28.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-E419E9088B0D"
],
"purchaseOrderIds": [
"PO-5BEE8AAD2A57"
]
},
"rollup": {
"commercial": {
"booked": 2
},
"payment": {
"not_due": 2
},
"fulfilment": {
"confirmed": 1,
"requested": 1
},
"billing": {
"not_billed": 2
}
},
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"type": "standard",
"lines": [
{
"lineId": "L-A610167BDD4D",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "confirmed"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 1,
"ownership": {
"ruleId": "anchor-reservation",
"process": "create"
},
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"externalRef": "RSV-66D6FC0F-000001",
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteLineRef": "q-line-1",
"sourceSystem": "reservation",
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineId": "L-BB4F731FB7C8",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 2,
"ownership": {
"ruleId": "beverage-phase1",
"process": "create"
},
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [],
"quoteLineRef": "q-line-2",
"sourceSystem": "onboard"
}
],
"payer": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"terms": {},
"booker": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"market": "IT",
"moment": "booking",
"origin": {
"channel": "web",
"actorRef": "CUST-20419"
},
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"version": 4,
"currency": "EUR",
"sequence": 1,
"createdAt": "2026-11-02T09:06:51.000Z",
"revisions": [],
"updatedAt": "2026-11-02T09:07:28.000Z",
"totalMinor": 268800,
"attribution": {},
"fullPayment": false,
"finalisation": {
"at": "2026-11-02T09:06:51.000Z",
"channel": "web"
},
"quotationRef": "QT-E419E9088B0D",
"partiesLocked": true,
"frozenConditions": {
"document": {
"lines": [
{
"lineRef": "q-line-1",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 1,
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineRef": "q-line-2",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 2,
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": []
}
],
"market": "IT",
"channel": "web",
"currency": "EUR",
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"promotions": [
{
"version": 3,
"promotionId": "EARLY-BOOKING-10",
"postBookingPolicy": "keep"
}
],
"totalMinor": 268800,
"customerRef": "CUST-20419",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
},
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
}
}
],
"quotations": [
{
"quote": {
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quoteRef": "Q-2027-58213",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteVersion": 2
},
"market": "IT",
"status": "converted",
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"intentId": "INT-E7814BE45E5F",
"agencyRef": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"createdBy": {
"kind": "customer",
"actorRef": "CUST-20419"
},
"updatedAt": "2026-11-02T09:06:51.000Z",
"conversion": {
"poId": "PO-5BEE8AAD2A57",
"convertedAt": "2026-11-02T09:06:51.000Z",
"convertedBy": "CUST-20419"
},
"passengers": 2,
"customerRef": "CUST-20419",
"productCode": "MED7-2027-04-12",
"quotationRef": "QT-E419E9088B0D",
"lastAccessedAt": "2026-11-02T09:06:14.000Z"
}
],
"pendingFeedback": [
{
"expectationId": "EXP-A50419D6B81C",
"correlationId": "cor-f55fc69f-6a75-41f0-a1ac-7585af08b98a",
"systemId": "onboard",
"ruleId": "onboard-create",
"expectedEvents": [
"onboard.posted"
],
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"status": "pending",
"dueAt": "2026-11-02T10:06:51.000Z",
"createdAt": "2026-11-02T09:06:51.000Z",
"resolvedAt": null,
"resolution": null
}
],
"openAlerts": [],
"timeline": [
{
"seq": 3,
"messageId": "cb-dfcd6128-4cc1-4294-a8e5-b3a8b0025995",
"direction": "inbound",
"systemId": "reservation",
"eventType": "booking.confirmed",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"outcome": "applied",
"payload": {
"data": {},
"refs": {
"poId": "PO-5BEE8AAD2A57",
"lineIds": [
"L-A610167BDD4D"
],
"externalRef": "RSV-66D6FC0F-000001"
},
"type": "booking.confirmed",
"system": "reservation",
"messageId": "cb-dfcd6128-4cc1-4294-a8e5-b3a8b0025995",
"occurredAt": "2026-11-02T09:06:42.000Z",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6"
},
"occurredAt": "2026-11-02T09:06:42.000Z",
"loggedAt": "2026-11-02T09:06:00.028Z"
},
{
"seq": 2,
"messageId": "out-0cb13e31-9a5f-4709-a58d-5d33ac3c964a",
"direction": "outbound",
"systemId": "onboard",
"eventType": "create.requested",
"correlationId": "cor-f55fc69f-6a75-41f0-a1ac-7585af08b98a",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"outcome": "sent",
"payload": {
"ack": {
"delivery": "integration_log"
},
"error": null,
"lineIds": [
"L-BB4F731FB7C8"
],
"process": "create"
},
"occurredAt": "2026-11-02T09:06:51.000Z",
"loggedAt": "2026-11-02T09:06:00.000Z"
},
{
"seq": 1,
"messageId": "out-878b0dd8-2759-460a-a264-45185e5ce1cc",
"direction": "outbound",
"systemId": "reservation",
"eventType": "create.requested",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"outcome": "sent",
"payload": {
"ack": {
"status": "ACCEPTED",
"gateway": "mock",
"messageId": "ack-6ccff010-49d0-43de-a5f3-c43efd55cfbd"
},
"error": null,
"lineIds": [
"L-A610167BDD4D"
],
"process": "create"
},
"occurredAt": "2026-11-02T09:06:51.000Z",
"loggedAt": "2026-11-02T09:06:00.000Z"
}
]
}
3. Add excursions from the mobile app
After booking, the customer buys two excursions in the app: Pompeii for both guests in Naples, and the Sagrada Familia for PAX-02 in Barcelona. This is a second purchase order on the same trip, with channel app and moment pre_trip. Both lines go to the excursion system.
/order-orchestration/trips/TRP-B2BD5A9771E4/purchase-ordersAdd shore excursions from the mobile app as a second purchase ordercurl -X POST "$BASE/order-orchestration/trips/TRP-B2BD5A9771E4/purchase-orders" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0006" \
-H "Idempotency-Key: 43563ae7-1d12-4b6d-a226-3a66f7d48c7f" \
-H "Content-Type: application/json" \
-d '{
"channel": "app",
"moment": "pre_trip",
"currency": "EUR",
"booker": {
"kind": "customer",
"ref": "CUST-20419",
"displayName": "Giulia Rossi"
},
"payer": {
"kind": "customer",
"ref": "CUST-20419",
"displayName": "Giulia Rossi"
},
"lines": [
{
"productType": "excursion",
"productCode": "EXC-NAP-POMPEII",
"description": "Pompeii and Vesuvius, Naples call",
"quantity": 2,
"amountMinor": 17800,
"passengerIds": [
"PAX-01",
"PAX-02"
],
"serviceDate": "2027-04-14T08:30:00Z"
},
{
"productType": "excursion",
"productCode": "EXC-BCN-SAGRADA",
"description": "Sagrada Familia skip-the-line, Barcelona call",
"quantity": 1,
"amountMinor": 6900,
"passengerIds": [
"PAX-02"
],
"serviceDate": "2027-04-17T09:00:00Z"
}
]
}'
HTTP/1.1 201
X-Request-Id: req-0006
{
"poId": "PO-71B4D4926EDD",
"type": "standard",
"lines": [
{
"lineId": "L-FDAF4DA2CF1A",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"currency": "EUR",
"quantity": 2,
"ownership": {
"ruleId": "excursions",
"process": "create"
},
"amountMinor": 17800,
"description": "Pompeii and Vesuvius, Naples call",
"productCode": "EXC-NAP-POMPEII",
"productType": "excursion",
"serviceDate": "2027-04-14T08:30:00Z",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [],
"sourceSystem": "excursions"
},
{
"lineId": "L-93A9D925FCE1",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"currency": "EUR",
"quantity": 1,
"ownership": {
"ruleId": "excursions",
"process": "create"
},
"amountMinor": 6900,
"description": "Sagrada Familia skip-the-line, Barcelona call",
"productCode": "EXC-BCN-SAGRADA",
"productType": "excursion",
"serviceDate": "2027-04-17T09:00:00Z",
"passengerIds": [
"PAX-02"
],
"promotionIds": [],
"sourceSystem": "excursions"
}
],
"payer": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"terms": {},
"booker": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"moment": "pre_trip",
"origin": {
"channel": "app"
},
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"tripId": "TRP-B2BD5A9771E4",
"channel": "app",
"version": 2,
"currency": "EUR",
"sequence": 2,
"createdAt": "2026-11-02T09:08:42.000Z",
"revisions": [],
"updatedAt": "2026-11-02T09:08:42.000Z",
"totalMinor": 24700,
"attribution": {},
"fullPayment": false,
"finalisation": {
"at": "2026-11-02T09:08:42.000Z",
"channel": "app"
},
"partiesLocked": true
}
4. Payments
The web checkout records the 20% deposit, €537.60, against the trip. The deposit scenario allocates sequentially, cruise fare first, so the whole deposit lands on the cabin line.
/oms-ops/paymentsRecord the booking deposit against the tripcurl -X POST "$BASE/oms-ops/payments" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0007" \
-H "Content-Type: application/json" \
-d '{
"kind": "payment",
"anchor": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"scenario": "deposit",
"method": "card",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 53760,
"currency": "EUR",
"externalRef": "PSP-AUTH-118274",
"idempotencyKey": "dep-Q-2027-58213",
"actor": {
"id": "web-checkout",
"role": "channel",
"channel": "web"
}
}'
HTTP/1.1 201
X-Request-Id: req-0007
{
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"tenantId": "meridian",
"kind": "payment",
"anchor": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"scenario": "deposit",
"method": "card",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 53760,
"currency": "EUR",
"receivedAt": "2026-11-02T09:09:19.000Z",
"externalRef": "PSP-AUTH-118274",
"refundOf": null,
"allocationMethod": "sequential",
"actor": {
"id": "web-checkout",
"role": "channel",
"channel": "web"
},
"recordedAt": "2026-11-02T09:09:19.000Z",
"allocatedMinor": 53760,
"unallocatedMinor": 0,
"refundedMinor": 0,
"legs": [
{
"allocationId": "alc_7ab4ba89-177a-4b91-bf1f-b27285d4aff1",
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"lineId": "L-A610167BDD4D",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"groupId": null,
"amountMinor": 53760,
"currency": "EUR",
"method": "sequential",
"runId": "run_f815e8c5-9bf7-4f60-ac7f-fcb897921a7a",
"reason": "allocate",
"createdAt": "2026-11-02T09:09:19.000Z"
}
],
"idempotent": false
}
The app records the excursion payment against the excursion purchase order. The ancillary_purchase scenario allocates proportionally across its two lines.
/oms-ops/paymentsPay the excursions in full on their own purchase ordercurl -X POST "$BASE/oms-ops/payments" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0008" \
-H "Content-Type: application/json" \
-d '{
"kind": "payment",
"anchor": {
"level": "purchase_order",
"ref": "PO-71B4D4926EDD"
},
"scenario": "ancillary_purchase",
"method": "wallet",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 24700,
"currency": "EUR",
"externalRef": "PSP-AUTH-120931",
"idempotencyKey": "exc-PO-71B4D4926EDD",
"actor": {
"id": "mobile-app",
"role": "channel",
"channel": "app"
}
}'
HTTP/1.1 201
X-Request-Id: req-0008
{
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"tenantId": "meridian",
"kind": "payment",
"anchor": {
"level": "purchase_order",
"ref": "PO-71B4D4926EDD"
},
"scenario": "ancillary_purchase",
"method": "wallet",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 24700,
"currency": "EUR",
"receivedAt": "2026-11-02T09:09:56.000Z",
"externalRef": "PSP-AUTH-120931",
"refundOf": null,
"allocationMethod": "proportional",
"actor": {
"id": "mobile-app",
"role": "channel",
"channel": "app"
},
"recordedAt": "2026-11-02T09:09:56.000Z",
"allocatedMinor": 24700,
"unallocatedMinor": 0,
"refundedMinor": 0,
"legs": [
{
"allocationId": "alc_30c286bb-67c5-441c-84cc-b8dcf6e8548e",
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"lineId": "L-FDAF4DA2CF1A",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"groupId": null,
"amountMinor": 17800,
"currency": "EUR",
"method": "proportional",
"runId": "run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"reason": "allocate",
"createdAt": "2026-11-02T09:09:56.000Z"
},
{
"allocationId": "alc_58bf1f79-5e71-47fc-a961-822f20ac6c2c",
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"lineId": "L-93A9D925FCE1",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"groupId": null,
"amountMinor": 6900,
"currency": "EUR",
"method": "proportional",
"runId": "run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"reason": "allocate",
"createdAt": "2026-11-02T09:09:56.000Z"
}
],
"idempotent": false
}
The trip balance shows €2,935.00 sold, €784.60 paid and €2,150.40 open, with the split per purchase order and line.
/oms-ops/balances/trip/TRP-B2BD5A9771E4Read the trip balancecurl -X GET "$BASE/oms-ops/balances/trip/TRP-B2BD5A9771E4" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0009"
HTTP/1.1 200
X-Request-Id: req-0009
{
"scope": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"currency": "EUR",
"amountMinor": 293500,
"paidMinor": 78460,
"openMinor": 215040,
"unallocatedMinor": 0,
"status": "partially_paid",
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"amountMinor": 268800,
"paidMinor": 53760,
"status": "partially_paid"
},
{
"poId": "PO-71B4D4926EDD",
"amountMinor": 24700,
"paidMinor": 24700,
"status": "paid"
}
],
"trips": [
{
"tripId": "TRP-B2BD5A9771E4",
"amountMinor": 293500,
"paidMinor": 78460,
"status": "partially_paid"
}
],
"lines": [
{
"lineId": "L-BB4F731FB7C8",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"productKind": "beverage",
"amountMinor": 30800,
"paidMinor": 0,
"openMinor": 30800,
"status": "unpaid",
"byPayer": [],
"byPayment": []
},
{
"lineId": "L-A610167BDD4D",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"amountMinor": 238000,
"paidMinor": 53760,
"openMinor": 184240,
"status": "partially_paid",
"byPayer": [
{
"payerRef": "CUST-20419",
"payerRole": "booker",
"paidMinor": 53760
}
],
"byPayment": [
{
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"paidMinor": 53760
}
]
},
{
"lineId": "L-FDAF4DA2CF1A",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"amountMinor": 17800,
"paidMinor": 17800,
"openMinor": 0,
"status": "paid",
"byPayer": [
{
"payerRef": "CUST-20419",
"payerRole": "booker",
"paidMinor": 17800
}
],
"byPayment": [
{
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"paidMinor": 17800
}
]
},
{
"lineId": "L-93A9D925FCE1",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"amountMinor": 6900,
"paidMinor": 6900,
"openMinor": 0,
"status": "paid",
"byPayer": [
{
"payerRef": "CUST-20419",
"payerRole": "booker",
"paidMinor": 6900
}
],
"byPayment": [
{
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"paidMinor": 6900
}
]
}
]
}
The same balance per passenger, with the fee and refund each would get if cancelled on that date:
/oms-ops/balances/trip/TRP-B2BD5A9771E4/passengersRead the balance split by passengercurl -X GET "$BASE/oms-ops/balances/trip/TRP-B2BD5A9771E4/passengers?asOf=2026-11-02T10%3A00%3A00Z" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0010"
HTTP/1.1 200
X-Request-Id: req-0010
{
"scope": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"currency": "EUR",
"amountMinor": 293500,
"paidMinor": 78460,
"openMinor": 215040,
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"tripId": "TRP-B2BD5A9771E4",
"sequence": 1,
"amountMinor": 268800,
"paidMinor": 53760,
"openMinor": 215040,
"lines": [
{
"lineId": "L-BB4F731FB7C8",
"productKind": "beverage",
"status": "booked",
"quoteLineRef": "q-line-2",
"categoryRef": null,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"amountMinor": 30800,
"paidMinor": 0,
"openMinor": 30800,
"units": [
{
"lineId": "L-BB4F731FB7C8",
"poId": "PO-5BEE8AAD2A57",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "beverage",
"passengerRef": "PAX-01",
"passengerName": null,
"amountMinor": 15400,
"paidMinor": 0,
"openMinor": 15400,
"cancelled": false
},
{
"lineId": "L-BB4F731FB7C8",
"poId": "PO-5BEE8AAD2A57",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "beverage",
"passengerRef": "PAX-02",
"passengerName": null,
"amountMinor": 15400,
"paidMinor": 0,
"openMinor": 15400,
"cancelled": false
}
]
},
{
"lineId": "L-A610167BDD4D",
"productKind": "cruise",
"status": "booked",
"quoteLineRef": "q-line-1",
"categoryRef": "BALCONY-B2",
"policy": {
"id": "cruise-fare",
"label": "Cruise fare",
"source": "default",
"tier": {
"minDaysBefore": 90,
"feePercent": 10,
"feeMinorPerPassenger": 0
}
},
"amountMinor": 238000,
"paidMinor": 53760,
"openMinor": 184240,
"units": [
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "cruise",
"passengerRef": "PAX-01",
"passengerName": null,
"amountMinor": 119000,
"paidMinor": 26880,
"openMinor": 92120,
"cancelled": false
},
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "cruise",
"passengerRef": "PAX-02",
"passengerName": null,
"amountMinor": 119000,
"paidMinor": 26880,
"openMinor": 92120,
"cancelled": false
}
]
}
]
},
{
"poId": "PO-71B4D4926EDD",
"tripId": "TRP-B2BD5A9771E4",
"sequence": 2,
"amountMinor": 24700,
"paidMinor": 24700,
"openMinor": 0,
"lines": [
{
"lineId": "L-FDAF4DA2CF1A",
"productKind": "excursion",
"status": "booked",
"quoteLineRef": null,
"categoryRef": null,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"amountMinor": 17800,
"paidMinor": 17800,
"openMinor": 0,
"units": [
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "excursion",
"passengerRef": "PAX-01",
"passengerName": null,
"amountMinor": 8900,
"paidMinor": 8900,
"openMinor": 0,
"cancelled": false
},
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"amountMinor": 8900,
"paidMinor": 8900,
"openMinor": 0,
"cancelled": false
}
]
},
{
"lineId": "L-93A9D925FCE1",
"productKind": "excursion",
"status": "booked",
"quoteLineRef": null,
"categoryRef": null,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"amountMinor": 6900,
"paidMinor": 6900,
"openMinor": 0,
"units": [
{
"lineId": "L-93A9D925FCE1",
"poId": "PO-71B4D4926EDD",
"tripId": "TRP-B2BD5A9771E4",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"amountMinor": 6900,
"paidMinor": 6900,
"openMinor": 0,
"cancelled": false
}
]
}
]
}
],
"passengers": [
{
"passengerRef": "PAX-01",
"passengerName": null,
"tripId": "TRP-B2BD5A9771E4",
"travelling": true,
"lines": 3,
"amountMinor": 143300,
"paidMinor": 35780,
"openMinor": 107520,
"feeIfCancelledMinor": 11900,
"refundIfCancelledMinor": 23880
},
{
"passengerRef": "PAX-02",
"passengerName": null,
"tripId": "TRP-B2BD5A9771E4",
"travelling": true,
"lines": 4,
"amountMinor": 150200,
"paidMinor": 42680,
"openMinor": 107520,
"feeIfCancelledMinor": 11900,
"refundIfCancelledMinor": 30780
}
]
}
5. Change and refund
Preview a passenger cancellation
Before changing anything, the contact centre previews what removing PAX-02 would mean on 20 November 2026, 143 days before departure: the cancellation fee from the fare's tiers, what is refunded, and what is re-applied to the remaining guest. Nothing is written.
/oms-ops/changes/previewPreview cancelling one passengercurl -X POST "$BASE/oms-ops/changes/preview" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0011" \
-H "Content-Type: application/json" \
-d '{
"tripId": "TRP-B2BD5A9771E4",
"kind": "remove_passengers",
"passengers": [
"PAX-02"
],
"reason": "Guest can no longer travel",
"asOf": "2026-11-20T10:00:00Z",
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
}
}'
HTTP/1.1 200
X-Request-Id: req-0011
{
"changeId": "chg_9356355f3e5c3b91efd7",
"mode": "preview",
"tripId": "TRP-B2BD5A9771E4",
"kind": "remove_passengers",
"reason": "Guest can no longer travel",
"asOf": "2026-11-20T10:00:00Z",
"departureAt": "2027-04-12T17:00:00Z",
"daysBeforeDeparture": 143,
"currency": "EUR",
"passengers": [
{
"passengerRef": "PAX-02",
"passengerName": null,
"leaves": true,
"units": [
{
"lineId": "L-BB4F731FB7C8",
"poId": "PO-5BEE8AAD2A57",
"productKind": "beverage",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 15400,
"paidMinor": 0,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 0,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
},
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "cruise-fare",
"label": "Cruise fare",
"source": "default",
"tier": {
"minDaysBefore": 90,
"feePercent": 10,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 119000,
"paidMinor": 26880,
"feeMinor": 11900,
"retainedMinor": 4887,
"refundMinor": 0,
"heldMinor": 0,
"reappliedOutMinor": 21993,
"reappliedInMinor": 0,
"openMinor": 7013
},
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 8900,
"paidMinor": 8900,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 8900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
},
{
"lineId": "L-93A9D925FCE1",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 6900,
"paidMinor": 6900,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 6900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
}
],
"priceMinor": 150200,
"paidMinor": 42680,
"feeMinor": 11900,
"refundMinor": 15800,
"heldMinor": 0,
"reappliedOutMinor": 21993,
"reappliedInMinor": 0,
"openMinor": 7013
}
],
"reappliedTo": [
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"passengerRef": "PAX-01",
"passengerName": null,
"cancelled": false,
"policy": null,
"priceMinor": 119000,
"paidMinor": 26880,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 0,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 21993,
"openMinor": 70127
}
],
"lines": [
{
"lineId": "L-BB4F731FB7C8",
"poId": "PO-5BEE8AAD2A57",
"productKind": "beverage",
"oldAmountMinor": 30800,
"newAmountMinor": 15400,
"paidBeforeMinor": 0,
"paidAfterMinor": 0,
"changed": true
},
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"oldAmountMinor": 238000,
"newAmountMinor": 130900,
"paidBeforeMinor": 53760,
"paidAfterMinor": 53760,
"changed": true
},
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"oldAmountMinor": 17800,
"newAmountMinor": 8900,
"paidBeforeMinor": 17800,
"paidAfterMinor": 8900,
"changed": true
},
{
"lineId": "L-93A9D925FCE1",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"oldAmountMinor": 6900,
"newAmountMinor": 0,
"paidBeforeMinor": 6900,
"paidAfterMinor": 0,
"changed": true
}
],
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"changed": true,
"cancelled": false,
"oldTotalMinor": 268800,
"newTotalMinor": 146300
},
{
"poId": "PO-71B4D4926EDD",
"changed": true,
"cancelled": false,
"oldTotalMinor": 24700,
"newTotalMinor": 8900
}
],
"payments": [
{
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"scenario": "ancillary_purchase",
"releasedMinor": 15800,
"reappliedMinor": 0,
"refundMinor": 15800,
"heldMinor": 0
}
],
"refunds": [],
"reallocationRunId": "realloc_3af5ebe1-a1d1-4709-b4ba-d1f4e313709a",
"reconciliation": {
"paidMinor": 42680,
"feesRetainedMinor": 4887,
"refundMinor": 15800,
"heldMinor": 0,
"reappliedMinor": 21993,
"receivedMinor": 0,
"balanced": true,
"trip": {
"amountBeforeMinor": 293500,
"amountAfterMinor": 155200,
"paidBeforeMinor": 78460,
"paidAfterMinor": 62660,
"offLinesMinor": 15800,
"balanced": true
}
}
}
Cancel the excursion order
The customer decides to keep both guests but cancel the excursions. The change cancels the excursion purchase order (the excursion system receives modify and cancel requests), re-runs allocation, and refunds the €247.00 paid on that order to the wallet payment it came from. The booking order is unchanged, and the figures reconcile to the cent.
/oms-ops/changesCancel the excursion order; the money paid on it is refundedcurl -X POST "$BASE/oms-ops/changes" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0012" \
-H "Idempotency-Key: 3387b41a-0391-4bf1-ab15-94130a843671" \
-H "Content-Type: application/json" \
-d '{
"tripId": "TRP-B2BD5A9771E4",
"kind": "cancel_purchase_order",
"poId": "PO-71B4D4926EDD",
"reason": "Guest changed shore plans",
"asOf": "2026-11-20T10:00:00Z",
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
}
}'
HTTP/1.1 201
X-Request-Id: req-0012
{
"changeId": "chg_816c2c9911ef9df067ce",
"mode": "applied",
"tripId": "TRP-B2BD5A9771E4",
"kind": "cancel_purchase_order",
"reason": "Guest changed shore plans",
"asOf": "2026-11-20T10:00:00Z",
"departureAt": "2027-04-12T17:00:00Z",
"daysBeforeDeparture": 143,
"currency": "EUR",
"passengers": [
{
"passengerRef": "PAX-01",
"passengerName": null,
"leaves": false,
"units": [
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"passengerRef": "PAX-01",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 8900,
"paidMinor": 8900,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 8900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
}
],
"priceMinor": 8900,
"paidMinor": 8900,
"feeMinor": 0,
"refundMinor": 8900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
},
{
"passengerRef": "PAX-02",
"passengerName": null,
"leaves": false,
"units": [
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 8900,
"paidMinor": 8900,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 8900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
},
{
"lineId": "L-93A9D925FCE1",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"passengerRef": "PAX-02",
"passengerName": null,
"cancelled": true,
"policy": {
"id": "refundable",
"label": "Refundable before departure",
"source": "product_kind",
"tier": {
"minDaysBefore": 0,
"feePercent": 0,
"feeMinorPerPassenger": 0
}
},
"priceMinor": 6900,
"paidMinor": 6900,
"feeMinor": 0,
"retainedMinor": 0,
"refundMinor": 6900,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
}
],
"priceMinor": 15800,
"paidMinor": 15800,
"feeMinor": 0,
"refundMinor": 15800,
"heldMinor": 0,
"reappliedOutMinor": 0,
"reappliedInMinor": 0,
"openMinor": 0
}
],
"reappliedTo": [],
"lines": [
{
"lineId": "L-BB4F731FB7C8",
"poId": "PO-5BEE8AAD2A57",
"productKind": "beverage",
"oldAmountMinor": 30800,
"newAmountMinor": 30800,
"paidBeforeMinor": 0,
"paidAfterMinor": 0,
"changed": false
},
{
"lineId": "L-A610167BDD4D",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"oldAmountMinor": 238000,
"newAmountMinor": 238000,
"paidBeforeMinor": 53760,
"paidAfterMinor": 53760,
"changed": false
},
{
"lineId": "L-FDAF4DA2CF1A",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"oldAmountMinor": 17800,
"newAmountMinor": 0,
"paidBeforeMinor": 17800,
"paidAfterMinor": 0,
"changed": true
},
{
"lineId": "L-93A9D925FCE1",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"oldAmountMinor": 6900,
"newAmountMinor": 0,
"paidBeforeMinor": 6900,
"paidAfterMinor": 0,
"changed": true
}
],
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"changed": false,
"cancelled": false,
"oldTotalMinor": 268800,
"newTotalMinor": 268800
},
{
"poId": "PO-71B4D4926EDD",
"changed": true,
"cancelled": true,
"oldTotalMinor": 24700,
"newTotalMinor": 0
}
],
"payments": [
{
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"scenario": "ancillary_purchase",
"releasedMinor": 24700,
"reappliedMinor": 0,
"refundMinor": 24700,
"heldMinor": 0
}
],
"refunds": [
{
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"amountMinor": 24700
}
],
"reallocationRunId": "realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"reconciliation": {
"paidMinor": 24700,
"feesRetainedMinor": 0,
"refundMinor": 24700,
"heldMinor": 0,
"reappliedMinor": 0,
"receivedMinor": 0,
"balanced": true,
"trip": {
"amountBeforeMinor": 293500,
"amountAfterMinor": 268800,
"paidBeforeMinor": 78460,
"paidAfterMinor": 53760,
"offLinesMinor": 24700,
"balanced": true
}
},
"idempotent": false
}
The refund the change created:
/oms-ops/payments/pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2Read the refund the change createdcurl -X GET "$BASE/oms-ops/payments/pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0013"
HTTP/1.1 200
X-Request-Id: req-0013
{
"kind": "refund",
"note": "Guest changed shore plans",
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"method": "wallet",
"currency": "EUR",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"scenario": "refund",
"tenantId": "meridian",
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"receivedAt": "2026-11-02T09:06:42.000Z",
"recordedAt": "2026-11-02T09:06:42.000Z",
"amountMinor": 24700,
"externalRef": null,
"allocationMethod": "proportional",
"allocatedMinor": 0,
"unallocatedMinor": 0,
"refundedMinor": 0,
"legs": []
}
Refund part of the deposit
A €50.00 price-match refund on the deposit is recorded directly as a refund of the deposit payment. Its allocation reverses €50.00 on the cabin line.
/oms-ops/paymentsRefund part of the deposit directlycurl -X POST "$BASE/oms-ops/payments" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0014" \
-H "Content-Type: application/json" \
-d '{
"kind": "refund",
"refundOf": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"anchor": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"scenario": "refund",
"method": "card",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 5000,
"currency": "EUR",
"note": "Price match after promotion change",
"idempotencyKey": "rfd-Q-2027-58213-1",
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
}
}'
HTTP/1.1 201
X-Request-Id: req-0014
{
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"tenantId": "meridian",
"kind": "refund",
"anchor": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"scenario": "refund",
"method": "card",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"amountMinor": 5000,
"currency": "EUR",
"receivedAt": "2026-11-02T09:13:38.000Z",
"externalRef": null,
"refundOf": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"allocationMethod": "proportional",
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"recordedAt": "2026-11-02T09:13:38.000Z",
"note": "Price match after promotion change",
"allocatedMinor": -5000,
"unallocatedMinor": 0,
"refundedMinor": 0,
"legs": [
{
"allocationId": "alc_bf81d462-5411-4169-ba86-1147862d70c6",
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"lineId": "L-A610167BDD4D",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"groupId": null,
"amountMinor": -5000,
"currency": "EUR",
"method": "proportional",
"runId": "run_593bfe8a-a4a6-4d9f-a900-26a42dcd53b3",
"reason": "refund",
"createdAt": "2026-11-02T09:13:38.000Z"
}
],
"idempotent": false
}
6. The result
The trip is still booked, with both purchase orders and the history of the change:
/order-orchestration/trips/TRP-B2BD5A9771E4Read the trip after the changecurl -X GET "$BASE/order-orchestration/trips/TRP-B2BD5A9771E4" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0015"
HTTP/1.1 200
X-Request-Id: req-0015
{
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise",
"reservationRef": "RSV-66D6FC0F-000001"
},
"status": "booked",
"tripId": "TRP-B2BD5A9771E4",
"changes": [
{
"at": "2026-11-02T09:06:51.000Z",
"data": {
"moment": "booking",
"channel": "web",
"totalMinor": 268800
},
"kind": "purchase_order_added",
"poId": "PO-5BEE8AAD2A57",
"summary": "standard order on web at booking: 2 line(s)"
},
{
"at": "2026-11-02T09:07:28.000Z",
"kind": "anchored",
"poId": "PO-5BEE8AAD2A57",
"summary": "anchored to reservation RSV-66D6FC0F-000001 (reservation)"
},
{
"at": "2026-11-02T09:08:42.000Z",
"data": {
"moment": "pre_trip",
"channel": "app",
"totalMinor": 24700
},
"kind": "purchase_order_added",
"poId": "PO-71B4D4926EDD",
"summary": "standard order on app at pre_trip: 2 line(s)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"data": {
"revision": 1,
"proposalId": "chg_816c2c9911ef9df067ce:PO-71B4D4926EDD",
"newTotalMinor": 0,
"oldTotalMinor": 24700
},
"kind": "order_change",
"poId": "PO-71B4D4926EDD",
"summary": "cancel_purchase_order: 24700 → 0 EUR minor (by Marco Bianchi)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"kind": "purchase_order_status",
"poId": "PO-71B4D4926EDD",
"summary": "booked → cancelled: Guest changed shore plans"
}
],
"startAt": "2027-04-12T17:00:00Z",
"version": 7,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:12:24.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-E419E9088B0D"
],
"purchaseOrderIds": [
"PO-5BEE8AAD2A57",
"PO-71B4D4926EDD"
]
}
The balance now shows €2,688.00 sold and €487.60 paid:
/oms-ops/balances/trip/TRP-B2BD5A9771E4Read the balance after the change and refundscurl -X GET "$BASE/oms-ops/balances/trip/TRP-B2BD5A9771E4" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0016"
HTTP/1.1 200
X-Request-Id: req-0016
{
"scope": {
"level": "trip",
"ref": "TRP-B2BD5A9771E4"
},
"currency": "EUR",
"amountMinor": 268800,
"paidMinor": 48760,
"openMinor": 220040,
"unallocatedMinor": 0,
"status": "partially_paid",
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"amountMinor": 268800,
"paidMinor": 48760,
"status": "partially_paid"
},
{
"poId": "PO-71B4D4926EDD",
"amountMinor": 0,
"paidMinor": 0,
"status": "no_charge"
}
],
"trips": [
{
"tripId": "TRP-B2BD5A9771E4",
"amountMinor": 268800,
"paidMinor": 48760,
"status": "partially_paid"
}
],
"lines": [
{
"lineId": "L-BB4F731FB7C8",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"productKind": "beverage",
"amountMinor": 30800,
"paidMinor": 0,
"openMinor": 30800,
"status": "unpaid",
"byPayer": [],
"byPayment": []
},
{
"lineId": "L-A610167BDD4D",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"productKind": "cruise",
"amountMinor": 238000,
"paidMinor": 48760,
"openMinor": 189240,
"status": "partially_paid",
"byPayer": [
{
"payerRef": "CUST-20419",
"payerRole": "booker",
"paidMinor": 48760
}
],
"byPayment": [
{
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"paidMinor": 48760
}
]
},
{
"lineId": "L-FDAF4DA2CF1A",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"amountMinor": 0,
"paidMinor": 0,
"openMinor": 0,
"status": "no_charge",
"byPayer": [],
"byPayment": []
},
{
"lineId": "L-93A9D925FCE1",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"productKind": "excursion",
"amountMinor": 0,
"paidMinor": 0,
"openMinor": 0,
"status": "no_charge",
"byPayer": [],
"byPayment": []
}
]
}
Every payment, allocation, re-allocation, refund and change was published to the outbox, which an integration layer polls by sequence:
/oms-ops/eventsPoll the order engine outboxcurl -X GET "$BASE/oms-ops/events?afterSeq=0&limit=100" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0017"
HTTP/1.1 200
X-Request-Id: req-0017
{
"events": [
{
"eventId": "0099457d-1c0b-465f-a154-aad00b8976c0",
"seq": 1,
"type": "oms.payment.recorded",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.recorded:pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"payload": {
"kind": "payment",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "TRP-B2BD5A9771E4",
"level": "trip"
},
"currency": "EUR",
"refundOf": null,
"scenario": "deposit",
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"amountMinor": 53760
},
"createdAt": "2026-11-02T09:09:19.000Z"
},
{
"eventId": "1af68428-86dc-4bd4-a8cc-11c3c1a72702",
"seq": 2,
"type": "oms.payment.allocated",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.allocated:pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0:run_f815e8c5-9bf7-4f60-ac7f-fcb897921a7a",
"payload": {
"legs": [
{
"lineId": "L-A610167BDD4D",
"amountMinor": 53760
}
],
"runId": "run_f815e8c5-9bf7-4f60-ac7f-fcb897921a7a",
"method": "sequential",
"ruleId": null,
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:09:19.000Z"
},
{
"eventId": "4486cad2-c5d6-419a-ab5d-8f95c79be693",
"seq": 3,
"type": "oms.payment.recorded",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.recorded:pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"payload": {
"kind": "payment",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"currency": "EUR",
"refundOf": null,
"scenario": "ancillary_purchase",
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"amountMinor": 24700
},
"createdAt": "2026-11-02T09:09:56.000Z"
},
{
"eventId": "71e9be90-12eb-462a-a147-5268ab125ef5",
"seq": 4,
"type": "oms.payment.allocated",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.allocated:pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b:run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"payload": {
"legs": [
{
"lineId": "L-FDAF4DA2CF1A",
"amountMinor": 17800
},
{
"lineId": "L-93A9D925FCE1",
"amountMinor": 6900
}
],
"runId": "run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"method": "proportional",
"ruleId": null,
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:09:56.000Z"
},
{
"eventId": "66d970d0-e797-4cc3-a4bc-250e18435614",
"seq": 6,
"type": "oms.payment.reallocated",
"subjectRef": "trips:TRP-B2BD5A9771E4",
"dedupeKey": "payment.reallocated:realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"payload": {
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"runId": "realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"tripIds": [
"TRP-B2BD5A9771E4"
],
"appliedMinor": 0,
"releasedMinor": 24700
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "559a9b87-c7dc-44f4-a6a1-c10ce892368b",
"seq": 7,
"type": "oms.payment.recorded",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.recorded:pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"payload": {
"kind": "refund",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"reason": "Guest changed shore plans",
"currency": "EUR",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"scenario": "refund",
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"amountMinor": 24700
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "f598a613-f978-4679-a6fa-cd12e1da75dc",
"seq": 8,
"type": "oms.refund.requested",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "refund.requested:pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"payload": {
"lines": [
{
"lineId": "L-FDAF4DA2CF1A",
"amountMinor": 17800
},
{
"lineId": "L-93A9D925FCE1",
"amountMinor": 6900
}
],
"method": "wallet",
"reason": "Guest changed shore plans",
"tripId": "TRP-B2BD5A9771E4",
"changeId": "chg_816c2c9911ef9df067ce",
"currency": "EUR",
"refundId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"amountMinor": 24700,
"externalRef": "PSP-AUTH-120931"
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "4b1d5267-3e86-4020-a3d9-76ab37019f40",
"seq": 9,
"type": "oms.change.applied",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "change.applied:3387b41a-0391-4bf1-ab15-94130a843671",
"payload": {
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"impact": {
"asOf": "2026-11-20T10:00:00Z",
"kind": "cancel_purchase_order",
"mode": "applied",
"lines": [
{
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"changed": false,
"productKind": "beverage",
"newAmountMinor": 30800,
"oldAmountMinor": 30800,
"paidAfterMinor": 0,
"paidBeforeMinor": 0
},
{
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"changed": false,
"productKind": "cruise",
"newAmountMinor": 238000,
"oldAmountMinor": 238000,
"paidAfterMinor": 53760,
"paidBeforeMinor": 53760
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"changed": true,
"productKind": "excursion",
"newAmountMinor": 0,
"oldAmountMinor": 17800,
"paidAfterMinor": 0,
"paidBeforeMinor": 17800
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-93A9D925FCE1",
"changed": true,
"productKind": "excursion",
"newAmountMinor": 0,
"oldAmountMinor": 6900,
"paidAfterMinor": 0,
"paidBeforeMinor": 6900
}
],
"reason": "Guest changed shore plans",
"tripId": "TRP-B2BD5A9771E4",
"refunds": [
{
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"amountMinor": 24700
}
],
"changeId": "chg_816c2c9911ef9df067ce",
"currency": "EUR",
"payments": [
{
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"scenario": "ancillary_purchase",
"heldMinor": 0,
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"refundMinor": 24700,
"releasedMinor": 24700,
"reappliedMinor": 0
}
],
"passengers": [
{
"units": [
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"productKind": "excursion",
"refundMinor": 8900,
"passengerRef": "PAX-01",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"leaves": false,
"feeMinor": 0,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"refundMinor": 8900,
"passengerRef": "PAX-01",
"passengerName": null,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
},
{
"units": [
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"productKind": "excursion",
"refundMinor": 8900,
"passengerRef": "PAX-02",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-93A9D925FCE1",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 6900,
"priceMinor": 6900,
"productKind": "excursion",
"refundMinor": 6900,
"passengerRef": "PAX-02",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"leaves": false,
"feeMinor": 0,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 15800,
"priceMinor": 15800,
"refundMinor": 15800,
"passengerRef": "PAX-02",
"passengerName": null,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"departureAt": "2027-04-12T17:00:00Z",
"reappliedTo": [],
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"changed": false,
"cancelled": false,
"newTotalMinor": 268800,
"oldTotalMinor": 268800
},
{
"poId": "PO-71B4D4926EDD",
"changed": true,
"cancelled": true,
"newTotalMinor": 0,
"oldTotalMinor": 24700
}
],
"reconciliation": {
"trip": {
"balanced": true,
"offLinesMinor": 24700,
"paidAfterMinor": 53760,
"paidBeforeMinor": 78460,
"amountAfterMinor": 268800,
"amountBeforeMinor": 293500
},
"balanced": true,
"heldMinor": 0,
"paidMinor": 24700,
"refundMinor": 24700,
"receivedMinor": 0,
"reappliedMinor": 0,
"feesRetainedMinor": 0
},
"reallocationRunId": "realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"daysBeforeDeparture": 143
},
"shares": [
{
"after": [
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-01"
},
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-02"
}
],
"before": [
{
"amountMinor": 8900,
"passengerRef": "PAX-01"
},
{
"amountMinor": 8900,
"passengerRef": "PAX-02"
}
],
"lineId": "L-FDAF4DA2CF1A"
},
{
"after": [
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-02"
}
],
"before": [
{
"amountMinor": 6900,
"passengerRef": "PAX-02"
}
],
"lineId": "L-93A9D925FCE1"
}
],
"idempotencyKey": "3387b41a-0391-4bf1-ab15-94130a843671"
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "70f39b0a-7924-4934-a326-ab51451c48dd",
"seq": 10,
"type": "oms.payment.recorded",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.recorded:pay_55710c02-f20c-4099-a7ee-844561a5764f",
"payload": {
"kind": "refund",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "TRP-B2BD5A9771E4",
"level": "trip"
},
"currency": "EUR",
"refundOf": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"scenario": "refund",
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"amountMinor": 5000
},
"createdAt": "2026-11-02T09:13:38.000Z"
},
{
"eventId": "a1420fbe-69bc-4eb7-a215-9582caf4f715",
"seq": 11,
"type": "oms.payment.allocated",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.allocated:pay_55710c02-f20c-4099-a7ee-844561a5764f:run_593bfe8a-a4a6-4d9f-a900-26a42dcd53b3",
"payload": {
"legs": [
{
"lineId": "L-A610167BDD4D",
"amountMinor": -5000
}
],
"runId": "run_593bfe8a-a4a6-4d9f-a900-26a42dcd53b3",
"method": "proportional",
"ruleId": null,
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:13:38.000Z"
}
]
}
What to take from this
- One trip holds orders from different channels and moments, each routed to the system that executes it.
- Payments are allocated to lines, so balances and refunds are exact per order, line and passenger.
- Every write in the flow is safe to retry with an
Idempotency-Key. - Every change is visible to other systems through the outbox, and every exchange with a specialist system through the integration log.