【问题标题】:How do I populate Stripe's description field on subscription charge?如何在订阅费用上填充 Stripe 的描述字段?
【发布时间】:2014-10-06 22:50:15
【问题描述】:

我可以使用以下代码填充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 仪表板进行编辑。

【问题讨论】:

    标签: perl stripe-payments


    【解决方案1】:

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

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

    希望对您有所帮助, 拉里

    PS 我在 Stripe 从事支持工作。

    【讨论】:

    • 谢谢拉里。现在我知道现在不可能了,我可以停止寻找:)
    • 嗨拉里,感谢您的回复。由于您在这里的教程和答案,我喜欢 Stripe。一个问题,我们还必须使用这个解决方案吗?还是 Stripe 改变了做事的方式?谢谢。
    • @Greeso:截至 2017 年 12 月,这似乎仍然是这样做的方法,因为 \Stripe\Subscription::create() 不支持任何 description 参数。
    • @FabienSnauwaert - 是的,不幸的是我也意识到了这一点 :( 我希望 Stripe 能解决这个问题
    猜你喜欢
    • 1970-01-01
    • 2018-02-02
    • 2017-12-03
    • 1970-01-01
    • 2018-11-04
    • 1970-01-01
    • 1970-01-01
    • 2018-06-21
    • 1970-01-01
    相关资源
    最近更新 更多