使用Stripe更改后,发票ID返回null [英] Invoice Id return with null after change using Stripe

查看:114
本文介绍了使用Stripe更改后,发票ID返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对特定的已订阅客户收取带发票ID为null的条带对象退货之后,您知道如何解决它吗?或如何为特定付款创建发票?我知道如何使用API​​创建发票,但找不到用于使用API​​一次性付款创建发票的方法.如果stripe不支持为此类型创建发票,为什么它们在收费后返回包含收费对象的发票ID.那是我要收取的代码:

After I charge for specific subscribed customer on stripe object return with Invoice Id null,Do you know how can I fix It ? or how can I create invoice for specific payment ? I know how to create invoice using API but I didn't find way to create invoice for one time payment using API. If stripe not support creating invoices for this type why they return Invoice Id including in charge object after charging. That's my code to charge :

       var myCharge = new ChargeCreateOptions();
        myCharge.Amount = (Int32)(amount * 100);
        myCharge.Currency = "usd";
        myCharge.ReceiptEmail = "email@domain.com";
        myCharge.Description = "Upgrade client";
        myCharge.CustomerId = customer.SubscripedClientId;
        myCharge.Capture = true;
        var chargeService = new ChargeService(stripesecretkey);
        Charge stripeCharge = chargeService.Create(myCharge);

在完成充电后,stripcharge对象包含具有空值的发票ID

after charge done stripecharge object include invoice id with null value

推荐答案

要创建一次性付款的发票,您需要先通过api创建订单项,然后创建发票.发票将收集所有未清订单项并将其附加到自身.

To create an invoice for a one-time payment, you need to first create line items through the api and then create the invoice. The invoice will collect any open line items and attach them to itself.

这篇关于使用Stripe更改后,发票ID返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆