Skip to main content

Ubiquitous language

The terms this context speaks, mapped to the identifier in the code. Source: internal/domain/paymentauthorization, internal/domain/refund, internal/domain/shared, internal/application/{parked,provider,usecases}. The storefront-wide glossary is on warehouse-docs.

Own terms​

TermDefinitionCode identifierNot to be confused with
Payment AuthorizationA hold on the shopper's payment method for the quote total, split into allocations per shipment group. One live (non-declined) record per checkout session.paymentauthorization.PaymentAuthorizationA charge: an authorization moves no money until an allocation is captured.
AllocationThe share of an authorization that belongs to one shipment group: groupNo, amountMinor, captured_minor, tracking numbers, state PENDING, CAPTURED or RELEASED.paymentauthorization.Allocation, AllocState, AllocationInputThe checkout session's per-group amount, the same number before it reaches this context.
CaptureTaking an allocation's money when its shipment group ships.PaymentAuthorization.Capture, use case Consumer.ApplyFact (kind Shipped)Authorize (the hold at checkout).
ReleaseLetting an uncaptured allocation go when its group is cancelled or unsourceable.PaymentAuthorization.Release, ReasonCancelled, ReasonUnsourceableVoid, which cancels the whole authorization.
VoidCancelling the whole authorization before any capture.PaymentAuthorization.Void, usecases.VoidAuthorization, ReasonVoidedRelease (one allocation) and Refund (money already captured).
RefundReturning captured money for a lost or returned package, or manually.refund.Refund, refund.Reason (LOST, RETURNED_TO_SENDER, MANUAL)Void and Release, which return a hold, not money.
ReauthorizationA fresh provider hold replacing one about to expire, for allocations not yet captured.PaymentAuthorization.Reauthorize, usecases.ReauthorizeBeforeExpiry, event PaymentReauthorizedThe first authorize at checkout (AuthorizePayment).
ExpiryThe moment (expiresAt) after which the provider no longer honours the hold; no capture after it.PaymentAuthorization.Expire, ErrCaptureAfterExpiry, state EXPIREDVoid (a choice) and Release (one group).
DeclinedThe provider refused the authorize attempt (or a re-authorization). The record is kept as a terminal DECLINED authorization and the checkout session stays open for another token.state DECLINED, PaymentDeclined, ReasonReauthDeclinedA decline of the shopper's order: the order is not placed yet.
Payment Method TokenThe PSP token standing in for the shopper's card; the storefront never sees a card number.AuthorizePaymentInput.PaymentMethodToken, provider.AuthorizeRequest.PaymentMethodTokenA card number or any part of one.
BindAttaching orderId to the session's authorization when CheckoutCompleted arrives.PaymentAuthorization.BindOrder, Consumer.CheckoutCompletedAuthorize: the authorization exists before the order does.
Parked Fulfilment FactA shipment, cancellation, unsourceable, lost or returned fact kept until its order is bound (or its tracking number is known); escalated after 24 h, purged after 30 days.parked.Fact, parked.Kind, table parked_factsA retry queue: parked facts wait for a bind, not for a failure.
Provider Idempotency KeyThe key sent with every provider call, deterministic per (operation, authorizationId, groupNo, qualifier).usecases.KeyThe REST Idempotency-Key header, which dedupes the caller's request.
Provider HoldThe provider's side of an authorization: its id and validity.provider.Hold, providerAuthorizationIdauthorizationId, this context's own id.
Refund statesREQUESTED, SUCCEEDED, FAILED. A failed refund can be retried, at most 5 attempts in all.refund.State, refund.MaxAttemptsThe authorization states.
Authorization statesAUTHORIZED, PARTIALLY_CAPTURED, CAPTURED, RELEASED, VOIDED, EXPIRED, DECLINED. The live state is derived from the allocations.paymentauthorization.StateDECLINED is the record of a failed attempt, not a state an authorization moves into.
Outbox eventA domain event already encoded as CloudEvents and stored in the same transaction as the aggregate.outbox.Message, table outbox_eventsThe Kafka message itself, which exists only after the relay publishes it.
Inbox claimA consumed CloudEvents id recorded in the same transaction as its effect.ports.Inbox.Claim, table processed_eventsThe consumer group offset.

Neighbour terms this context uses​

TermOwnerWhere it appears here
Checkout SessioncheckoutcheckoutSessionId on the authorization and on CheckoutCompleted.
Place-Order StepcheckoutVoidAuthorization is called only after a definitive rejection of it.
Fulfillment Assignment, Shipment Grouporder-sourcinggroupNo joins an allocation to the network's group.
Tracking Numbershipping-and-trackingstored on the allocation at capture; PackageLost / PackageReturned name it.
Customer Orderthe network's order contextsorderId, a reference only.

Fleet translation​

None. Customer Payments never produces or consumes a warehouse.* topic: its topics are retailnetwork.* (Integration).