update purchase endpoint