{"action":"created","issue":{"url":"https://api.github.com/repos/peterkeen/payola/issues/148","labels_url":"https://api.github.com/repos/peterkeen/payola/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/peterkeen/payola/issues/148/comments","events_url":"https://api.github.com/repos/peterkeen/payola/issues/148/events","html_url":"https://github.com/peterkeen/payola/pull/148","id":96456335,"number":148,"title":"Rs/create coupon with stripe","user":{"login":"rschooley","id":473595,"avatar_url":"https://avatars.githubusercontent.com/u/473595?v=3","gravatar_id":"","url":"https://api.github.com/users/rschooley","html_url":"https://github.com/rschooley","followers_url":"https://api.github.com/users/rschooley/followers","following_url":"https://api.github.com/users/rschooley/following{/other_user}","gists_url":"https://api.github.com/users/rschooley/gists{/gist_id}","starred_url":"https://api.github.com/users/rschooley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschooley/subscriptions","organizations_url":"https://api.github.com/users/rschooley/orgs","repos_url":"https://api.github.com/users/rschooley/repos","events_url":"https://api.github.com/users/rschooley/events{/privacy}","received_events_url":"https://api.github.com/users/rschooley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-22T02:05:29Z","updated_at":"2015-07-29T13:39:44Z","closed_at":"2015-07-29T13:39:44Z","pull_request":{"url":"https://api.github.com/repos/peterkeen/payola/pulls/148","html_url":"https://github.com/peterkeen/payola/pull/148","diff_url":"https://github.com/peterkeen/payola/pull/148.diff","patch_url":"https://github.com/peterkeen/payola/pull/148.patch"},"body":"This PR adds more functionality for working with coupons:\r\n\r\n1. add ```amount_off```\r\n2. add ```duration``` & ```duration_in_months``` (with Stripe rules)\r\n3. add CreateCoupon service to sync coupon creation with Stripe"},"comment":{"url":"https://api.github.com/repos/peterkeen/payola/issues/comments/125955624","html_url":"https://github.com/peterkeen/payola/pull/148#issuecomment-125955624","issue_url":"https://api.github.com/repos/peterkeen/payola/issues/148","id":125955624,"user":{"login":"peterkeen","id":13977,"avatar_url":"https://avatars.githubusercontent.com/u/13977?v=3","gravatar_id":"","url":"https://api.github.com/users/peterkeen","html_url":"https://github.com/peterkeen","followers_url":"https://api.github.com/users/peterkeen/followers","following_url":"https://api.github.com/users/peterkeen/following{/other_user}","gists_url":"https://api.github.com/users/peterkeen/gists{/gist_id}","starred_url":"https://api.github.com/users/peterkeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterkeen/subscriptions","organizations_url":"https://api.github.com/users/peterkeen/orgs","repos_url":"https://api.github.com/users/peterkeen/repos","events_url":"https://api.github.com/users/peterkeen/events{/privacy}","received_events_url":"https://api.github.com/users/peterkeen/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T13:39:44Z","updated_at":"2015-07-29T13:39:44Z","body":"There's a bit of a disconnect here. Payola-level coupons apply to one-off purchases, not subscriptions. Stripe doesn't let you pass a coupon code to a one-off charge.\r\n\r\nWhen we do coupons for subscriptions we just pass the opaque coupon id to Stripe.\r\n\r\nSorry. This should probably be documented better."}}