Charge Installment Payment Undone
The school undid the payment of an installment of a charge it receives: the installment open again (PENDING), with its charge and the undone payment. Published by cna-one, one message per installment of the payment. No consumer yet.
Overview
Fact: the payment that covered the installment was undone, and the installment is open again. It takes back the Charge Installment PaidCharge Installment PaidEventv1.0.0A payment now covers an installment of a charge a school receives: the installment after the payment, PAID or, on a cred...Ownercna-platformSchemaMapView docs published for the same installment and payment. The payload has the same shape: the installment right after the write, with its charge, and the undone payment.
When it is published. CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations, receivabl...PublishesGrantApplicationAccess, EmployeeCreated +19SubscribesInviteUser, FranchiseCreated +17Ownercna-platformMapRepoView docs, from undoChargePayment through chargeInstallmentPaymentUndoneProducer, after the transaction that marks the payment as undone, opens its installments again, takes each of its receipts out of its cash account on the school’s today and records the reason in the history of each charge:
- One message per installment of the payment, all in a single produce call.
statusisPENDING,expectedSettlementOnis null, andpaymentis the undone payment, withundoneAtset.- A credit card payment is undone whole: every installment it covers opens again, settled (Charge Installment SettledCharge Installment SettledEventv1.0.0The money of a credit card payment reached the school for an installment of a charge it receives: the installment PAID, ...Ownercna-platformSchemaMapView docs) or still pending settlement, and each receipt a settled one got leaves its bank account.
- Only a payment an employee registered and nobody has undone yet is undone. A payment undone by someone else in the meantime stores and publishes nothing.
The reason the employee gives stays in the history of the charge; it is not in the payload.
No consumer yet. A consumer that acted on Charge Installment PaidCharge Installment PaidEventv1.0.0A payment now covers an installment of a charge a school receives: the installment after the payment, PAID or, on a cred...Ownercna-platformSchemaMapView docs for the same payment.id decides here whether to revert what it did.
Kafka
Topic (aggregateRoot) | ChargeInstallment |
Message key (routingKey) | payload.id |
| Contract owner | ONE |
metadata.event | ChargeInstallmentPaymentUndone |
| Consumer group | (none yet) |
Payload schema
Source of truth
ChargeInstallmentPaidPayload is the type of Charge Installment PaidCharge Installment PaidEventv1.0.0A payment now covers an installment of a charge a school receives: the installment after the payment, PAID or, on a cred...Ownercna-platformSchemaMapView docs.
import { ChargeInstallmentPaidPayload } from "events/one/chargeInstallment/ChargeInstallmentPaid";
class ChargeInstallmentPaymentUndone extends Event<ChargeInstallmentPaidPayload> { public static owner = "ONE"; public static aggregateRoot = "ChargeInstallment"; public static routingKey = "id"; public static version = "1.0.0";}The class exists only in cna-one.
Custom properties
| Property | Value |
|---|---|
| Contract Ownerx-contract-owner | ONE |
| Kafka Topicx-kafka-topic | ChargeInstallment |
| Message Keyx-message-key | id |
| Sourcex-source | cna-one api/app/events/one/chargeInstallment/ChargeInstallmentPaymentUndone.ts |
Id (UUID) of the installment (financial.charge_installments). Kafka message key.
School (franchise) the installment belongs to.
Charge (financial.charges) the installment belongs to.
Code of the charge, unique per school: COB, the school code and seven hexadecimal digits, e.g. COB-SP-090-1A2B3C4.
Contract (school_ops.contracts) the charge bills, or null for a charge with no contract.
Student (school_ops.students) the charge is for, or null.
Enrollment (module) the installment is owed for. Set only when its charge bills a single item of the contract; null otherwise.
Contract line the installment is owed for. Set only when its charge bills a single item of the contract; null otherwise.
Person (common.persons) who pays the charge. For the charges of a contract, the contract holder.
Kind of revenue the installment is (cna-one RevenueType).
ENROLLMENT_FEE OTHER_FEE LEARNING_BOOK TUITION TERMINATION_SETTLEMENT AD_HOCPosition of the installment in its schedule, from 1.
How many installments the schedule has.
Day the installment is due, YYYY-MM-DD, no time zone.
Decimal as a string with two places: the amount of the installment before discounts, late fee and interest.
Status of the installment after the undoing (cna-one ChargeInstallmentStatus): always PENDING, open again.
PENDING PAID PENDING_SETTLEMENT UNDER_RENEGOTIATION CANCELLED REVERSEDAlways null in this event: the installment has no payment in force any more.
The payment that was undone. It no longer covers the installment.