如何使用Stripe API调用删除价格对象

发布于 2025-02-09 02:39:22 字数 109 浏览 0 评论 0原文

我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荒人说梦 2025-02-16 02:39:23

我建议您不要删除产品和价格对象;取而代之的是,通过将它们标记为不活动来存档。如果您不想再次使用价格或产品,则可以通过将主动设置为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.

set product.active to false

Reference: https://pupuweb.com/solved-fix-stripe-payment-dev-error-delete-price/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文