Skip to content

CAP-COM-ORD-009Purchase with a deposit and scheduled payments

Markdown

CAP-COM-ORD-009

Purchase with a deposit and scheduled payments

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1

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.

Outcomes
Payment of the required deposit accepts a plan order.Cancellation reduces the remaining collection arrangement.
Surfaces
api

Controls

27 controls apply, from the corpus control catalogue.

TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004 TC-CRY-001 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-004 TC-LOG-005 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.checkouts.updateapitenant
commerce.orders.readapitenant
commerce.orders.tenderapitenant

Business Rules

8 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
A deposit policy permits selection only from its offered installment plans, refuses plan selection under pay-now policies and clears the quote when the selection is cleared.
validationservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses a plan the order type does not offer, 400 installment_plan_not_offered naming what is offered
02must prove
Proposed
The preview presents Accounting’s quoted deposit, installments and allocation across order lines.
calculationservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers the preview with the schedule Accounting quotes: 1550 up front of 6200, three installments of 1550, each line split
03must prove
Proposed
A plan placement preserves its quote, invoices the lines’ deposit portions and accepts the order on payment of that deposit with the payment method vaulted for later installments.
lifecycleservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#accepted the order on the deposit of 1550 (what it owes now, not its total), the card sent with vault: true
04must prove
Proposed
Schedule creation follows acceptance under the order key and updates the money summary without making acceptance depend on successful creation.
lifecycleservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#created the schedule under the order’s key after the acceptance, wrote it on the order and reflected it on the mirror
05must prove
Proposed
Installment payment requires a schedule and an invoiced unpaid installment, uses the retained payment method and refuses early or repeated payment.
validationservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses an installment before Accounting invoices it, 409 installment_not_due, charging nothing
06must prove
Proposed
Cancelling a plan line credits its deposit portion and reduces future installments; cancellation of all item lines ends the schedule and returns the deposit.
calculationservicetest
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#reduced the remaining installments: the mug’s part gone from the two scheduled ones, the paid one untouched, on the history
07must prove
Proposed
The product should pass installment terms to Billing, display Billing’s quote and report cancellations there, with Billing owning scheduling, invoicing and collection.
no proof recorded yet
policyservicedocumented
08must prove
Proposed
A schedule read can retry deferred creation for an accepted order and reconcile its linked invoices and installment money with Accounting.
lifecycleserviceobserved

Scenarios

IdGivenWhenThenProvenance
01A sixty-two-dollar purchase has a deposit and three later installments.The buyer pays the fifteen-dollar-fifty-cent deposit.The order is accepted and its arrangement calls for three further payments of the same amount.test
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#accepted the order on the deposit of 1550 (what it owes now, not its total), the card sent with vault: true

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.