{"action":"created","issue":{"url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/100","labels_url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/100/comments","events_url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/100/events","html_url":"https://github.com/drastik/com.drastikbydesign.stripe/issues/100","id":106861304,"number":100,"title":"Currency problem with Stripe fees and net amount getting recorded in CiviCRM","user":{"login":"Upperholme","id":5860951,"avatar_url":"https://avatars.githubusercontent.com/u/5860951?v=3","gravatar_id":"","url":"https://api.github.com/users/Upperholme","html_url":"https://github.com/Upperholme","followers_url":"https://api.github.com/users/Upperholme/followers","following_url":"https://api.github.com/users/Upperholme/following{/other_user}","gists_url":"https://api.github.com/users/Upperholme/gists{/gist_id}","starred_url":"https://api.github.com/users/Upperholme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Upperholme/subscriptions","organizations_url":"https://api.github.com/users/Upperholme/orgs","repos_url":"https://api.github.com/users/Upperholme/repos","events_url":"https://api.github.com/users/Upperholme/events{/privacy}","received_events_url":"https://api.github.com/users/Upperholme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-16T20:50:21Z","updated_at":"2015-09-16T20:57:40Z","closed_at":null,"body":"Here's what's happened:\r\nDonor makes a payment for $50 USD\r\nStripe converts the payment to my client's currency (GBP) $50 = £31.72\r\nStripe takes its fee = £1.12, leaving £30.60 GBP to be transferred to my client's bank account. All good.\r\n\r\nHowever, looking at the contribution record in CiviCRM, it presents the following:\r\nTotal amount $50 USD\r\nFee amount: $1.12 USD\r\nNet amount $30.60 USD\r\n\r\nwhich is clearly incorrect.\r\n\r\nSo it looks like Stripe is converting the payment into the default currency of the client before calculating its fees, meaning that the only data it can feed back to CiviCRM via a webhook is in the 'wrong' currency, because I would imagine that Civi assumes a transaction to be in a sinlge given currency and the data form Stripe quite probably. does not specify a currency.\r\n\r\nThis does seem illogical, and I'll take the matter up directly with Stripe, but thought I'd raise it here both as a heads-up for others in a similar position, and in case someone else has dealt with this and found a solution.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/comments/140892417","html_url":"https://github.com/drastik/com.drastikbydesign.stripe/issues/100#issuecomment-140892417","issue_url":"https://api.github.com/repos/drastik/com.drastikbydesign.stripe/issues/100","id":140892417,"user":{"login":"drastik","id":1258227,"avatar_url":"https://avatars.githubusercontent.com/u/1258227?v=3","gravatar_id":"","url":"https://api.github.com/users/drastik","html_url":"https://github.com/drastik","followers_url":"https://api.github.com/users/drastik/followers","following_url":"https://api.github.com/users/drastik/following{/other_user}","gists_url":"https://api.github.com/users/drastik/gists{/gist_id}","starred_url":"https://api.github.com/users/drastik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drastik/subscriptions","organizations_url":"https://api.github.com/users/drastik/orgs","repos_url":"https://api.github.com/users/drastik/repos","events_url":"https://api.github.com/users/drastik/events{/privacy}","received_events_url":"https://api.github.com/users/drastik/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T20:57:40Z","updated_at":"2015-09-16T20:57:40Z","body":"Interesting.  Well really, in that return the only incorrect items are the \"total\" and currency.  I'll double check this as I'm going through the code making other updates.  Perhaps the proper values are available somewhere."}}