You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过API修改Stripe账户的订阅邮件通知设置?

用Stripe API管理订阅邮件通知设置

要修改「发送即将续费通知邮件」「发送银行卡过期通知邮件」这类开关,直接调用Stripe的Account Update API即可,无需Webhooks。

对应字段映射

这些邮件通知的开关都在Account对象的settings.billing节点下:

  • 「发送即将续费通知邮件」:settings.billing.upcoming_invoice_notification.enabled
  • 「发送银行卡过期通知邮件」:settings.billing.payment_method_expiring_notification.enabled

API请求示例

cURL 调用示例

curl https://api.stripe.com/v1/account \
  -u sk_test_your_secret_key: \
  -d "settings[billing][upcoming_invoice_notification][enabled]"=true \
  -d "settings[billing][payment_method_expiring_notification][enabled]"=false
  • 将字段值设为true开启通知,false关闭通知
  • 支持一次请求同时修改多个通知开关

验证修改结果

调用Retrieve Account API查看更新后的设置:

curl https://api.stripe.com/v1/account \
  -u sk_test_your_secret_key:

在返回的JSON中找到settings.billing节点,确认对应字段的enabled值是否符合预期。

内容的提问来源于stack exchange,提问作者Maryna Serhiichuk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 21:53:16