If the bet is successful on the message from the web socket take a copy of the tote id for your reference
If the bet is rejected then check the bet rejection reason. If the reason is valid then fix the bet and resend. (Make sure you amend the ticket and bet id when replacing the bet). If the rejection reason is Error placing a bet with the bet provider retry the placement of the bet amending only the ticket and bet id.
If you don't recieve any data on the web socket after 60 seconds call the bet details request to check the status of the bet (check bet).