So I've implemented PayPal fully into my system. The system works on user 'packages', all at set prices. Each user has a subscr_id (set by PayPal) assigned to them, along with details of the package they've bought.
I need to be able to modify the subscription so the user can select a different package. Essentially I just need to be able to change the amount and the 'custom' field (this contains package details, coupons used, etc).
I would have thought, and hoped, that it would be as simple as showing the user another form with hidden fields for 'modify', 'subscr_id', 'custom' (new value) and 'amount' (new value). Unfortunately I can't find this anywhere online, and PayPal's documentation is so monolithic that I find myself going round in circles for hours at a time.
My IPN is all set up and working fine, I literally just need to build a form that allows me to set the 'amount' and 'custom' variables to something new... the bit I thought would be easy! Any help is greatly appreciated. Thanks in advance.
I've been looking into this recently. You can create a "Modify Subscription" button to change subscription details such as amount and period. When the user clicks this button, they login and see the old subscription details and the new subscription details, and must approve/save it for it to take effect. One major issue though is you can only increase the subscription amount by 20% within a 10-day period.
To create the modify subscription button just use the regular subscription HTML button with the new parameters you want, and add an extra parameter "modify=2" (2=modify only, 1=modify or sign up).
Also I think that the custom variable field does not change even if you modify the subscription, but I am not 100% sure on that.
After a wee bit of searching, hopefully this will help:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_subscribe_buttons#id09A7G0502UI
If you became a PayPal Merchant after October 15, 2009, you can edit a buyer’s subscription profile.
As a subscription service provider, you can edit a buyer’s subscription profile in the Edit Profile page. Use this page to update buyer information, adjust the cost or cycles of the subscription, and specify how to handle missing or failed payments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With