EU VAT hell - how to add VAT when multiple payment processors are used?

Discussion in 'Payments processing' started by tomfra, Dec 5, 2007.

  1. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    This is probably a bit more complicated than it sounds...

    My business is registered in the EU (Czech Republic). When I sell products online through 2CheckOut, I do not have to mess with any EU VAT taxes simply because 2CO is not a payment processor but I am their reseller and they are a US registered business.

    So in other words, I sell my product to 2CO and they sell the product to the final customer. Since I am selling to a US company, no EU VAT is involved.

    But what if I want to add another way to pay beside of 2CO - for example Moneybookers? Moneybookers is a EU registered business so when someone pays through them for my products and they are from the EU, I have to add the EU VAT unless they are VAT registered.

    But as far as I know, aMember does not allow you to enable taxes based on the chosen payment system. I may be wrong though.

    And that's not all... What about affiliate commissions if I use a 3rd party affiliate script such as Post Affiliate Pro, I need the commission to be counted from the price without VAT. This is probably not a problem because I believe it's counted from the price you set, not from the actually charged price but I am not sure.

    Anyway, let me say that if I should say what I think about the EU economic rules, the forum censorship system would get overloaded...

    Any ideas? I bet someone must have had a similar problem before, right?

    Tomas
  2. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    I've been playing with the aMember admin panel a little bit and it indeed seems there is no way to enable / disable EU VAT based on the chosen payment system. This is a major problem if it is so.

    Or am I missing something?

    Tomas
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Hi,
    You right currently there is no way to set VAT depending on payment system but this is possible with small customization.
  4. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    I can do some PHP coding, no problem. Can you tell me what I should modify?

    Tomas
  5. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    By the way, it's also important when selling to EU customers, to allow them to enter their EU VAT ID if their business is VAT registered - then they will not pay the VAT. So the customization may be slightly more complicated.

    Tomas
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Please contact us in helpdesk .
  7. olliejames

    olliejames aMember Pro Customer

    Joined:
    Mar 19, 2007
    Messages:
    26
    I am interested in this as well

    Hi did you get this solved?

    I would be interested in this as well, and I suppose anyone who is located in the EU.

    thanks

    Robert
  8. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    I've got the EU vat problem solved by hacking some payment plugins and adding an EU VAT ID check PHP class which is triggered after the customer hits the submit button on the signup page.

    The problem is, it is not an easy hack, rather a more complex modification and you would have to modify every payment plugin you plan to use. I have the "EU version" of Proxypay (apparently used by a lot of EU banks for CC processing even if they don't mention the Proxypay name anywhere), Paypal - non-recurring only but I am quite sure it would be possible to modify for recurring as well, and Moneybookers.

    However, I am still testing the modifications. Technically, it should be possible to modify any payment plugin, at least the non-recurring billing ones. Also, if you believe the PayPal plugin does have a functional tax counting that can be used for EU VAT calculations, well, it does not.

    When I get some time, I will post a "how-to" with the necessary modifications. It's for the adventurous only at this time though.

    Tomas
  9. michaeld

    michaeld New Member

    Joined:
    Jul 13, 2009
    Messages:
    4
    Hi,

    I am in the same position as you guys.

    @tomfra can you explain little bit what of the changes you made?

    I am currently exploring the code and I figured the PriceCalculator class needs to be updated too, as well as every place in the code which does not use it.
    Or else the user may see that the actual charged price wont fit what he/she saw or the screen.

    edit: Ok, I got it working for every plugin that uses get_member_tax (member.inc.php). It was actually quite esay to implement.

    Yours,
    Michael
  10. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
    Can you explain what changes you made? I'd love to implement this too.
  11. michaeld

    michaeld New Member

    Joined:
    Jul 13, 2009
    Messages:
    4
    Sure,

    I cannot enclose any code for legal reasons, so I describe what I did.

    But note that my implementation will only work for payment plugins which use get_member_tax you! I only checked that paypal_r does as its the only payment plugin that we use.

    Anyway, I created two new optional user fields for company name and VAT-ID (need to be on the invoices).

    Changed get_member_tax to run its return value through my function which checks ...

    if the user lives in the EU,
    if he lives in the same country as we,
    if he has a VAT-ID set and of course and
    if get_member_tax set any tax percentage

    I also changed the invoice templates to output the new fields if they are set and to comply with the EU reverse charge mechanism.

    Yours,
    Michael
  12. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
    I'm always flabbergasted when I read something like "I cannot enclose any code for legal reasons",
    yet those who write something like that are the first ones who grab whatever code they can from any source to make it theirs.
    It reminds me of Walt Disney...

    May I remind you this is a user forum?
  13. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @erwinvdb: Keep in mind that some of the users here are developers that do freelance work for 3rd party clients. In most situations the code that is developed belongs to the client that paid to have it developed. So unless agreed upon ahead of time or permission sought after the fact, it would be a contract breach for the developer to post the code here in the forums. He can, however, describe the techniques used (as Michael did in this case)
  14. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
    That would be total BS, because that would mean that the developer can only use a standard 'if routine' only once... and that would put them out of business.
    We all now developers create personal libraries where they swipe routines from.
    It's applies to situations where for example the client wants to have developed connections to their propriety systems or a specific functionality that would be new to their market.
    Not something like a print or tax routine. That's just not smart...
  15. michaeld

    michaeld New Member

    Joined:
    Jul 13, 2009
    Messages:
    4
    @erwinvdb It's almost as skippybosco described my situation expect that I am not a freelancer. Nevertheless, my contract forbids me to post any code I write for work.
    If I would own the code, I would post my hack...
  16. shahedbd

    shahedbd New Member

    Joined:
    Feb 1, 2012
    Messages:
    2
    Is there any quick way to use EU VAT % with product or Subscription wise, so that it will not be applied for all subscription as fixed rate? I can do customization if needed.
    Last edited: Mar 1, 2017
  17. shahedbd

    shahedbd New Member

    Joined:
    Feb 1, 2012
    Messages:
    2
    The real problem is, my client already have some subscription with VAT 10%, but later he want to apply vat for the another or same product with VAT 15%, how the VAT system will applied for the old subscription?
    Last edited: Mar 1, 2017
  18. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Not bad going - offer a solution to a thread started 10 years ago!!!

    Version 3 then I would have thought.
  19. alianschiavoncini

    alianschiavoncini New Member

    Joined:
    Jul 4, 2018
    Messages:
    4
    I found out this solution / workaround on aMember Pro vers. 5.5.1

    We are an italian company that sell electronic services and we have to use the EU VAT option.

    According to the European Cross-border VAT, we have to applicate the VAT when our electronic services are sold in Italy (to an italian company or individuals). This means that we have to configure the system with 22% VAT for Italy only and 0% for the other EU countries.

    See more info about EU VAT at official european website:
    https://europa.eu/youreurope/business/vat-customs/cross-border/index_en.htm
    TAB Services in our case

    On Invoice, we print the company name and the vat id fields if the customer filled in.
    See the aMember Pro "Add user fields" to create these fields.

    Here is the code that we use on site.php file to append the customer company an vat fields:

    Code:
    Am_Di::getInstance()->hook->add(Am_Event::PDF_INVOICE_COL_RIGHT, function (Am_Event $e) {
        $payment = $e->getPayment();
        $user = $payment->getUser();
        $col = $e->getCol();
      
        $col->prepend("VAT nr: {$user->data()->get('vatid')}");
        $col->prepend("{$user->data()->get('companyname')}");
    });
    On the PDF invoice footer we use this text:
    "Please note: if your a company based in EU and you have a VAT number, these electronic services are subject to reverse charge pursuant to Council Directive 2006/112/EC of 28 November 2006 on the common system of value added tax."
    caesar likes this.
  20. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    @alianschiavoncini thank you for sharing this info!

    I recommend to use built in "Vat ID" form brick (it is available once you enable EU VAT tax).
    aMember add this field to PDF invoice automatically and this field has feature for online VATID
    validation (ec.europa.eu) - so your customer can enter only valid vat id.

Share This Page