domain

Pay

Payments platform bounded context of the CNA network. Owns the PAY message contracts for the recipients that receive money on the platform and their gateway configurations, and the cna-pay service.

Domain

Overview

Pay is the bounded context of the payments platform of the CNA network (CNA Pay): the recipients that receive money on the platform (schools, the franchisor, the CNA Institute and suppliers), their subaccounts at the payment vendor, their bank accounts and their gateway configurations. It owns the contracts whose Owner is PAY and the CNA PayCNA PayServicev1.0.0Payments platform of the CNA network (recipients, their subaccounts at the payment vendor, bank accounts and gateway con...PublishesRecipientCreated, RecipientStateChanged +5Ownercna-platformMapRepoView docs service.

cna-pay is written in Go, so a contract is an events.Definition value, not a class: its Name, Owner, AggregateRoot and RoutingKey play the part of the class name and its static fields (CNA Pay (Go) in docs/modelling/02-mapping.md). Every payload of a PAY contract opens with eventId and objectVersion, and the facts reach the bus through an outbox, recorded in the transaction of the change.

Each fact goes to the master system of its object (cna-pay-docs RN-EVT-155). The One is the only client system in this delivery, and it consumes none of these contracts yet. cna-pay keeps the facts in its outbox and publishes none until its message is in this catalog (cna-pay-docs, Eventos, “Caminho dos eventos até o CNA Event Catalog”).

Contracts owned by this domain

Every message whose events.Definition has Owner: events.OwnerPay.

Resources

Resources (7)

Browse resources in this group or search by name, type, or description.
NameVersionTypeDescription
Recipient Created
v1.0.0eventThe platform recorded a new recipient: its public state at its birth, ACTIVE and neither transacting nor withdrawing while the vendor creates its subaccount. Recorded by cna-pay in its outbox in the transaction of the creation. No consumer yet.
Recipient State Changed
v1.0.0eventThe registry state of a recipient changed, such as ACTIVE to REFUSED when the vendor refuses its creation, or back to ACTIVE on a new attempt: its public state after the change, the state it left and the refused fields. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Eligibility Changed
v1.0.0eventAn answer of what a recipient may do changed, transacting or withdrawing, such as when the vendor creates its subaccount and it may transact: its public state after the change. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Verification Changed
v1.0.0eventThe verification (KYC) status of a recipient changed as the payment vendor reflects it: its public state after the change and the status it left. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Bank Account Replaced
v1.0.0eventThe vendor confirmed the change of the bank account of a recipient, and the new account became current: the public state of the recipient, the new account masked, since when it is current and the account it replaced. Recorded by cna-pay in its outbox in the transaction of the confirmation. No consumer yet.
Recipient Bank Account Replacement Refused
v1.0.0eventThe vendor refused the change of the bank account of a recipient, and the current account stays: the public state of the recipient, the refused account masked, why and which fields. Recorded by cna-pay in its outbox in the transaction of the refusal. No consumer yet.
Gateway Configuration Activated
v1.0.0eventA gateway configuration of a recipient became active, born active or activated once the vendor returned the subaccount: the configuration with its recipient, capture channel and vendor. Recorded by cna-pay in its outbox in the transaction of the activation. No consumer yet.

Messages flowing through this domain’s services

Messages for this domain

Sends messages (7)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Recipient Created
v1.0.0eventThe platform recorded a new recipient: its public state at its birth, ACTIVE and neither transacting nor withdrawing while the vendor creates its subaccount. Recorded by cna-pay in its outbox in the transaction of the creation. No consumer yet.
Recipient State Changed
v1.0.0eventThe registry state of a recipient changed, such as ACTIVE to REFUSED when the vendor refuses its creation, or back to ACTIVE on a new attempt: its public state after the change, the state it left and the refused fields. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Eligibility Changed
v1.0.0eventAn answer of what a recipient may do changed, transacting or withdrawing, such as when the vendor creates its subaccount and it may transact: its public state after the change. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Verification Changed
v1.0.0eventThe verification (KYC) status of a recipient changed as the payment vendor reflects it: its public state after the change and the status it left. Recorded by cna-pay in its outbox in the transaction of the change. No consumer yet.
Recipient Bank Account Replaced
v1.0.0eventThe vendor confirmed the change of the bank account of a recipient, and the new account became current: the public state of the recipient, the new account masked, since when it is current and the account it replaced. Recorded by cna-pay in its outbox in the transaction of the confirmation. No consumer yet.
Recipient Bank Account Replacement Refused
v1.0.0eventThe vendor refused the change of the bank account of a recipient, and the current account stays: the public state of the recipient, the refused account masked, why and which fields. Recorded by cna-pay in its outbox in the transaction of the refusal. No consumer yet.
Gateway Configuration Activated
v1.0.0eventA gateway configuration of a recipient became active, born active or activated once the vendor returned the subaccount: the configuration with its recipient, capture channel and vendor. Recorded by cna-pay in its outbox in the transaction of the activation. No consumer yet.

Receives messages (0)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
No messages found

Entities

Outside the model

The internal topic pay.internal.Subaccount carries the facts the payment gateway of cna-pay hands to its recipients domain (SubaccountStatusReported, SubaccountVerificationReported). Only cna-pay reads it, and no client system receives internal facts (cna-pay-docs RN-EVT-155), so it is intentionally not documented as a channel or messages until the catalog has a convention for internal topics.