Skip to content

Checkout

customer action transactional


Outcome

A confirmed order is created with payment authorised, promotions applied and loyalty benefits calculated.

Service Flow

flowchart LR
    S0["Create Basket"]
    S1["Calculate Basket"]
    S0 --> S1
    S2["Evaluate Promotions"]
    S1 --> S2
    S3["Calculate Benefits"]
    S2 --> S3
    S4["Authorize Payment"]
    S3 --> S4
    S5["Create Order"]
    S4 --> S5

Capabilities

Basket Management Checkout Promotions Loyalty Payment Processing Order Management

Domains

customer commerce pricing promotion loyalty payment order

Business Objects

Object Classification Domain
customer aggregate-root customer
basket aggregate-root commerce
promotion aggregate-root promotion
payment aggregate-root payment
order aggregate-root order

Business Services

  • create-basket
  • calculate-basket
  • evaluate-promotions
  • calculate-benefits
  • authorize-payment
  • create-order

Applications

Application Classification
POS pos system-of-engagement
eCommerce Platform ecommerce-platform system-of-engagement
Promotion Engine promotion-engine system-of-intelligence
Payment Hub payment-hub platform
OMS oms system-of-record
Event Classification Object Terminal
BasketCreated created basket
BasketUpdated updated basket
BasketCalculated calculated basket
BasketCheckedOut transitioned basket
BasketCheckoutStarted transitioned basket
BasketConverted transitioned basket
BasketAbandoned transitioned basket
BasketMerged transitioned basket
OrderCreated created order
OrderValidated transitioned order
OrderConfirmed transitioned order
OrderModified updated order
OrderCancelled transitioned order
OrderClosed transitioned order
PromotionApplied transitioned promotion
PromotionEvaluated calculated promotion
CouponValidated calculated coupon
CouponRedeemed transitioned coupon
LoyaltyMemberEnrolled created loyalty-member
LoyaltyPointsCalculated calculated loyalty-account
LoyaltyPointsIssued transitioned loyalty-account
LoyaltyPointsRedeemed transitioned loyalty-account
LoyaltyBenefitsCalculated calculated loyalty-account
PaymentAuthorized transitioned payment
PaymentCaptured transitioned payment
PaymentVoided transitioned payment
PaymentRefunded transitioned payment
PaymentSettled transitioned payment
PointsIssued updated loyalty-account
PointsRedeemed updated loyalty-account
CustomerCommunicationSent created customer
LoyaltyCardActivated created loyalty-member
LoyaltyPointsAccrued updated loyalty-member
GiftCardActivated transitioned gift-card
GiftCardRedeemed updated gift-card
GiftCardToppedUp updated gift-card
GiftCardExpired transitioned gift-card
GiftCardCancelled transitioned gift-card
GiftCardRefunded transitioned gift-card
RefundProcessed updated refund
RefundFailed transitioned refund
RefundConvertedToCredit transitioned refund
CheckoutStarted transitioned basket
CheckoutCancelled transitioned basket
BasketLineAdded created basket-line
LoyaltyPointsEarned updated loyalty-account
Endpoint Method Service Description
/orders POST create-order Creates a new Order from a validated Basket, transition…
/orders/{id} GET track-order Retrieves the full state of an Order including lines, p…
/orders/{id}/cancel POST cancel-order Cancels a confirmed Order, triggering reversal of payme…
/orders/{id}/confirm POST confirm-order Confirms a validated Order once payment is authorised, …
/payments/authorizations POST authorize-payment Submits a payment authorisation request for the order t…
/payments/authorizations/{id}/capture POST capture-payment Captures a previously authorised Payment. Requires paym…
/payments/authorizations/{id}/void POST void-payment Voids a payment authorisation that has not yet been cap…
/payments/{id}/refunds POST refund-payment Initiates a full or partial refund against a captured p…
/loyalty/members POST enroll-member Enrolls a Customer in the loyalty programme, creating a…
/loyalty/accounts/{id}/points POST issue-points Issues loyalty points to a member's account based on a …
/loyalty/accounts/{id}/redemptions POST redeem-points Redeems loyalty points against a basket during checkout…
/promotions/evaluate POST evaluate-promotions Evaluates all applicable promotions against a basket, a…
/transactions POST checkout-basket Opens a new POS transaction, initialising the basket fo…
/transactions/{id}/payment POST authorize-payment Adds a payment tender to an in-progress POS transaction…
/transactions/{id}/void POST cancel-order Voids an in-progress POS transaction before payment com…
/baskets POST create-basket Creates a new digital basket for an anonymous or authen…
/baskets/{id}/lines POST add-basket-item Adds a product line to an existing basket, validating a…
/baskets/{id}/checkout POST checkout-basket Converts a validated basket into an order, triggering p…
/members/{id}/earn POST issue-points Awards loyalty points to a member account based on a co…
/members/{id}/redeem POST redeem-points Redeems loyalty points as a payment tender during check…
/members/{id}/balance GET calculate-points Returns current points balance, tier status, and next t…

Validation Rules

Rule Type Severity Condition
checkout-requires-active-basket pre-condition invariant basket.lifecycle = active AND basket.count(basket-line)…
checkout-requires-active-product pre-condition invariant product.lifecycle = active for each basket-line
checkout-creates-order post-condition invariant order.lifecycle = confirmed AND order.count(order-line)…
checkout-clears-basket post-condition invariant basket.lifecycle = checked-out

← Back to Process Catalog