加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl – 如何在订阅费用中填充Stripe的描述字段?

发布时间:2020-12-16 06:26:29 所属栏目:大数据 来源:网络整理
导读:我可以使用以下代码填充 Business::Stripe 的描述字段以获得一次性费用: use Business::Stripe; # Version 0.4# Create Customermy $customer = $stripe-api('post','customers',card = $stripeToken,description = $username,);# Chargemy $charge = $stri
我可以使用以下代码填充 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',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的支持工作.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读