The Universal Banking Device was a device that could connect to all the banks in the Andromeda Galaxy to each other and transfer money to whatever account it was instructed to.
Scratch of the Shoal of the Winter Harmony brought one to pay River Song for delivering the Halassi Androvar to him, hiding it inside of his own head. Once he had confirmation that River had the diamond, Scratch used the device to pay her one hundred billion credits before revealing himself to be a follower of King Hydroflax, inside whose head the diamond was located.
During the following meteor storm, the device fell into the hands of the Twelfth Doctor while he was confronting King Hydroflax's body. The Doctor told the body that he needed money to rule the galaxy and inserted the universal banking device into the body. However, as the Doctor planned, it also connected the body to all the firewalls in all of the banks it accessed and started to overload it. Ultimately, connecting the universal banking device to King Hydroflax's body resulted in the on-board computer being "deleted in a merger", allowing Ramone and Nardole to harmlessly share control of it. (TV: The Husbands of River Song)