我可以填充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/