Skip to content

CAP-MBR-MEM-010Undo a purchase or respond to a payment problem

Markdown

CAP-MBR-MEM-010

Undo a purchase or respond to a payment problem

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationPartially observed

KindCapabilityProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

Read atservices-membership 5994c270react-console baf6dae3

The Formal Contract

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

Outcomes
A cancelled purchase leaves no trace of membership it never delivered.A started term cancelled after payment ends on a clear date with the program's refund policy applied.A reversed payment withholds rights until it is resolved, without lifting any staff suspension.
Surfaces
api
Intent sources
services-membership:README.md#2026-10-18 — Final acceptanceservices-membership:docs/migrations/participant/README.md

Controls

38 controls apply, from the corpus control catalogue.

TC-AVL-002 TC-AVL-003 TC-AVL-004 TC-AZ-001 TC-AZ-003 TC-AZ-004 TC-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-DAT-007 TC-IAM-006 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-005 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 TC-SEC-001 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Preparing a cancellation says what cancelling the line would do to the membership and what fraction the program's policy makes refundable, and writes nothing.
policyservicetest
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#allows the cancellation of the pending term, the whole line refundable
02must prove
Confirmed
Cancelling a line cancels a pending term and closes its claim, cancels a committed term that has not started by the effective date, terminates a started term the day before the effective date, and is denied for a term already closed.
lifecycleservicetest
03must prove
Confirmed
The refundable fraction is everything before the term starts; once it has started, the unused days or unused whole months under the program's prorated policy, or nothing under no refund; and nothing after the term ended or for a term that never ends.
calculationservicetest
04must prove
Confirmed
A member may cancel their own purchase while its term has not started; once it has started, the cancellation needs staff approval.
permissionservicetest
05must prove
Confirmed
While a cancellation is pending the membership is fenced, so a competing purchase is refused, and the fence clears when the cancellation completes.
invariantservice, databasetest
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#fences the membership in TX-K, refusing a competing purchase meanwhile
06must prove
Confirmed
A cancellation is performed once per cancellation obligation; a redelivery answers the same records.
invariantservice, databasetest
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#answers a redelivered cancel obligation with the same records
07must prove
Confirmed
Voiding an unfulfilled order deletes the pending term and the membership the reservation created, when nothing else holds it, so a first purchase leaves nothing behind.
lifecycledatabasetest
services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#releases a voided order: the pending term and the membership the claim created are deleted
08must prove
Confirmed
Voiding an order whose line was already fulfilled keeps the membership and tells Commerce the reservation was not released because it was committed.
no proof recorded yet
policydatabaseunknown
09must prove
Confirmed
A reversed payment or an opened dispute suspends the membership and its children, once however often it is delivered; its resolution restores the membership unless another Commerce suspension still stands, and a staff suspension is never lifted by Commerce.
policyservicetest
services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#suspends on a reversed payment, idempotently, and restores on resolution
10must prove
Confirmed
A cancelled or terminated term's chapters end with it, its granted terms follow it, and the change is recorded with the order.
lifecycleservicetest
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#terminates the term the day before the effective date, ends its chapter, clears the fence
11
Confirmed
A status reason whose identifier matches the cancellation's reason code is recorded as the term's closing reason.
policyservicedocumented

Scenarios

IdGivenWhenThenProvenance
01An active Regular member's term started three months ago under a prorated-months refund policy.Staff cancel the line effective today.The term ends yesterday with its chapter, the unused whole months are refundable, and a competing purchase was refused meanwhile.test
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#plans the termination with the program’s prorated fraction
02A card payment is reversed and then disputed.Commerce enforces twice and later restores the first.The member is suspended once and restored only when no Commerce suspension stands.test

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.