jsbin/jsbin — pull request #2205 by allouis (2014-12-15 14:47:30+00:00)
Title: Feature/vatmoss

- [ ] Closes #2204 (Ready to merge)
- [ ] Convert all users from VAT based subscription to non-VAT subscriptions (one off script, and capture email addresses)
- [ ] @remy to manually email those users who are changing subscription
- [ ] Use existing `EU` lookup against credit card country and if required the existing `valdidate-vat` module to work out whether they need to have VAT applied or not
- [ ] If they don't need VAT, continue as normal
- [ ] Otherwise, look up VAT amount based on country code from credit card (note that this should be a promise as it may be doing an API request)
- [ ] Calculate VAT and add a separate invoice item to the created invoice for the subscription
- [ ] Handle `invoice.created` webhook, check that this isn't the first invoice for the subscription (since we've already handled the first) and run the same logic (check card country, add VAT item if applicable) - the webhook fires 1 hour before actually processing the invoice.