If you have been debited twice for a single transaction while using a your bank app one possible cause is related to IDEMPOTENCY.
Idempotency is a property of an operation that ensures that performing the same operation multiple times has the same effect as performing it once. In this video, I talk more about idempotency and how you can build better systems.