Re: How to apply discount code or coupon on recurring amount of subscription plan

metadesign2017
Contributor
Contributor

Yes I have setup a subscription using a billing plan then billing agreement on that plan. after creation of billing plan I want to use discount in %(percent) on billing agreemnet of that plan, so that i can overide the amount of billing plan for specific user at the time of billing agreement.

Thanks for your reply.

Login to Me Too
2 REPLIES 2

angelleye
Advisor
Advisor

Ya know, this looks like another area where the Classic API (NVP/SOAP) still has functionality that REST does not have.  

 

With the Classic API you can create a "Billing Agreement" that is open ended.  It's just an agreement that the payer creates with you that allows you to then process payments on their behalf for any amount at any time.  To do this you would use the DoReferenceTransaction API with the Billing Agreement ID included.  Using this method you could basically build your own recurring/subscription system, and you would have the freedom to charge whatever you need to whenever you need to.

 

With REST, though, they've got "Billing Plans" tied to "Billing Agreements" in a way that requires you to specify a pay period, amount, etc.  I do not see any way to setup a billing agreement in the way that Classic allows, and I don't see how to do reference transactions at all.  I'm still digging around here, and I've reached out to my direct tech support rep to see if I can clarification on this.  

 

This may be another thing that simply isn't available in REST yet, and you could go ahead and use Classic to get it done.  They are labeling the Classic APIs as deprecated, but they really aren't.  I still use them heavily myself, specifically for this reason and a few others.  For example, Classic Express Checkout allows you to force the Guest Checkout (credit card payment) experience, and REST does not provide that yet either.  

 

I'll update you if I'm able to get info about how to get this done in REST, but again, another option would be to simply use Classic.  Those APIs are so heavily used (and again, still have some features REST simply doesn't have) that they will not be going away any time soon.  

 

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

angelleye
Advisor
Advisor
May have just found something here. I don't have time to study it myself right this moment, but wanted to update that this might work for you: https://developer.paypal.com/docs/limited-release/reference-transactions/
Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.