perl - 如何填写 Stripe 订阅费用的描述字段?

标签 perl stripe-payments

我可以填充Business::Stripe一次性收费的描述字段包含以下代码:

use Business::Stripe;    # Version 0.4

# Create Customer
my $customer = $stripe->api('post', 'customers',
    card        => $stripeToken,
    description => $username,
);

# Charge
my $charge = $stripe->api('post', 'charges',
    customer    => $customer,
    currency    => $currency,
    description => 'my description here no probs',
    amount      => $amount,
);

但是,当我创建客户并将其分配到订阅计划时,我看不到如何填充每个计费周期的收费说明。

# Create Customer and subscribe to a plan
my $customer = $stripe->api('post', 'customers',
    card        => $stripeToken,
    description => 'description here is for the customer not the monthly charge',
    plan        => $plan
);

我希望能够为每个计费周期发生的费用添加说明。

API 似乎没有显示任何方法,但该字段可以通过 strie 仪表板进行编辑。

最佳答案

Stripe 正在考虑自动填充发票上的费用说明,但该功能尚不存在。同时,一旦发生 invoice. payment_succeeded 事件,您就可以从该事件数据中获取费用 ID。然后您可以通过 API 更新费用描述:

https://stripe.com/docs/api#update_charge

希望有帮助, 拉里

PS 我在 Stripe 从事支持工作。

关于perl - 如何填写 Stripe 订阅费用的描述字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26204698/

相关文章:

mysql - 在 perl 中使用 LOAD DATA INFILE 在 MYSQL 中插入值

linux - Fedora 24(64 位)Git 安装(perl-devel、ParseXs 安装)

javascript - 简单的正则表达式 : multiple dots(. )

windows - 为什么我的 Perl 程序不能在 Windows 上创建超过 4 GB 的文件?

perl - 在子进程中重定向 STDOUT

ios - 在解析中设置Stripe Cloud Module

ruby-on-rails - Stripe webhook 身份验证 - Ruby

django - Stripe 使用 django 的 webhook 说 : stripe. error.SignatureVerificationError

heroku - 为什么 Stripe 事件没有触发并且 webhook 没有接收到?

javascript - Stripe Checkout- 如何将值传递给 webhook?