相关疑难解决方法(0)

条纹 - 定期付款中包含的附加发票项目

我在订阅时添加发票项目时遇到问题,目前正在敲打我的头.

我在条纹上创建了一个发票项目,我希望发票项目包含在定期付款中

这是我的代码,它在第一张发票上添加了发票项目,但在下一张发票上没有.

$new_customer = Stripe_Customer::create(array(
    'card' => $card,
    'email' => $email,)
);
Stripe_InvoiceItem::create(array(
    'customer' => $new_customer['id'],
    'amount' => $additiona_charges,
    'currency' => 'gbp',
    'description' => 'Addtional Cities'
));
$new_customer->updateSubscription(array('plan' => $selected_plan, 'prorate' => true));
Run Code Online (Sandbox Code Playgroud)

在我目前的设置.我根据订阅时的客户选择收取额外的自定义费用,这样我需要在定期付款时添加额外费用.

它是这样的

计划

1 Cookie - 99GBP  / Per month
2 Cookies - 199GBP / Per month
3 Cookies - 300GBP / Per month
Run Code Online (Sandbox Code Playgroud)

附加费用 - 发票项目

-With Candle - +20GBP // must be included on recurring payment.
-With Icecream - +26GBP // must be included …
Run Code Online (Sandbox Code Playgroud)

webhooks stripe-payments

10
推荐指数
1
解决办法
5142
查看次数

在 Stripe 外部开具发票时,使用什么 Stripe Webhook 来捕获订阅续订?

我直接在 Stripe 仪表板中创建了客户和订阅,因为客户在 Stripe 之外通过支票+发票付款。

Stripe 每月都会发送 Webhooks,与普通信用卡订阅类似,特别是发票 Webhook ( invoice.updatedinvoice.finalizedinvoice.sent) 以及customer.subscription.updated.

我的应用程序查找以下网络钩子来连接计费事件/实际升级客户帐户:

customer.created
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
charge.succeeded
Run Code Online (Sandbox Code Playgroud)

charge.succeeded一直是我首选的网络挂钩,用于提醒我的应用程序更新客户的帐户(例如提供每月福利)。我的问题是,在开具发票时,实际上将发票标记为“已付款”会比发票生成和帐户应该续订的时间滞后 7-14 天,所以我不能使用 a 作为 的invoice.paid等价物charge.succeeded

我正在尝试找出在支票客户付款的订阅续订中发送的 Webhook。customer.subscription.updated确实会在订阅续订时发生,但这可能会在计划更改时触发。同样的事情invoice.sent也可能在计划改变时发生。

是否有专门针对“该客户的订阅刚刚续订,无论他们是否已经付款”的网络钩子?

webhooks stripe-payments

4
推荐指数
1
解决办法
1841
查看次数

标签 统计

stripe-payments ×2

webhooks ×2