liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.67k stars 215 forks source link

Downloadable monthly account statements #714

Open timpritlove opened 7 years ago

timpritlove commented 7 years ago

In order to be able to declare income via donations properly, Liberapay should be able to provide proper monthly account statements. These statements should feature/include:

The statement should be downloadable as a a PDF document so that i can be easily printed out and be attached to the list of documents for the tax authority. It's important that the PDF is created by Liberapay as tax authorities require "original documents" to be presented on request (which would otherwise be a HTML page which is more and quirky to store and present).

The statement should also be downloadable in a machine readable version (e.g. a CSV table) so that it can be easily imported into banking and/or account application. This list of transactions should include both money received AND money transferred so that it actually reflects the Liberapay account for each user.

The current Account Statement should be placed more prominently (it's currently placed under "Wallet")

Changaco commented 7 years ago

We already have CSV and JSON exports, but they're not perfect and not documented.

We currently don't support generating PDF documents at all. We'll need a rendering engine for that, a quick search leads me to WeasyPrint and wkhtmltopdf.

Changaco commented 7 years ago

Related issue: #289.

timpritlove commented 7 years ago

Thanks for the followup. JSON export is nice for programmers but you would need to have something on offer for database/spreadsheet/bookkeeping people. That's why I opted for CSV as it should satisfy most of these requests.

The monthly PDF statement should be equivalent to the CSV export (based on the exact same data) and does not have to look super fancy. As long as all necessary information is contained, you're set.

mattbk commented 7 years ago

Could this be used for PDF building? https://github.com/alvarcarto/url-to-pdf-api

Changaco commented 7 years ago

@mattbk Yes. The micro-service approach is interesting. It's probably not optimal for our use case (we don't need something that can render any URL, we only want to render a few documents of our own), but I assume it's fast enough.

LiamDawe commented 6 years ago

With all the crap surrounding Patreon, now would be a good time to get this sorted guys :+1:

I've just signed up and I imagine others will too, but a PDF with an official header (or something similar) is essential for tax purposes.

timpritlove commented 6 years ago

Getting a proper relationship with the tax authorities is key to success. I have looked a lot at Flattr, Patreon and others and the only one who get it right these days is Steady.

As I mentioned before, providing a PDF document is not only "nice to have", it is somehow mandatory as one need a proper reference to the money flow and it must be provided in a standalone, seperately storeable document (where PDF is just the best choice these days).

GIven the fact that Liberapay is actually providing tallies on a weekly basis, it would be good to make the statements actually week-based too.

Changaco commented 6 years ago

@timpritlove In your original message you said that the statements should include the "name and address of receiver". We don't actually have the postal address of all users who receive money, and even when we do we can't be sure that it's correct. Do you think we should ask the user if they want their postal address to be included in the statements?

timpritlove commented 6 years ago

Yes, users should be able to provide the full address. My understanding is that this is a requirement for level 2 identification anyway, so this is already possible to do.

Changaco commented 6 years ago

Screenshot of WIP:

liberapay-2018-03-29-account-statement

LiamDawe commented 6 years ago

That's looking really good, nice work, will be a load off my mind when this is implemented :+1:

timpritlove commented 6 years ago

That's a good start. Thanks for working on this.

Some first thoughts glancing at this draft:

  1. I would recommend issuing separate account statements per currency used. Mixing currencies in one document makes things unnecessarily complex and there is also no need to do this as these are technically two separate accounts that can't be summed up and where no money flows from one to the other (if I am not mistaken).

  2. Instead of just stating the site's title and support e-mail address, Liberapays full organisation name, registration numbers and address should be listed in the fine print.

  3. I would also encourage you to use properly localized dates, not US dates. "1/9" is not helpful for the rest of the world. "01.09.2018" or at least "01.09." tells it like it is. In the end, this should be delivered based on the user's country setting. I also think the date should go to the first column.

  4. Same for numbers: please use the correct delimiters (as a German, I would like to see "," to delimit Cents from Euros and the "." should be used as a thousands separator. That said, I personally prefer "EUR" to "€" etc. and I think it makes for a more readable statement too, but maybe that's just me. If you want to expand to other currencies, more currencies using the "$" sign will come up so I think international currency abbreviations are just more precise.

Changaco commented 6 years ago
  1. Currencies are in separate wallets, but in a single Liberapay account. I don't think it's a good idea to split them into separate tables, especially since we'd like to support currency conversion one day.

  2. The organization's full name is just "Liberapay", and it doesn't really have a postal address.

  3. and 4. The dates and money amounts are localized.

jaschaurbach commented 6 years ago

Professional Accountant here. Please never ever mix up two currencies in one statement. We hate PayPal for doing this. I have two wallets, I have two statements, otherwise it would be one wallet.

Of course Liberapay has an address - the last I found is from this PDF: http://www.journal-officiel.gouv.fr/publications/assoc/pdf/2016/0002/JOAFE_PDF_Unitaire_20160002_00157.pdf

Objet : fournir un service informatique international facilitant les dons monétaires entre personnes, aussi bien physiques que morales. Siège social : Chemin des Vaux, Le Bourg, 14770 Saint-Jean-le-Blanc . Site internet : http://liberapay.com/. Date de la déclaration : 19 décembre 2015.

As the service you offer is VAT-free it needs to be stated at the statement. Come on, are you all doing this for years and no-one cares for the legal stuff?

mattbk commented 6 years ago

I would also encourage you to use properly localized dates, not US dates. "1/9" is not helpful for the rest of the world. "01.09.2018" or at least "01.09." tells it like it is. In the end, this should be delivered based on the user's country setting. I also think the date should go to the first column

Just use ISO 8601 (YYYY-MM-DD) and remove ambiguity: https://en.wikipedia.org/wiki/ISO_8601#Dates

timpritlove commented 6 years ago

Well, even if you will support currency conversion one day, the wallets should be listed separately. You can properly document the currency conversion when doing money transfer from one wallet to the other.

Mixed up currencies are making nobody's life easier and will make it probably much more problematic to get this accepted by tax authorities. It would also make a future wallet API much more complicated.

Regarding terminology: the "Liberapay account" and the "account statement" are referring to two distinct things here. The "account" referred to in "account statement" is actually a Liberapay wallet, the "Liberapay account" is just a website concept.

Just use ISO 8601 (YYYY-MM-DD) and remove ambiguity

I would still prefer localized dates. ISO 8601 is fine technically for import and export files, but for a document designed for being printed and read, more human readable notations should be preferred.

revi commented 6 years ago

ISO 8601 everywhere! https://xkcd.com/1179.

Changaco commented 6 years ago

You can now view a prototype account statement for your account (with real data): https://liberapay.com/about/me/wallet/statement

Mine is 64 pages long, which is a good example of why we need to switch from a weekly to a monthly donation cycle: https://github.com/liberapay/salon/issues/206.

Changaco commented 6 years ago

(You can also view other months by adding ?year=<number>&month=<number> to the URL.)

LiamDawe commented 6 years ago

Doesn't work properly for me.

Without a manual date added: "end date is in the future"

Even when using March (so only last month), it's still the same. Works for January and February though.

The text seems wrong, it says "Donation to person's name", where the name is the person who did it. Is it supposed to be "from" instead of "to" - this also seems to completely remove the anonymous nature of Liberapay for the people donating.

Also, it doesn't entirely make sense. I think my account was opened in January 2018 (liberapay page for me says 4 months ago, so i assume so? It would be nice if we could tell exactly when).

I also can't view any statements before Jan 2018 and it says at the top "Balance at the beginning: €xx.xx" - I should start with nothing (depending on when exactly my account was opened) so I assume my account was opened in December 2017, yet I can't view a statement for then.

Definitely agree that Liberapay's registered address is required to be on it.

I'm sure I can come up with more, but that's enough for now ;), great to see it coming together.

Changaco commented 6 years ago

The text seems wrong, it says "Donation to person's name", where the name is the person who did it. Is it supposed to be "from" instead of "to" - this also seems to completely remove the anonymous nature of Liberapay for the people donating.

Oh shit, you're right. (How did I not see that?!)

Update: I've removed this data leak.

Update 2: Donations are now displayed properly.

bearbin commented 6 years ago

Yep, I can see all the people donating to me :|

mattbk commented 6 years ago

"oops" :laughing:

Changaco commented 6 years ago

@LiamDawe Thanks for your feedback. I've fixed the date issues.

timpritlove commented 6 years ago

You can now view a prototype account statement for your account (with real data): https://liberapay.com/about/me/wallet/statement

Great, that's a good start. Hope there will eventually be a native PDF output instead of just a print function.

Mine is 64 pages long, which is a good example of why we need to switch from a weekly to a monthly donation cycle: liberapay/salon#206.

I don't see why a "long" account statement should be a problem. It's supposed to be complete and it's going to be a PDF file anyway, so who cares how long it is. It just needs to exist.

Also, switching to a monthly schedule (which I don't like) would make statements even longer.

(You can also view other months by adding ?year=&month= to the URL.)

Does not work for me.

timpritlove commented 6 years ago

Month adressing with ?year=2018&month=01 works, but when selecting it like this (January 2018), the account statements starts at 13.01.2018. Does this depend on when my account was opened?

If you really want to go for monthly account statements, it should start on the first day of the month. I guess this is a bug?

mattbk commented 6 years ago

Can confirm: image

Changaco commented 6 years ago

Does this depend on when my account was opened?

Yes.

I guess this is a bug?

No, it's intentional. Doing something on the same day for all accounts is how you end up with a system that doesn't scale, I'm not making that mistake again.

LiamDawe commented 6 years ago

Just some food for thought though, ideally they need to run from the start to the end of the month, regardless of when the account was opened in that month.

Otherwise, it looks like previous dates are just being hidden - making it not great for tax purposes.

timpritlove commented 6 years ago

Problem is, that the account statement is meant for the tax authorities and therefore needs to relate directly to your official business year (I must admit this is also a good argument against weekly statements). So the statement should always cover the complete calendar month.

I don't see why this is a scaling issue as not everybody is going to download the account statement at the same time and even if generated (and it is a problem then), it could be done in a lazy background job with reduced priority.

mattbk commented 6 years ago

Is it different than changing this line?

start_day = participant.join_time.day

to

start_day = 1

timpritlove commented 6 years ago

Any progress here? Can you reflect on the recent discussion about the dates for the statements? @Changaco

I also wonder when you plan to roll out the feature on the site and when the statement data can be exported as CSV.

jaschaurbach commented 6 years ago

Another thing I wonder is: Is there any chance to get the origin country of the money? (Not the person, only the country the person which gave money resides in).

It would be great for MOSS taxation as the context matters in which the money is generated - in my use case it is for online texts which fall under the MOSS VAT taxation (thank you Europe!).

If the donations were for let's say a print zine it would not matter. It even does not matter for open source Software projects as there is no direct reward but it does matter if you ask for donations in a context of digital publishing.

Changaco commented 6 years ago

@timpritlove I haven't worked on this since last month.

I won't change the default alignment date of account statements, but I may introduce the possibility of setting a custom value for a specific user account.

@herrurbach In my opinion VAT should not and does not apply to donations.

Also, it wouldn't be enough to give you a country code for each donation, because you need two pieces of non-contradictory evidence when determining the VAT country.

LiamDawe commented 6 years ago

@Changaco Honestly, there's really no reason not to have all monthly statements begin at the start of a month and end as normal at the end. Custom dates would be nice, but the entire point of this is to be 100% accurate and to help people show proof for taxes.

Not having the whole date in each month, makes them questionable. Not to mention there should be zero technical reasons why this isn't possible, if there is, then to be blunt you're doing something really weird with them.

As for @herrurbach it's a donations platform, not something that should be given for rewards.

jaschaurbach commented 6 years ago

@LiamDawe The thing is: My taxation authority does not care how you or anyone else calls ist.

Maybe we need to clarify what (in terms of taxation) a donation is: It is the money you give to a organization for letting them do do what they want to do. There is no reward for the donation despite the merely existence of the organization taking donations. There are two type of organizations taking donations: Those whose donations you can enter in your taxation files which reduce your taxes and those where you can NOT do this. Let's have a look at second on.

Donations where my taxation authority does not care as I can not use these donations to reduce the amount of taxes I need to pay - they are not income taxes free for those who take them (in fact there are different terms for the tax on different forms of organisation but let's not focus on the term).

As an author getting part of the money I earn I sell texts. I sell texts to newspapers or publishers. I do enough sales that I need to pay VAT. And now the point: The donations I get via liberapay are considered sales of these texts as they are tied to my blog where I ask people to do donations with liberapay. Donors are in fact customers in terms of taxation. In the EU I need to pay the VAT depending on the location of customer: e.g. 7% in Germany, 23 in IE (just examples)

To apply the correct VAT I need to know where the money comes from in terms of "Where the person got the digital good delivered" - The tax yuthority accepts it ver well if there is a statement form (in this case) Liberapay saying : 0,23 EUR form France, 1,30 EUR from IT, 22,30 from DE, 4,32 from USA. The last one would be by the way TAX free.

"But why do all the small softwareprojects do not do it?" - Short: Most cases they do not need to do it as they are not forced to do VAT taxations - either they are too small (in business terms) or have not registered as free software developers. The tax authorities do not care about them unless there is a significant amount from this work.

If liberapay say sit i a donations platform then liberapay should take into consideration only let donations be retrieved by those who are allowed to take donations in terms of taxation, because everything else is not a donation, no matter how you or anyone else calls it.

LiamDawe commented 6 years ago

I wasnt debating how you wish to use it, it is taxable if you're not a charity (like me).

My wider point was there's nothing on Liberpay to match people up for rewards. So it's not correct use of it.

jaschaurbach commented 6 years ago

The reward is already there: The texts published on my blog as in this context the call for donation is done. There is no need for liberapay to match it to a single text.

Edit: And as said: The tax authority does not care if there are "rewards" or not. They just care about the taxrate - which can be zero if someone is a organisazion allowed to receive tax deductible donations.

Edit:

This is why I said: It does not matter how we call it.

"We help you fund the creators and projects you appreciate." is the claim of liberapay which I think is great.

If I click the explore button on the website I can see "Great nonprofits and companies trying to improve the world." directly under "Organizations"

Show me companies which are eligable to recieve "real" donations on the explore page.

Matrix for example is delivering a secure thingything. Even f it is not available yet, the reward is this software. Later, after they formed and registered their foundation then this are reald onations and everything is fine. In my case the reward is that there are texts on my blog. It is a change "money" against this reward and thus it falls under VAT.

(Matrix is just an example)

LiamDawe commented 6 years ago

Well this is completely out of the scope of what this ticket is for ;) you probably want to make a new ticket for this talk. I just want the dates on them cleared up.

Donations is just the term liberapay choose to use, whoever signs up for it is liable for whatever taxes and so on their end of course.

For me, I don't need MOSS as what I do is completely free (a news site) and the donations just form part of my income and it would be free without them.

timpritlove commented 6 years ago

I can only support what @herrurbach says: it does not matter at all how Liberapay calls the payments. All that matters is how it is being treated by the tax authorities and this is determined who is on the receiving end. That's just how it is.

As a podcaster I receive donations but those payments are treated no different than any other income I have. I have to deduct VAT from it and pay income tax on the rest.

And yes @LiamDawe, we are still in the scope of this ticket as all the necessary information needs to be included in the account statement. And while some things might not apply to you, they apply to many other people. If the service should be open to anybody it should cover most if not all cases.

If Liberapay wants to support people who do free stuff on the net (be it content or be it software) it should make things as easy as possible to get things passed on to the tax authorities. The situation in the EU is complicated, but this is the reality.

So to make a point here: I strongly support the idea of breaking up the sums into groups depending on where the payment was made. This is especially true for MOSS (where the individual tax rate per country applies) but also in my situation where it matters if payments come from the EU or Non-EU countries.

timpritlove commented 6 years ago

Any progress on this front? When will we see official account statements?

mattbk commented 6 years ago

This article suggests that donation crowdfunding would fall outside the scope of VAT if the recommendation was accepted: https://eurocrowd.org/2015/11/23/vat-and-crowdfunding-the-eu-rules/

I can find a few more references to this, but nothing conclusive in the last few years. Does anyone have a source that says VAT is required on donation crowdfunding?

Donations for recompense are forbidden in the Liberapay terms. From https://liberapay.com/about/legal:

The user agrees not to use the service for financial transactions that are not donations, notably those linked to the execution of a contract or a promise of recompense.

jaschaurbach commented 6 years ago

We are dealing with two different things here:

  1. Statement. It would be great to have a statement for the whole month.

  2. Taxation. As I wrote earlier: Not every entity is entitled to get tax free donations. It does not matter how you call it. I for example have to pay VAT on these „donations“. To pay the correct amount of VAT it would be great to know the country of origin for the donations in total (not eery single donations, that does not matter)

dtugend commented 5 years ago

The user agrees not to use the service for financial transactions that are not donations, notably those linked to the execution of a contract or a promise of recompense.

That would mean most people using Liberapay at the moment that are from Germany or countries with similar law and accepting "Donations" would be using Liberapay illegally?

Except if you are a government approved entity for accepting donations it's technically not a donation, at least from German tax law perspective as far as I know.

E.g. "donations" for "Freeware" are technically most of the time a payment for a service or delivery here. And that also implies a contract (whether it has to be written explicitly or not and how is a different question).


Regarding statements / invoicing:

I have a similar problem - if I'd accept donations, I'd need to write an invoice for every donation (doesn't matter if it's as low as 0.01 EUR per week) and if I am above a certain yearly income I'd also have to pay the VAT for it.

I might also need the VAT no. if the other party is a business too (b2b, the invoice needs to include both VAT No. / TIN) or if the amount is large enough also TIN of private people.

The invoice sent to the other party also needs to include text, whether it includes VAT or not, example: "* Not subject to turnover tax according to § 19 UStG (German value added tax law, because Dominik Tugend is a small business). This is no legal advice whether or not reverse charge applies."

There's also a lot of requirements for invoicing and TAX, based on whether the other party is a business, in which country it is (same, EU country, non-EU, has tax treaty etc).

The Liberapay statement doesn't fulfill those requirements afaik, so I'd have to write an own one or restrain from receiving donations.

Also since Liberapay claims to transfer the funds directly (meaning they are not a payment processor or bank or whatever from their point of view), I don't see how Liberapay would be directly affected by this problem, apart from people not being able to use their service legally in several countries in it's current form.

And I don't see how Liberapay could know all possible legal combinations.

So maybe LiberaPay can help with writing of the invoices (by providing a way to exchange necessary data (especially required for b2b and may be for b2c)) and by avoiding too much invoicing, e.g. because of 100s of micro transactions. Edit: And here I see the next problems with EU Data Protection law :-(

LiamDawe commented 5 years ago

For PayPal you just use your PayPal statements.

For Stripe, however, it's still needed as they only provide a CSV file.

LiamDawe commented 4 years ago

So any movement on proper statements? Just curious, as it's been a few years, and really this is quite a trivial issue. It's just bundling payment info into a file, with an official letter head on top with Liberpay's full info.

Changaco commented 4 years ago

There has been exactly zero progress made on this since 2018. We still don't have any infrastructure in place to generate PDFs, and our software still doesn't know how to display postal addresses properly (#1056). Moreover, the donations processed through Stripe and PayPal don't fit into the prototype account statements which are based on wallets, so we need to rethink the whole thing.