One transaction: COMMIT or ROLLBACK
A transfer is one business action but two SQL statements. Practice accepting or cancelling a group without assuming one error always undoes everything.
BEGIN starts a transaction; COMMIT accepts its changes; ROLLBACK undoes changes since BEGIN. Run the complete script together in the lab: every run uses a fresh in-memory database. COMMIT does not save to a server or the next run.