checkout code prototype