{"action":"created","issue":{"url":"https://api.github.com/repos/dmjio/stripe/issues/28","repository_url":"https://api.github.com/repos/dmjio/stripe","labels_url":"https://api.github.com/repos/dmjio/stripe/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/dmjio/stripe/issues/28/comments","events_url":"https://api.github.com/repos/dmjio/stripe/issues/28/events","html_url":"https://github.com/dmjio/stripe/issues/28","id":118165067,"number":28,"title":"How to charge by token from Stripe Checkout?","user":{"login":"tdimiduk","id":717812,"avatar_url":"https://avatars.githubusercontent.com/u/717812?v=3","gravatar_id":"","url":"https://api.github.com/users/tdimiduk","html_url":"https://github.com/tdimiduk","followers_url":"https://api.github.com/users/tdimiduk/followers","following_url":"https://api.github.com/users/tdimiduk/following{/other_user}","gists_url":"https://api.github.com/users/tdimiduk/gists{/gist_id}","starred_url":"https://api.github.com/users/tdimiduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdimiduk/subscriptions","organizations_url":"https://api.github.com/users/tdimiduk/orgs","repos_url":"https://api.github.com/users/tdimiduk/repos","events_url":"https://api.github.com/users/tdimiduk/events{/privacy}","received_events_url":"https://api.github.com/users/tdimiduk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-21T03:03:40Z","updated_at":"2016-03-29T02:05:16Z","closed_at":null,"body":"I had code working in version 1.4 which used chargeCardByToken to charge a token I got from the Stripe Checkout api, but this function appears to be missing in version 2. Is there a way to replicate this functionality in the new version? \r\n\r\nThe old function was:\r\nchargeCardByToken :: TokenId -> Currency -> Amount -> Maybe Description -> Stripe Charge"},"comment":{"url":"https://api.github.com/repos/dmjio/stripe/issues/comments/202667628","html_url":"https://github.com/dmjio/stripe/issues/28#issuecomment-202667628","issue_url":"https://api.github.com/repos/dmjio/stripe/issues/28","id":202667628,"user":{"login":"dmjio","id":875324,"avatar_url":"https://avatars.githubusercontent.com/u/875324?v=3","gravatar_id":"","url":"https://api.github.com/users/dmjio","html_url":"https://github.com/dmjio","followers_url":"https://api.github.com/users/dmjio/followers","following_url":"https://api.github.com/users/dmjio/following{/other_user}","gists_url":"https://api.github.com/users/dmjio/gists{/gist_id}","starred_url":"https://api.github.com/users/dmjio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmjio/subscriptions","organizations_url":"https://api.github.com/users/dmjio/orgs","repos_url":"https://api.github.com/users/dmjio/repos","events_url":"https://api.github.com/users/dmjio/events{/privacy}","received_events_url":"https://api.github.com/users/dmjio/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T02:05:16Z","updated_at":"2016-03-29T02:05:16Z","body":"The following should work:\r\n```haskell\r\nchargeCardByToken :: TokenId -> Currency -> Amount -> IO (Either StripeError Charge)\r\nchargeCardByToken tokenId currency amount = \r\n   stripe config $ createCharge amount currency\r\n      -&- tokenId\r\n```"}}