成功结帐会话后如何生成条带发票

发布于 2025-01-13 08:40:55 字数 515 浏览 6 评论 0原文

令人惊讶的是,在 与 Stripe 成功结帐会话。 在条带系统中,发票必须始终先于付款。

我不得不通过一堆 API 调用来重新创建发票,以获取 PaymentIntent 或刚刚执行以重新计算发票数据的 CheckoutSession并将其标记为已付款(甚至不确定我可以检索我需要的所有内容)

这看起来很老套...这是正确的方法还是我应该在条纹之外处理发票(也很烦人)?

Quite suprisingly, it is not possible to automatically generate an invoice after as successfull checkout session with Stripe.
An invoice must always come before a payment in the stripe system.

I am left with having to recreate the invoice through a bunch of API calls fetching the PaymentIntent or the CheckoutSession that was just performed to recompute the data for the invoice and mark it as paid (not even sure I can retrieve everything I need)

This seems quite hacky... Is this the right way to do it or shall I just handle invoicing outside of stripe (quite annoying too) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡墨 2025-01-20 08:40:55

只是想澄清一下您是否需要发票或收据,因为它们是两个不同的东西

  • 发票是您发送给客户要求付款的东西(付款前)
  • 收据是成功付款的证明(付款后)

我的理解是付款已经在成功结帐会话时收集,因此您可能希望将收据发送给客户。要启用电子邮件收据,您可以转到 设置 ->电子邮件并勾选向客户发送有关成功付款的电子邮件框。请注意,在测试模式下不会发送电子邮件。

just want clarify if you need Invoice or Receipt, because they are two different things

  • Invoice is something you send to customer to ask for payment (before payment)
  • Receipt is a proof of succeeded payment (after payment)

My understanding is that the payment is already collected upon a succeeded checkout session, so you probably want to send receipts to customers. To enable email receipts, you can go to Settings -> Emails and tick the Email customers about Successful payment box. Please note that emails won't be sent in test mode.

傾旎 2025-01-20 08:40:55

让我解释一下可用于在条纹付款后生成发票的解决方案。该解决方案基于 Zapier 连接器。
我们应该连接三个系统。

  • Stripe
  • Zapier
  • Plumsail 文档

首先,您必须设置与 Zapier 的 Stripe 连接。进入Zapier,创建一个Zap,找到Stripe连接,选择“New Payment”作为触发事件。然后,将您的 Stripe 帐户与 Zapier 连接并在 Zap 中进行测试。如果一切正常,则进入第二步。

第二。完成 Stripe 的 Zap 连接后,转到 Plumsail 文档,创建流程并为发票制作模板。

第三。设置与 Zapier 的 Plumsail Documents 连接。转到您的 Zap(您之前已在其中连接到 Stripe),找到 Plumsail Documents 操作,并将启动进程设置为操作事件。接下来,您必须选择流程并将 Stripe 付款的输出数据与 Plumsail Documents 中的发票模板进行匹配。

看起来有点复杂,所以你可以 阅读文章,其中包含此解决方案的更详细说明。此外,还有所有流程的屏幕截图。

因此,每当您在 Stripe 中收到付款时,您都会获得全自动的自定义发票生成。

Max,Plumsail 产品经理。

Let me explain a solution that you can use to generate invoices after payment in stripe. This solution is based on Zapier connectors.
There are three systems that we should connect.

  • Stripe
  • Zapier
  • Plumsail Documents

First, you have to set up a Stripe connection to Zapier. Go to Zapier, create a Zap, find the Stripe connection, and select "New Payment" as the trigger event. Then, connect your Stripe account with Zapier and make a test in Zap. If everything ok, go to the second step.

Second. After you have done the Zap connection for Stripe, go to Plumsail Documents, create the process, and make a template for your invoice.

Third. Set up a Plumsail Documents connection to Zapier. Go to your Zap (where you have made the connection to Stripe before), find the Plumsail Documents action, and set the Start Process as Action Event. Next, you have to select your process and match output data from Stripe payment with your invoice template in Plumsail Documents.

It seems a bit complicated, so you can read the article with a more detailed description of this solution. Also, there are screenshots for all processes.

As a result, you will get a fully automated custom invoice generation whenever you will get a payment in Stripe.

Max, product manager at Plumsail.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文