0

I need suggestion for paypal pro API which allow me to pass variable amount each month. For some months,it can be zero too.

I tried with UpdateRecurringPaymentsProfile but it gives me error of 11592 (Subscription profiles are not supported for recurring payments).

Please someone help me with easiest solution.

Keshav
  • 39
  • 4

1 Answers1

0

Based on the error you mentioned it sounds like you're using a PayPal Standard Subscription button, not Pro. If that's the case, then as the error says, you cannot update standard subscriptions with the APIs. You would have to use the recurring payments API to create the profile in order to then update it.

That said, you won't be able to do variable amounts with recurring payments profiles. you can only raise them by 10% every 120 days, so that typically doesn't work with what you're trying to do.

Instead, you'll need to use reference transactions. So if you're using Payments Pro that will be real simple. You just pass in the transaction ID of an original authorization or sale transaction along with a new amount you need to charge. PayPal uses the card details on file to process the new amount.

If you're using DoDirectPayment then you'll use DoReferenceTransaction for the future payments. If you're using PayFlow you would use the PayFlow API, of course, and change the parameters to match a reference transaction request.

You can also do the same thing with PayPal Express Checkout, but in that case you'll need to include billing agreement parameters in the SetExpressCheckout request, and then you'd use the billing agreement ID you get back from that in the DoReferenceTransaction request.

In any case you'll need to build your own script to run everyday, pull profiles that need to be charged, and charge them accordingly.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
  • Thank you. I tried with DoDirectPayment and DoReferenceTransaction and it worked. First I validated card with 0 amount ,DoDirectPayment as method and Authorization as a paymentaction and then used transaction id obtained via that for future payments. But now my problem is for all payments, payment status is 'Under Review'. I kept same currency still status is under review. Can you please help me with that? – Keshav Aug 01 '16 at 13:22
  • It should provide details about why it's under review..?? – Drew Angell Aug 01 '16 at 20:26