I am looking for a reusable solution for a problem where some actions performed by a user may need further confirmation from the user before completion.
I am developing an app using React frontend and WebAPI backend.
Lets say user is initiating fund transfer and assume we cannot check the available fund in his/her account client side before initiating the transfer. When user submits the request (via HTTP POST), the request should complete as normal if the user's account has enough fund whereas if the fund is not enough and the user is within overdraft limits then user should be prompted to use overdraft and only when the user confirms to use overdraft the request should complete.
Another scenario is, say user wants to delete one of the payee account (via HTTP DELETE). Delete should finish normal when there is no recurring payment setup to payee account. User should be prompted further when there is a recurring payment setup (checking the recurring account can only be done on server side and it will be done only when needed (so doing this in advance and feeding to client side is not an option).
I am sure this is a common scenario in any application but can't find reasonable solution to this problem in the internet.
thanks in advance