fix pay purchase api