如何使用Stripe API调用删除价格对象
我正在尝试使用API调用删除产品,但会出现一个错误。 “由于具有一个或多个用户创建的价格,因此无法删除该产品。” 我检查了Stripe文档,但没有删除价格的API。
I am trying to delete a product using API call but it throws an error saying
"This product cannot be deleted because it has one or more user-created prices."
I checked in stripe documentation but there is no API for deleting the Price.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您不要删除产品和价格对象;取而代之的是,通过将它们标记为不活动来存档。如果您不想再次使用价格或产品,则可以通过将主动设置为False来做到这一点。
参考: https://pupuweb.com/solved-fix-stripe-payment-dev-error-delete-delete-price/
I recommend that you do not delete product and price objects; instead, archive them by marking them as inactive. You can do this by setting active to false on the Price or Product if you don't want to use them again.
Reference: https://pupuweb.com/solved-fix-stripe-payment-dev-error-delete-price/