简体   繁体   English

哪个Paypal API用于后付费订阅

[英]Which Paypal API is for postpaid subscription

Planningto use paypal in our application and here is our scenario we have subscription based application but we charge the customer at the end of the month based on usage they used so we are calculating the amount at the end of the month to particular customer and then we need to charge them from their credit card what they have saved. 计划在我们的应用程序中使用贝宝,这是我们的方案,我们有基于订阅的应用程序,但是我们会在月底根据客户使用的使用情况向客户收费,因此我们要在月底向特定客户计算金额,然后我们需要从他们的信用卡中扣除他们已保存的费用。

So there are two things we need. 因此,我们需要两件事。

  1. We need to verify their credit card when they saved in our system. 当他们保存在我们的系统中时,我们需要验证他们的信用卡。
  2. We need to charge them every month end based on their usage so amount is not fixed. 我们需要根据使用情况在每个月底向他们收取费用,因此金额不固定。 So we are planing to run some service that run and calculate amount our end and then one by one each customer charged. 因此,我们计划运行一些服务,该服务运行并计算我们的最终费用,然后逐一向每个客户收取费用。

So which method is best to achieve this with paypal? 那么哪种方法最适合使用贝宝呢?

What you need is essentially a "reference transaction" but there are many terms that get thrown around for that now. 本质上您需要的是“参考交易”,但是现在有很多术语被扔掉了。

Are you wanting to do this with PayPal Checkout, or are you wanting to do this with PayPal Pro / Braintree credit card processing? 您是否要通过PayPal Checkout进行此操作,还是要通过PayPal Pro / Braintree信用卡处理进行此操作? Or both? 或两者?

If you're using PayPal Pro or Braintree, you can run an Authorization (card verification) and then save this authorization ID in your system for that user. 如果您使用的是PayPal Pro或Braintree,则可以运行授权(卡验证),然后将该用户的授权ID保存在系统中。 When you're ready to process the payment, you would then trigger the API by passing in the reference ID along with the amount you need to charge. 当您准备好处理付款时,您将通过传入参考ID以及您需要收取的金额来触发API。

Depending on exactly which product you're working with (PayPal Checkout, PayPal Pro, Braintree, etc.) they will call it different things, but technically it's all the same. 根据您所使用的产品(PayPal Checkout,PayPal Pro,Braintree等)的不同,它们会称其为不同的东西,但从技术上讲,它们都是相同的。

Billing Agreement, Reference Transaction, Token Payment, Vaulted Payment...these are all terms for the same thing, but again, depending on exactly which product you're working with you may see it differently. 帐单协议,参考交易,令牌支付,保险柜付款...这些都是同一事物的术语,但是同样,具体取决于您使用的是哪种产品,您可能会看到不同的含义。

For PayPal Checkout REST APIs you'll use Billing Agreements. 对于PayPal Checkout REST API,您将使用“计费协议”。 This will give you a "Billing Agreement ID" that you'll save, and then you can use that to process payments in the future. 这将为您提供一个“账单协议ID”,您将保存该ID,然后可以在以后使用该ID来处理付款。 You will need special approval for this. 您将需要为此特别批准。

If you do this with PayPal Pro or Braintree, though, there is no special approval required. 但是,如果您使用PayPal Pro或Braintree进行此操作,则无需特殊批准。 It just comes as a feature included with direct credit card processing. 它只是直接信用卡处理中的一项功能。

That's a pretty broad answer to a bit of a broad question. 这是对一个广泛问题的一个相当广泛的答案。 Hopefully it helps. 希望它会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM