Skip to content

Payment

aggregate-root payment


Payment obligation and state associated with a basket, order, return, or exchange.

Business Purpose: Support authorization, capture, void, refund, and settlement across Unified Commerce processes.

Identity

Type Field Description
global payment-id Payment ID uniquely identifies the payment across authorization, capture, void, refund and settlement states.

Attributes

Attribute Description
payment-id Payment ID Stable payment identifier.
order-id Order ID Related order reference when applicable.
amount Amount Payment amount.
currency Currency Payment currency.
status Status Current payment state.

Lifecycle

createdauthorizedcapturedvoidedrefundedsettled

Invariants

  • stable-payment-id — Payment ID must remain stable for the lifetime of the payment.
  • payment-amount-has-currency — Payment amount must be interpreted with a currency.
  • payment-transactions-belong-to-payment — Payment Transaction entries must belong to exactly one Payment aggregate.

Relationships

Type Target
settles order order
contains payment-transaction payment-transaction
results-in refund refund
uses gift-card gift-card
uses voucher voucher

Events

Event Classification Terminal
PaymentAuthorized transitioned
PaymentCaptured transitioned
PaymentVoided transitioned
PaymentRefunded transitioned
PaymentSettled transitioned

Used by Capabilities

  • payment-processing Payment Processing

Used by Processes

Used by Applications

  • Payment Hub payment-hub
  • POS pos

Semantic Constraints

Constraint Type Rule
payment-belongs-to-order association A Payment must be associated with exactly one Order. Payment without a…
refund-belongs-to-payment association A Refund must be applied against exactly one original Payment.
payment-owned-by-payment-hub ownership The Payment lifecycle is exclusively owned by the Payment Hub.
payment-in-payment-domain domain-containment The Payment Business Object is owned by the Payment domain.
payment-capture-requires-authorisation lifecycle-gate A payment cannot be captured without prior authorisation. Capture dire…
payment-refund-requires-capture lifecycle-gate A payment cannot be refunded unless it has been captured. Refunding an…
payment-cannot-reactivate-voided lifecycle-gate A voided payment cannot be captured. A new payment authorisation must …

Note

Aligned with existing payment object and payment-processing capability.

Referenced by APIs

Endpoint Method Role Capability
/payments/authorizations POST response payment-processing
/payments/authorizations/{id}/capture POST response payment-processing
/payments/authorizations/{id}/void POST response payment-processing
/transactions/{id}/payment POST request-body payment-processing

← Back to Payment Domain