Pro-Sites doesn't allow charging taxes


PayPal comes with a tax calculator. Easy and powerful. But… only PayPal Payments Standard! Which was supported by Supporter but not by Pro-Sites anymore. In other words: Pro-Sites doesn’t allow charging taxes! And we’d like to avoid any tax related trouble with any government, wouldn’t we?

I called PayPal support and went through their documentation, and the only way I’ve found so far to add taxes is to use the callback feature, which I guess relies on shipping information and requires SSL.

Am I missing something? Has anyone else experienced the same issue? Is there an easy workaround? Should a module or something like this be developed to handle PayPal’s callback? Should I develop my own? How?


  • Aaron
    • CTO

    The reason sales tax is not included in Pro sites or supporter before is because it’s a software as a service (SaaS, intangible goods), which is not taxable, at least in the USA. You won’t ever see tax charged for US based SaaS companies..look at (the most apt example), 37 signals, etc.

    Not sure about non USA businesses, but the few who have needed it in the past include it in the pricing of the monthly subscription and transparent to the customer. This keeps pricing to the customer simple and more attractive. This is what we do with, at the end of the years calculate tax for AU customers via the PayPal account.

  • Aphrodite
    • The Reaper

    Well this is USA exception only….

    All services in europe and major countries are taxable. In france at 19.6% in morocco at 20%, etc.

    Other problem I said something about many time ago : the bill.

    Pro site SHOULD absolutly send a bill since this is a pro service.

    Even for b to c services, we are absolutly obliged to edit a bill. Now I do it manually. So that the company annual financial reports. We must do it all manually, and calculate the REAL incomes with taxes…

    I have spoken many time ago with Moha about that, and ohow to find a way to link or use wordpres billing plugin (that includes many many gateways) to charge the custumer on supporter…

    That is why here in fact i cannot use it at it real power : i do all manually since i am forced to edit a bill, only thing that i can be payed for….

    A littl option “apply taxes” with a text entry for the rate, and a little calculator that can give us a full report includind taxes if applied would be great :slight_smile:

    At least :slight_smile:

    And there is more : taxes in europe are due but not if the custumer is outside europe. So as in many countries, vat applies in the country not outside…

  • asimetrick
    • Site Builder, Child of Zeus


    Everything you say makes sense. I also turned things like this in my head: SaaS with taxes included, make it simple, etc. But the thing is, here in Canada, we must:

    – Apply both provincial and federal sales taxes to customers from the same province

    – Apply only federal sales taxes to customers from other provinces

    – Apply no sales taxes to customers from outside the country

    – Include sales taxes numbers (reference numbers) on any receipt or bill

    – Send a receipt or a bill for every transaction

    In technical words, I can only see callback and IPN features to fulfill those needs.

    I’m starting having ideas on how to do it. Actually, I’m thinking of a “Financial” module, the kind Aphrodite is talking about. A module which may:

    – Setup taxes the way PayPal Payments Standard does it, but with additional features like reference numbers, cumulative calculation, etc.

    – Calculate and record the taxes on PayPal callback

    – Record the global transaction on PayPal IPN (rather a dedicated table than the current ‘psts_payments_log’ option)

    – Include the actual bill/receipt in the receipt email

    My Friday will be dedicated to prototype something like this. Is it something you would think adding to Pro-Sites on a short term or shall I develop it end to end on my side in the new few days? Anyway, anything I’ll do I’ll share it with you.

    When it’s done, I think I’ll need a bit support from you with SSL. I’ve never worked with it and I don’t know how to make it work for the only callback URL.

    @aphrodite, is there something you would like to add?


  • Aaron
    • CTO

    We don’t plan on including tax ability. As we’ve seen with MarketPress, it’s a nightmare to support that even just in the USA. Companies like hire armies of lawyers and developers to keep up with the 11,000 local tax code changes each year. I would be interested to see links to any international online subscription based SaaS companies to see how they do things.

    For the vast majority of Pro Sites users the current functionality is fine. What I will do though is make sure you have whatever hooks you need to extend and customize things as needed for clients. So let me know what you need in that regard.

    Aphrodite, if you havn’t noticed payment reciept emails are now included in Pro Sites. You can customize on the settings screen.

  • asimetrick
    • Site Builder, Child of Zeus

    Ok Aaron, fair enough.

    I’m presently trying to integrate Instant Update (callback feature). Did you ever try? I always get an 81002 error (unspecified method) and I really don’t understand why. I googled it but found nothing. Any idea?


  • asimetrick
    • Site Builder, Child of Zeus


    I have a first set of requirements for adjustments/extensions for custom tax calculation.

    First of all, all around the world sales taxes are essentially meant to be calculated form the buyer’s address. When not managed by our own platform (my case), this address has to be retrieved from PayPal. And to make PayPal send it back to us, we need to:

    – set the ‘NOSHIPPING’ argument’s value to 2 instead of 1

    – call the ‘GetExpressCheckoutDetails’ method before calling the ‘DoExpressCheckoutPayment’ and/or ‘CreateRecurringPaymentsProfileExpress’ methods

    – pass the calculated tax amount on calling the ‘DoExpressCheckoutPayment’ and ‘CreateRecurringPaymentsProfileExpress’ methods

    Initially, I was thinking that the only way was to use the Instant Update feature (callback on redirection), but it requires an itemized checkout which is a bit far from the present implementation and it’s finally not required.

    So in the ‘SetExpressCheckout’ function, we shall have (line 1664):

    $nvpstr .= "&NOSHIPPING=".apply_filters('psts_pypl_noshipping', 1);

    Additionally, because we will use the ‘PAYMENTREQUEST_0_TAXAMT’ argument later on, we shall set the ‘PAYMENTREQUEST_0_ITEMAMT’ argument’s value to the initial payment’s amount. And because of that too, the ‘PAYMENTREQUEST_0_AMT’ argument shall have the same value on ‘SetExpressCheckout’.

    While with this function, ‘CURRENCYCODE’, ‘AMT’ and ‘PAYMENTACTION’ arguments are marked as deprecated in PayPal’s documentation. They should be replaced by ‘PAYMENTREQUEST_0_CURRENCYCODE’, ‘PAYMENTREQUEST_0_AMT’ and ‘PAYMENTREQUEST_0_PAYMENTACTION’. And to pass the amount to be authorized (presently twice the payment’s amount), the ‘MAXAMT’ argument shall be used instead of ‘AMT’.

    For the ‘GetExpressCheckoutDetails’ method, we shall minimally have (line 1108):


    My suggestion is rather including this method’s call in the ‘process_checkout’ function instead of allowing custom code to do it. Actually, this function would benefit from retrieving payment information from the previous step (‘SetExpressCheckout’:wink: instead of resetting this information the same way as already done during that previous step. It’s anyway a best practice recommended by PayPal (see also my other related topic on this subject).

    For the ‘DoExpressCheckoutPayment’ function, I first have the same comment as before for the deprecated arguments, with adding the ‘DESC’ and ‘CUSTOM’ arguments to the list to be replaced by ‘PAYMENTREQUEST_0_DESC’ and ‘PAYMENTREQUEST_0_CUSTOM’. Additionally and above all:

    – Pass the ‘PAYMENTREQUEST_0_TAXAMT’ with custom value (see above)

    – Set ‘PAYMENTREQUEST_0_ITEMAMT’ value to the first payment’s amount


    For the custom tax amount, something like this shall be needed in the ‘DoExpressCheckoutPayment’ function:

    $tax_amt = apply_filters('psts_pypl_tax_amount', 0, $paymentAmount, $token);

    For the recurring payments, I think it shall be the same, but I still have to think about it further (what shall be done if taxes have changed since the last payment?). I may have additional requirements, I don’t know yet.

    Well, a long post finally. I still have to validate end to end what I mentioned here but I guess that’s it.

    Please keep me posted…


  • Aaron
    • CTO

    I still don’t understand why you need to pass in a separate tax amount line (that would be hidden anyway)? Wouldn’t recording their address be enough combined with tax inclusive pricing? I don’t have any examples to point to, but i’m pretty sure SaaS type online services in other countries simply factor in tax to the pricing with a “prices are inclusive of 15% VAT” type notice, and figure out later from paypal exports what to remit to the government.

    Like I said at Edublogs, we simply run an export of transactions from PayPal, then I pass them through a little script that loops through them calling GetTransactionDetails or GetRecurringPaymentsProfileDetails (forgot which) to determine which transactions are taxable. And we don’t even need to collect shipping addresses in PayPal checkout as paypal already returns their country in that response.

  • asimetrick
    • Site Builder, Child of Zeus

    Well, as I said before, it’s mandatory for the following reasons:

    – The country is not enough here in Canada. We have to apply pronvincial taxes (PST) in addition to federal taxes (GST) and they totally depend on the buyer’s province.

    – I know the tax line is anyway hidden in PayPal. That’s an additional reason why I legally MUST present to my Canadian customers the detailed taxes applied (amounts and reference numbers) at any point during the checkout process, not only to income agencies at the end of the quarter. This point will be the receipt notification and the future confirmation step requested besides.

    Of course I could store the addresses of my customers and simply include to tax into the amount, but:

    – It’s a strategic decision I do not store the addresses on my end (decision made at the market study’s level)

    – I still need to calculate and apply the taxes on checkout

    – There’s a field in PayPal dedicated to taxes, why nout use it instead of a workaround?

    One more time, I totally understand your point, it definitely makes sense to me and I wish I could do what you say. I’m just saying I have both legal and strategic constraints I cannot avoid, and as Aphrodite said, I’m not the only one.

    Anyway, I’m not stuck at this moment. I already have overriden the ‘ProSites_Gateway_PayPalExpressPro’ class, so without modifying the ‘process_checkout’ function (the last thing I wanna do!), I can do what I need only be rewriting the PayPal methods’ calls (adjusting the arguments). But I’m pretty sure the plugin would definitely benefit from the changes I proposed, and then other people who use it.

    What do you think?


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.