adding purchase endpoint