Implement error codes for purchase flow errors

Problem

When errors are matched using strings, they are quite fragile to changes in the backend and string mismatches. An example of this is when the {"email": ["has already been taken"]} error was translated to the description here with a different character, leaving the error handled sub-optimally.

Proposal

Implemented error codes for each of the purchase errors as discussed here and here.

Edited by Michael Lunøe