Consumers
Banking listens for the following events on the following topics
Party Consumer
We really only care about the bank details and the parties uuid.
topic: "party-PartyEvent" type: PartyCreated_v1 & PartyUpdated_v1
{
:type=>"PartyCreated_v1",
:id=>SecureRandom.uuid,
:taggableParty=>{
:company=>{
:tags=>["landlord"],
:companyName=>"Mitch Again",
:tradingAs=>"",
:vatRegistered=>false,
:vatNumber=>"",
:companyRegistration=>"256033703",
:emailAddress=>"mitchagain@example.com",
:telNumber=>"3988634226",
:contactPersonFirstName=>"test",
:contactPersonLastName=>"Fredric Liane Greenholt",
:bank=>"FNB",
:branchCode=>"7174",
:accountName=>"Testing",
:accountNumber=>"123123123",
:accountType=>"Cheque",
:paymentReference=>"paymentReferencePlaceholder"
}
}
}
Payment Consumer
topic: "banking-PaymentEvents" event:
{
type: "PaymentRequest",
id: UUID,
category: "transactional",
partyId: UUID,
amount: rand(10000..500000), # cents
paymentReference: "Some ref"
}
Payment Publisher
topic: "bankingEngine-PaymentEvents" reason: Request rejected for one of several reasons. Errors displayed in an array. event:
{
type: "RequestRejected",
id: UUID,
errors: ["Bank Account does not exist"]
}
topic: "bankingEngine-PaymentEvents" description: Request was accepted, we will submit it to the bank event:
{
type: "RequestAccepted",
id: request.id
}
topic: "bankingEngine-PaymentEvents" description: Payment written to file and submitted event:
{
type: "PaymentSubmitted",
id: request.id
}
topic: "bankingEngine-PaymentEvents" description: ABSA are happy with the payment submission. event:
{
type: "PaymentAccepted",
id: request.id
}
topic: "bankingEngine-PaymentEvents" description: ABSA are not happy with the payment submission. Contains a reason and a qualifier. event:
{
type: "PaymentRejected",
id: request.id,
qualifier: qualifier,
reason: reason
}
Statement Events
The following events are emitted when a statement file is processed or a bank scrape has taken place
topic: "bankingEngine-PaymentEvents" description: ABSA have confirmed that the payment has gone through. event:
{
type: "PaymentVerified",
id: request.id
}
The below if for receipts... There is a slight difference between scraped transactions and the daily statement. also note the topic is different.
topic: "bankingEngine-StatementEvents" description: ABSA have confirmed the following receipt event:
{
type: "DetailRecordCreated",
id: detail_records_id, # UUID
identifier: identifier, # Text(unique)
accountNumber: account_number, #
isScraped: is_scraped, # BOOLEAN
transactionProcessingDate: transaction_processing_date, # STRING (YYYY-MM-DD)
transactionEffectiveDate: transaction_effective_date, # STRING (YYYY-MM-DD)
data: data # JSON
}
If the Data attribute is scraped the following will come through.
dep_id : This is the key that will contain the payment reference 12903812903. It will be prefixed though with things like "ABSA BANK"/"STD BANK"/""
{
"transaction_number_for_day"=>1,
"account_number"=>"4079323853",
"transaction_processing_date"=>"20190119",
"transaction_effective_date"=>"20190119",
"cash_deposit_fee"=>"0",
"cash_deposit_fee_sign"=>"-",
"transaction_amount_sign"=>"+",
"transaction_description"=>"CASH DEP BRANCH DEP NO : NO 13",
"dep_id"=>"CASH DEP BRANCH DEP NO : NO 13 CLAYMORE COMPLEX",
"transaction_amount"=>"1295000",
"account_balance_after_transaction"=>"22340278",
"account_balance_sign"=>"+",
"cheques_function_code"=>"CD",
"charge_levied_amount_sign"=>"+",
"charge_levied_amount"=>"0",
"event_number"=>"104183"}
If the Data attribute is not scraped the following will come through.
{
"rec_type"=>"2",
"account_number"=>"4095091361",
"statement_number"=>"79",
"page_number"=>"1",
"transaction_processing_date"=>"20190118",
"transaction_effective_date"=>"20190118",
"cheque_number"=>"0",
"transaction_reference_number"=>"0",
"transaction_amount_sign"=>"+",
"transaction_amount"=>"1000000",
"account_balance_sign"=>"+",
"account_balance_after_transaction"=>"4275485",
"transaction_description"=>"IBANK PAYMENT FROM SETTLEMENT",
"dep_id"=>"ABSA BANK 1 silver oaks mahend",
"transaction_code"=>"FN71",
"cheques_function_code"=>"BCC",
"charge_levied_amount_sign"=>"+",
"charge_levied_amount"=>"0",
"charge_type"=>"",
"stamp_duty_amount_sign"=>"+",
"stamp_duty_levied_amount"=>"0",
"cash_deposit_fee_sign"=>"+",
"cash_deposit_fee"=>"0",
"charges_accrued"=>"",
"event_number"=>"1071",
"statement_line_sequence_number"=>"10",
"vat_amount"=>"0",
"cash_portion"=>"0",
"deposit_number"=>"0",
"transaction_time"=>"0",
"filler_1"=>"",
"filler_2"=>"",
"sitename"=>"",
"category"=>"0330",
"transaction_type"=>"",
"deposit_id_description"=>"",
"pod_adjustment_amount"=>"000000000000000",
"pod_adjustment_reason"=>"",
"pod_returned_cheque_reason_code"=>"0",
"pod_returned_cheque_drawee"=>"",
"fedi_payor"=>"",
"fedi_number"=>"0",
"redirect_description"=>"",
"account_number_redirect"=>"0",
"unpaid_cheque_reason_description"=>"",
"filler_3"=>"",
"generation_number"=>"000002450",
"old_reconfocus_category1"=>"51",
"old_reconfocus_category2"=>"51",
"filler_4"=>"",
"transaction_number_for_day"=>4}