Paypal recurring payments with variable amount
Asked Answered
F

1

9

First, notice I have read many post regarding this topic, but the info provided is not enough for me or is not accurate.

I´m developing a website with AngularJS and Ruby on Rails that offers different services. Users can subscribe to these services (one or many) and they get a Paypal Recurring Payment (through a profile) to pay these services (using merchant API). For a fixed amount the service is working ok for me.

The problem is, the amount can be different from one period to another, depending on the number of services the user is subscribed.

I have read Paypal docs, but It´s still not clear to me what is the right approach.

My approaches are:

  1. Once a user subscribes a new service, I can remove the existing recurring payment profile (with fixed amount) and create a new one. This would be ok, but I have read I can´t delete a profile automatically from my application. I can only create. In order to delete an existing profile, I have to do it manually, by login in my business paypal account and delete it. If true, then this is not a solution for me, because I can´t do all flow automatically. However, this is quite strange for me. Is this true? If not, could you please let me know how to do it?

  2. Although, I have not read deep on it, I read on a post I can use Reference transactions to implement this. Is this right?

UPDATE https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/#recurringreftxns

As far as I understood, Reference transactions let me vary the amount to get from the buyer when I run it, but the problem is that this operation does not executes recurring (managed by Paypal). I should keep the logic in order to execute it from my application. Right?

Any other approach or clarification is welcome.

UPDATE My first approach is to create just one variable recurring payment with the amount of all services subscribed. But, maybe the solution is to create a recurring payment profile per each service?

Filiano answered 10/2, 2014 at 18:49 Comment(0)
O
7

1) This is true if you're using Standard Subscription buttons, but if you're working with the Recurring Payments API you can cancel the profile using ManageRecurringPaymentsProfileStatus.

2) Yes, with reference transactions you can charge any amount you need to at any time, but it would be left up to you to build your own recurring payments system, basically, utilizing reference transactions. You could have a script run each day that goes through all your accounts and processes due payments accordingly.

Another option would be to have your users create a Preapproval profile and then use the Pay API to process payments using the preapproval keys. This is very similar to reference transactions.

Overshine answered 11/2, 2014 at 4:46 Comment(5)
Thank you so much. Regarding 1) I didn´t realized about this ManageRecurringPaymentsProfileStatus. Now, I think I can cancel old profiles and create new ones. I´m developing in Rails but I don´t see any working example in Paypal doc. Do you know where to find one? Regarding 2) Got the point but I´d rather Paypal manage this for me so far. Regarding 3) What do you think about my latest update? I mean, what if I create a profile per service subscription with the price of that service?Filiano
Definitely another viable option. Just a matter of how you think your customers will like managing multiple subscriptions.Overshine
Well, I will take it into account, although I think removing the old profile and create a new one with the new amount is my favourite. Do you know where can I find a working example of ManageRecurringPaymentsProfileStatus for Rails?Filiano
Not specifically, but it looks like this is a simple way to make HTTP requests using Rails, so then it's just a matter of generating an NVP string, posting it to PayPal, and parsing the NVP response you get back.Overshine
Hi, my problem is not finally fixed. could you please have a look at #21727958Filiano

© 2022 - 2024 — McMap. All rights reserved.