Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Paypal offer Automatic Billing Buttons which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that it can be automated as opposed to done manually via the paypal account.

Is it possible? Can someone point me to a sample/reference?

share|improve this question

4 Answers 4

up vote 1 down vote accepted

Take a look at PayPal Reference Transactions. It appears it does exactly what "Automatic Billing" does (i.e. automated regular billing for different amounts), but you can do it all through API's.

share|improve this answer
    
That is very interesting! Looks like they may have changed things days after I asked the question! Thanks! –  Dale Burrell Aug 7 '12 at 9:17

This is the API documentation for creating recurring payments

Another useful page is here on handling recurring payments.

share|improve this answer
    
Yip - seen those - but unless I'm missing something they don't allow the billing amount to be changed each month, well they do but only within a percentage range over 4 months or something. Whereas I need to be able to bill a completely different amount each month, or rather I need to be able to bill a base fixed amount each month and then add variable items to that during the month, which the automatic billing buttons allow, but I can't see how to do it (or if one can do it) using the API. –  Dale Burrell Mar 23 '12 at 10:05
    
Recurring fees aren't meant to be changed. If anything you want add a line item to the bill in on top of the monthly fee. You should look into chargify.com it does exactly what you want it's a recurring billing service read up on their site all the features. –  Anagio Mar 23 '12 at 14:13
    
Indeed, you are right, but Paypal does offer that through the buttons I linked to in my question, and my question is whether this is possible via the API. –  Dale Burrell Mar 23 '12 at 21:19

Paypal have confirmed that this is not possible via the API :(

share|improve this answer
    
Do you have an actual documentation link pointing this out, by any chance(eg. in case the situation changes later) or is it just something they told you in response to a direct inquiry? –  Su' Mar 25 '12 at 9:53
    
They told me in response to a direct inquiry. –  Dale Burrell Mar 25 '12 at 10:06

Doing it with the API is pretty much the same as doing it through a button. By default, PayPal is going to bill the same amount. This is the most common type of recurring payment, and also PayPal only has the fixed amount specified during the creation of the recurring payment.

PayPal can be very convenient, but it's not magic. If you want to bill a different amount this month from the previous, you need to tell PayPal what you want the new amount to be. You can do this either manually through the admin panel, but you can also do it via the API. But you still need to tell PayPal what to change the amount to.

So use the API call that Anagio linked to to create the recurring payment profile (after you've created the billing agreement), and then when you need to alter the billing amount, use the UpdateRecurringPaymentsProfile API to set the new amount.

share|improve this answer
    
That doesn't do what I need - see my comment on Anagio's answer. –  Dale Burrell Mar 25 '12 at 19:36
    
@Dale Burrell: I don't see what functionality this is missing from manually created buttons. In fact, to PayPal there's literally no difference between a recurring payment created via a button versus the API. You can manually edit a recurring payment that was created via API, just as you can use the API to edit a recurring payment that was created manually. –  Lèse majesté Mar 26 '12 at 9:21
    
I'm specifically talking about the billing buttons which allow you to change the amount to anything you like each month i.e. no percentage limit to the change like through the API. The billing buttons are designed for cases where you might charge a monthly subscription and then add line item changes for overuseage as an example. Which is exactly what I need to do. However when using the buttons you have to manually login to your account and bill the customer. As I have answered I asked Paypal about this and they confirmed it is not possible. Thanks for your input - I do appreciate it. –  Dale Burrell Mar 26 '12 at 10:30
    
@Dale: Ah, I missed that part. However, the documentation states that the 120% per 180 days maximum is only a limitation of recurring profiles created via Express Checkout buttons. So if you were to use Website Payments Pro to create the billing profile via API (as per Anagio's answer), then there should be no such restriction. –  Lèse majesté Mar 26 '12 at 13:37
    
Also, are you absolutely sure that the 120% limit doesn't apply when you try to change an Express Checkout created recurring profile manually through the admin panel? It seems odd that they'd arbitrarily restrict API usage like that. IMO, it makes much more sense that this is simply a limitation of Express Checkout, regardless of whether you try to change the billing amount via the admin panel or via the API. In any case, you could always circumvent the whole thing by programming your store/billing system to handle the recurring billing via a monthly direct payment. –  Lèse majesté Mar 26 '12 at 13:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.