backend and tests for internal card provider