Skip to content

JNY-COM-ORD-004A void releases an unfinished purchase

Markdown

JNY-COM-ORD-004

A void releases an unfinished purchase

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindJourneyProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1End-to-endOptional

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Goal
Clear a purchase before acceptance and release its inventory, promotion usage and any partial payment.
Screens
/console/{tenantId}/orders/{orderId}/console/{tenantId}/orders

Steps

#SurfaceActionCapabilityExpectedProvenance
1placeCheckoutPlace the duplicate phone purchase containing two mugs and a single-use promotion, then leave it unpaid.CAP-COM-ORD-005The placed purchase holds the inventory units and consumes the promotion use.test
services-commerce:modules/checkout/tests/e2e/holds-and-claims.e2e.spec.js#places one order with four lines, each purchase freezing its claims: the converted hold, the capacity claim, none, the lease
2/console/{tenantId}/orders/{orderId}Choose Void Order and enter Duplicate as the reason.CAP-COM-ORD-008The purchase becomes voided and its history records the intervention reason.test
services-commerce:modules/checkout/tests/e2e/order-void.e2e.spec.js#answers 200 with the order voided, carrying the reason, its lines and the history
3voidOrderAllow the void work to release the purchase’s resources.CAP-COM-ORD-008The mugs become available, the promotion use is released and the pro forma is removed.test
services-commerce:modules/checkout/tests/e2e/order-void.e2e.spec.js#released the participant’s claim, the ledger and the obligations
4/console/{tenantId}/ordersInspect the purchase in the Orders table.CAP-COM-ORD-010It appears voided with no balance and does not count as unpaid.test
react-console:components/commerce/orders/__tests__/orders-list-screen.test.tsx#marks a voided order's balance as none rather than zero

Alternate and Failure Paths

PathFrom stepConditionPath takenOutcomeProvenance
alternate2Staff leave the purchase unattendedThe minute sweep clears it at the end of its tender windowThe system records the void and performs the releasetest
services-commerce:modules/orders/tests/integration/services/orders/tender-window-sweeper.integration.spec.js#voided each in its own tenant: the reason tender_window_expired, the reservation released, the obligation cancelled, the history told by the system
alternate2The purchase has partial card and store-credit fundingRefund the card leg before crediting the invoice and restoring store creditThe funding is returned through its original paths without repetitiontest
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#ran the plan through the adjustment worker: the card leg refunded under the void’s key, then the memo of the sale invoice
failure2A caller tries to void an already voided purchaseReject the repeated void requestThe purchase remains voidedtest
services-commerce:modules/checkout/tests/e2e/order-void.e2e.spec.js#refuses a second void, 409 order_not_voidable, and a read answers the order voided

Assertions

IdStatementProvenance
01Released inventory units and promotion usage are available to a subsequent buyer.test
02Accounting no longer retains the voided purchase’s pro forma invoice.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#deletes the pro forma in Accounting and records it on the history
03The refund plan returns each partial payment once.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#refunds nothing twice: a second void is 409, a re-run of the plan sends nothing and a replayed request answers the same plan

End-to-end policy: optional: API evidence proves release and financial reversal; the console component tests cover the reason required by the void dialog.

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.