如何使用 C# 在 stripe api 上收取费用

How to charge fee on stripe api using c#

我正在使用 Stripe Api 创建客户,然后向其收费。

我想要的是在我的客户创建销售或收费时向其收费。 我希望将总金额的 7% 存入我的条纹帐户。

我在使用客户 ID 创建费用时尝试了申请费用,但它需要传递目的地,这需要商家 ID,这总是会引发错误 "No Merchant Found with provided ID"。

documentation怎么说,有两种创建费用的方法:Charging directlyCharging through the platform。 你用的是哪一个? (我可以假设自从你谈论 "destination" 以来的第二个吗?)。

他们都需要关联账户进行收费等

Charging through the platform, you need that the account is connected to the platform to be visible from the "destination" (Connecting_Account_Documentation).

如果不是这样,请更好地解释您发现的情况。


application_fee:

A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account, using the Stripe-Account header, an OAuth key, or the destination parameter. For more information, see the application fees documentation.

destination:

An account to make the charge on behalf of. If specified, the charge will be attributed to the destination account for tax reporting, and the funds from the charge will be transferred to the destination account. The ID of the resulting transfer will be returned in the transfer field of the response. See the documentation for details.