Skip to main content

WebSocket

Receives real-time payment updates.

ATLOS uses SignalR WebSocket interface to update the client on the payment status. When the payment status becomes success, it also transmits the transaction hash.

Usage​

To start receiving payment updates, call:

await connection.invoke('SubscribeToPayment', paymentId);

To process updates:

connection.on('PaymentUpdate', (payment) => {
// Process payment data here
});

Error handling:

connection.on('SocketError', (error) => {
// Handle error here
});

Output​

The payment fields and status values are the same as in Payment/Get.