{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/277","labels_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/277/comments","events_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/277/events","html_url":"https://github.com/paypal/PayPal-PHP-SDK/issues/277","id":65026958,"number":277,"title":"Can I set up a billing plan and agreement for variable monthly payments?","user":{"login":"RedLikeTheColor","id":11568768,"avatar_url":"https://avatars.githubusercontent.com/u/11568768?v=3","gravatar_id":"","url":"https://api.github.com/users/RedLikeTheColor","html_url":"https://github.com/RedLikeTheColor","followers_url":"https://api.github.com/users/RedLikeTheColor/followers","following_url":"https://api.github.com/users/RedLikeTheColor/following{/other_user}","gists_url":"https://api.github.com/users/RedLikeTheColor/gists{/gist_id}","starred_url":"https://api.github.com/users/RedLikeTheColor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedLikeTheColor/subscriptions","organizations_url":"https://api.github.com/users/RedLikeTheColor/orgs","repos_url":"https://api.github.com/users/RedLikeTheColor/repos","events_url":"https://api.github.com/users/RedLikeTheColor/events{/privacy}","received_events_url":"https://api.github.com/users/RedLikeTheColor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/labels/api-subscription","name":"api-subscription","color":"207de5"},{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/labels/question","name":"question","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-29T05:34:13Z","updated_at":"2015-03-31T06:36:36Z","closed_at":null,"body":"And if so, how? Also, how can I salvage our current implementation? The SDK and REST API documentation has been sparse and occasionally misleading.\r\n\r\nOur use case is a subscription service where users pay monthly for content updates that happened during the month to content types they've selected. One user might pledge $1 per main content update (up to 9 per month), and another might pledge $3 per main content and secondary content (up to 9 + 5 per month).\r\n\r\nOur current implementation is to create a billing plan and billing agreement for each subscriber, setting the monthly value in the payment details to their pledge value times the total potential updates in a month. The plan was to then, at the end of the month, lower their monthly total according to the number of updates that actually occurred, before billing them the appropriate amount.\r\n\r\nHowever, I've just realized in testing this process that Agreement->setBalance() is intended to affect delinquent / unpaid balances (and then only to lower / forgive that balance), and Agreement->billBalance() is for billing that same unpaid amount. Unfortunately, our implementation is already live with a number of subscribers set to be billed on April 1, at which point there will only be 4 updates worth of content since our March 22 launch.\r\n\r\nI've notice the merchant web interface has the ability to modify a subscriber's monthly total, but I've been unable to find a way to do so through the API, and I've gotten into some rather esoteric PatchRequest attempts at this point, all of which seem to consider any non \"/\" path invalid, and any partial JSON object a mismatch.\r\n\r\nIncidentally, I was only able to figure out my misunderstanding when my googling turned up the Classic API documentation here: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECRecurringPayments . The REST API documentation is severely lacking in this level of terminology explanation."},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/comments/87962229","html_url":"https://github.com/paypal/PayPal-PHP-SDK/issues/277#issuecomment-87962229","issue_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/277","id":87962229,"user":{"login":"RedLikeTheColor","id":11568768,"avatar_url":"https://avatars.githubusercontent.com/u/11568768?v=3","gravatar_id":"","url":"https://api.github.com/users/RedLikeTheColor","html_url":"https://github.com/RedLikeTheColor","followers_url":"https://api.github.com/users/RedLikeTheColor/followers","following_url":"https://api.github.com/users/RedLikeTheColor/following{/other_user}","gists_url":"https://api.github.com/users/RedLikeTheColor/gists{/gist_id}","starred_url":"https://api.github.com/users/RedLikeTheColor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedLikeTheColor/subscriptions","organizations_url":"https://api.github.com/users/RedLikeTheColor/orgs","repos_url":"https://api.github.com/users/RedLikeTheColor/repos","events_url":"https://api.github.com/users/RedLikeTheColor/events{/privacy}","received_events_url":"https://api.github.com/users/RedLikeTheColor/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T06:36:36Z","updated_at":"2015-03-31T06:36:36Z","body":"Thanks @jaypatel512 . I'll try to test some refund transactions and see if I can make that work. I really need to figure something out today or we're manually editing over 200 payment profiles and then I'm having to learn Classic API.\r\n\r\nYou might be interested that I've cross-posted this question to Stack Exchange: http://stackoverflow.com/questions/29349096/can-i-set-variable-monthly-payment-amounts-through-paypal-rest-apis-billing-pla"}}