Yan Kang
Yan Kang

Reputation: 1

automatically charge a invoice by using a stored credit card by using PayPal

We use PayPal as the payment gateway of our business. Our scenario is simple: We want to create a invoice for a customer on monthly basis. The invoice contains a punch of services (and their fees) we offered to a customer. We want to charge the invoice automatically by using customer's stored credit card or Paypal account without customer's confirm. The PayPal allow us to make a payment automatically by using stored credit cards. But I didn't find any RESTful API PayPal provided us with that allow us to charge the invoice automatically.

One possible solution is that: we charge the invoice as a regular payment by using PayPal create a payment API and then mark the invoice as payed.

Do any of you know whether PayPal provide such functionality that allow us to charge a invoice automatically or any better solution to work around this.

Another not quite related question is: It seems that Paypal mandatorily requires user's permission if we want to charge a user with his/her PayPal account (rather than credit card). Is this true?

Upvotes: 0

Views: 167

Answers (1)

Drew Angell
Drew Angell

Reputation: 26056

You might want to look into Reference Transactions. They work with Express Checkout or Payments Pro, and you basically just use DoReferenceTransaction to process future payments using data that PayPal has stored in their system. You just pass in the transaction ID of a previous authorization or sale transaction, along with a new amount to process, and it processes it right there without any further approval.

When doing it through Express Checkout you have to make sure to include the billing agreement parameters in the SetExpressCheckout request, and you also need to get Reference Transactions enabled on the PayPal account for use with Express Checkout. It's free, but it needs to be approved and enabled.

With Payments Pro you get it included and you don't have to worry about billing agreements or anything like that. So you could have people run a $1.00 authorization that you immediately void, for example, and then you could use that authorization transaction ID with DoReferenceTransaction to process payments in the future.

Upvotes: 0

Related Questions