cashpoint socket.io connection for inbound payments

Cashpoint client is listening on socket connection for successful transaction notification

Connection URL

Implementation

The cashier client should connect using this URL e.g: const socket = io(http://service1.vpay.africa);

Send Message

Msg

Key: ACCOUNT_NUMBER

body: { accountnumber: “46000000000” }

Implementation

Then whenever the cashier is logged in, a socket event should be emitted using this key “ACCOUNT_NUMBER” e.g: socket.emit(“ACCOUNT_NUMBER”, JSON.Stringify({ accountnumber: “4600000000”}));

Receive Message

Msg

Key: FUNDING_SUCCESSFUL Body: { amount: 100, originator_account_name: “AZUBUIKE CHIJINDU OKECHUKWU”, originator_account_number: “2059122199”, cashier_nuban: 46000000000, originator_bank: 000004, timestamp: '2021-09-15T15:43:23.700Z' }

Implementation

The cashier client should now be listening to any payment notification emission on key “FUNDING_SUCCESSFUL”. e.g: socket.on(“FUNDING_SUCCESSFUL”, (data) => {JSON.parse(data); });

Last updated