Hi @Anton L

How does UNA integration with Stripe and Paypal handle 'Customer Tax ID' on Invoice and Receipt documents? How is it collected on an UNA Website?

How to enable the Customer Tax ID field on Person and Organization profile?

Displaying a customer’s tax ID on Invoice and Receipt documents is a requirement in many countries such as countries in the European Union (EU), Brazil etc.

By not complying with that requirement, you will be infringing the law and, consequently, subject to penalties.

Stripe says:

You’re responsible for the accuracy of customer information including their tax ID number.

In the link below you will find the tax ID types supported by Stripe Invoicing:

I don't know much about Paypal yet.

Here are some suggestions I have:

  1. That Customer's Tax ID input field should be generic so that it can fit any tax id format from any country. In some countries the Tax Identification Number for individuals has a different format than the one for organizations/companies.
  2. Its input label should have a  multilingual support. We should be able to translated it through Polyglot because the Tax Identification Number is called differently in different countries.
  3. We should also be able to use regular expression to force members to enter their Tax ID in a correct format.
  4. If possible, only request the Tax ID when a member wants to order something on the website (e.g. Membership Upgrade, Credits, Points, Advertising/Banner etc). That's how facebook, Twitter and all those social networks operate. They request your Tax ID only when you want to order their paid services. It makes sense because it can be overwhelming and scary to many people to provide a website with their sensitive or personal information. 
  5. Last but not least, the UNA system should be able to check if the member has entered his/her Tax ID before proceeding to the Checkout page, otherwise invite him/her, maybe using a popup window, to do so.

Thanks a lot.

  • 576
  • More
Replies (20)
    • I think, you refer to business customers b2b in your posting, because private customers do not have a tax ID. If businesses have to pay value added taxes VAT (very small businesses are excluded from VAT in almost every European country), then either the end customer has to pay it, or the business receiving the VAT invoice can claim a deduction from the VAT they owe to the tax office from their own VAT sales. VAT rates vary a lot between European countries and countries on other continents may have a completely different taxation system. That's why we are using payment services like Stripe or PayPal. They offer a system (e.g. Stripe Tax) that can handle sales from a business in one country to a customer (private or business) in another country. Certainly, they will take an additional provision for that.

      What it will need to integrate Stripe Tax service to work with UNA is a handler in the API call, that is called automatic_tax[enabled]"=true , which will trigger VAT handling as is set up in Stripe Tax.

      This information is from this site (I don't know how to change to the english version of the page, sorry).

      • Hi @thomlin

        Sorry but I am fraid that you completely misunderstood my question to @Anton L.

        I am not talking about paying, calculating or deducting a VAT. I am asking about how to display a Customer's Tax ID on the Invoice and Receipt documents which is a requirement in some countries whether that customer is an individual/person or company/business. It's a strategy found by many governments to fight tax evasion and fraud.

        Stripe has already that option in its API. Please refer to the link I shared in my post above. Stripe can display the customer's tax ID in the header of the invoice and receipt along with the Full Name, Billing address, Email address.

        UNA has a organization profile module for business/entities. So let's say, if you are running an UNA website or business/company that operates within the European Union and offer whatever paid service (Membership upgrade, Credits, Points, Advertising etc) to another European Union-based business, you are bound by the the European Union Law to display their VAT in the Invoice and Receipt. Did you know that?

        Same applies in countries like Brazil (to both Individuals and businesses). Yes in Brazil, it is not permitted to issue an invoice or receipt without displaying the customer's Tax ID on it no matter whether that customer is a person or a business. I bed that applies to many other contries as well. I am still searching about it.

        Sure VAT is for businesses in the EU but in some other countries both Individuals (natural persons) and Business (entities) have a Tax Id. It is just called differently in different countries.

        E.g: U.S. taxpayer identification numbers include a Social Security Number (SSN) or Taxpayer Identification Number (TIN) which is issued to individuals, and an Employer Identification Number (EIN), which is issued to individuals or entities.

        Brazilian taxpayer identification numbers include CPF for individuals and CNPJ for entities.

        Other countries also have their taxpayer identification numbers.

        Although some contries like USA, Canada etc do not require you to put the Customer's Tax ID on the invoice and receipt documents, some others like countries in the European Union (for the invoice to enties/businesses - VAT), Brazil (for the invoice to both individuals - CPF and entities - CNPJ) etc do.

        That feature (functionality) is already available in Stripe and Paypal API. We just need to enable it in their integration with UNA. Also we need to find a way to collect it from the member in the UNA platform (maybe as an input field from the profile creation page or the account edit page)

        Hope it makes sense now.


        • Yes, I understand. It needs though some clarification. Payment services do not collect data from form input fields in UNA. It collects data from its own checkout page which gets integrated in UNA with payments module, because that critical data has to be encrypted when it's sent back to their systems. By extending the services, for example with tax service, the form extends as well, with all the necessary data input fields the customer has to fill in once, in that case a field for tax id or company name, etc., which then gets automatically validated before it is sent back to the service payment provider and saved in their highly secured databases for your further use.

          • Thanks for your reply.

            Collecting the customer's Tax ID is the responsibility of the seller, not the payment gateway. It's the customer who has to provide it to the seller. It is done on the seller's website and stored in the database, usually via an Input field, not on the Payment gateway's checkout page.

            In the link I shared above, Stripe has clearly said:

            You’re responsible for the accuracy of customer information including their tax ID number. The invoice includes the customer tax ID whether or not it’s valid.

            If it had to be done on the checkout page, then members would have needed to enter it everytime they needed to order something.

            UNA platform already passes many information (Full name, email address, product name and ID etc) to the payment service provider services through the API integration. All those information are safely stored in the UNA database. So collecting and storing the customer's Tax ID in the database then passing it to the payment service provider should not be a big deal with UNA. That's what API is for.

            Please do not confuse the customer's account information stored on the seller's website (full name, billing address, email address etc) and which are passed to Payment service provider for the creation of the invoice and the receipt with the payment method information collected by the Payment Gateway on the checkout page (e.g. Name on the credit card, credit card number etc). They are two different sets of data.

            By the way, all the major social networks like Facebook, Twitter etc, coltect the customer's Tax ID on their platform using an input field and store it in their database.

            • Hello @OneEagle !

              The UNA payment integration does not incorporate the storage or utilization of taxes. This functionality will need to be implemented through custom integration.

              • Hi @LeonidS 

                Again, as I have already said it several times in my previous posts, this topic is not about utilizing, calculating or deducting Taxes in UNA. It's all about DISPLAYING the custumer's Tax ID on Invoice and Receipt documents

                Payment servive providers like Stripe already have this functionalty included/available in their API. All we need to do is to enable it in UNA integration with Stripe.

                If UNA can collect Customer's name, email addres etc using an input field, store them in the database then pass them to the Payment service provider via the API integration, why does it sound like a big deal to do the same with the customer's tax ID which is basically digits/numbers/letters? (e.g: 123456789)

                UNA is a versatile and universal platform. It is used internationally. Not all of us are running UNA for fun or as a hobby. Some of us are taking their UNA projects very seroulsly, meaning as a business.

                If you want to run a serious business and stay away from troubles with governments, you MUST act ethically and comply with the law. As I have already said in my previous posts, in many countries like countries in the European Union (Eu), Brazil etc, IT IS NOT PERMITTED to issue an invoice or receipt without displaying the Customer's Tax ID on it. It's the Law! (some require it to invoices and receipts issued to businesses/entities only, some require it to invoices and receipts issued to botth individuals and entities)

                UNA team would have thought about it when building the UNA invoice systemen and the UNA integration with Payment services Provider: Stripe, Paypal etc.

                @Anton L I would appreciate a solution to be provided by UNA, as this is something crucial that can end up getting many UNA-based businesses into serious troubes with the tax authorities.

                • Hi @Anton L, Please, would you mind answering and addressing this request? We definitely need to display the Customer's Tax Id on the Invoice and Receipt documents in order comply with the Law. Please!

                  • Collection of TaxID is done by gateway. UNA does not collect any payment related information and isn’t compliant to store it. In Stripe you can enable it on the Checkout stage

                    • The default for most countries for B2C and in some cases B2B payments is not to collect tax ID. We don’t collect it from our personal and business clients both for US and AU entities and stay compliant with accounting requirements.

                      • We can assist with Stripe setup configuration for Tailored setup as well if needed, but I should reiterate that collecting and storing tax ID in UNA database is not appropriate.

                        • The disadvantage of connecting to an online payment service is that everything in the connector function (stripe api v3) is (has to be) hardcoded. We users cannot change it to our individual needs without modifying the code. And when we do so, the next UNA update will require us to modify it again. We talked about a window into that array which configures the call for activating the necessary functions in Stripe, like payment methods, tax handling, and the like) here , but we did not get any further with that, since.

                          We'd need a possibility to configure those arrays of the service call, in order to change online payment services to our individual needs.

                          • Hi @Andrey Yasko, Thanks a lot for jumping in and sharing this valuable information and the link. It was all I needed. TBH, I didn't know that the Customer Tax Id, the Billing address etc could be collected from the Stripe checkout page. I have always thought that they have to be pulled from the UNA database.

                            @thomlin, I apologize for not understanding you. You were completely right on the Customer Tax ID being collected by the Stripe Payment provider on the Checkout page. The link you shared was in dutch, so I couldn't understand its content. I've managed to switch the language to english and I read it again. Thank you so much.

                            @Andrey Yasko, I couldn't agree more with what Thomlin said. The problem with manually adding the Payment settings and options into the code, because they are all hardcoded, is that we lose any change made to the BxPaymentProviderStripeV3.php file whenever there is an UNA update. We have to re-apply it again and again manually.

                            Not all of us are doing business in US and AU only, where displaying the Customer Tax ID on the Invoice and Receipt documents is not required. As I have already mentioned it in my previous posts, in Europe Union countries, Brazil and some other countries it's a MUST if you want to comply with the law. In EU, it's a requirement when it's B2B (Company to Company) and in some other countries like Brazil, it is required when it's both B2B (Company to Company) and B2C (Company to Customer/Individual).

                            Please, any chance to see the Customer Tax ID incorporated into the UNA file 'BxPaymentProviderStripeV3.php' by default to reflect on the checkout page (No more manual change into the code to enable it)? 

                            Or Please, could you add the option to enable/disable it from the Payment module settings in Studio? @Anton L

                            According to Stripe docs, this line should be added:

                              -d "tax_id_collection[enabled]"="true" \

                            The same applies to the different Payment Method Types offered by Stripe that also need to be manually enabled in the code because, them, too, are hardcoded.

                            'payment_method_types' => ['card'],

                            Please see Thomlin's thread about the Payment Method Types option being hardecoded here:

                            We would appreciate the ability to enable those Payment Method Types from Studio instead of manually editing the BxPaymentProviderStripeV3.php file, then loose all the changes when UNA updates.

                            Same with the 'Name' and the 'Billing Address' that also need to be displayed on the Invoice and Receipt documents:

                              -d "customer_update[name]"="auto" \
                              -d "customer_update[address]"="auto" \

                            For privacy, most of the time, people use nickname, sometimes even fake name and fake address for their social media presence. We should be able to collect their real name or business' legal name and billing adress on the checkout page to be displayed on the invoice and receipt documents.

                            Many thanks in advance for hearing us out! :)

                            • Hi @Anton L

                              Based on Andrey and Thomlin's explanations and the links they shared above, I would like to seek guidance from you.

                              Question #1:

                              On this page Stripe says:

                              You can enable tax ID collection on all payment and subscription mode Sessions

                              In the BxPaymentProviderStripeV3.php file, Line 585-591, there is the following session:

                               $aSession = array_merge([
                                          'payment_method_types' => ['card'],
                                          'customer_email' => !empty($aClient['email']) ? $aClient['email'] : '',
                                          'mode' => $sMode,
                                          'success_url' => '',
                                          'cancel_url' => '',
                                      ], $aParams);

                              My question is: Is this session for both: 'all payment' and 'subscription' mode or just for all payment mode only and there is another separate session for 'subscription' mode somewhere else? I would like to enable the Customer Tax ID for all the sessions.

                              Question #2:

                              What are the correct lines to add?

                              According to the example used by Stripe:

                                -d "tax_id_collection[enabled]"="true" \
                                -d "customer_update[name]"="auto" \
                                -d "customer_update[address]"="auto" \


                                'tax_id_collection[enabled]' => 'true',
                                'customer_update[name]' => 'auto',
                                'customer_update[address]' => 'auto',

                              The way things are in the BxPaymentProviderStripeV3.php file.

                              I would also like to collect the Real name or Business' legal name and the Billing address to be display on the invoice and receipt documents.

                              Thanks in advance for helping.

                              • Following this. Thanks @OneEagle . I should get this done too.

                                  • thomlin, I apologize for not understanding you. You were completely right on the Customer Tax ID being collected by the Stripe Payment provider on the Checkout page. The link you shared was in dutch, so I couldn't understand its content. I've managed to switch the language to english and I read it again. Thank you so much.

                                    No problem, my friend. We are all sitting in the same boat, trying to paddle in the same direction on this torrential river.

                                    • Dear @Anton L

                                      Please, would you mind helping me to enable the Customer Tax ID, the Name and the Billing address on the checkout page, please?

                                      We need to collect them and display them on the Invoice and Receipt documents in order to comply with the Law.

                                      Have you seen my questions above?



                                      • Hello

                                        > Question #1:

                                        Yes, this Create Session method is used for both single and recurring payments.

                                        > Question #2:

                                        You need to add the following code

                                        'tax_id_collection' => [
                                            'enabled' => true,
                                          'customer_update' => [
                                            'name' => 'auto',
                                            'address' => 'auto',

                                        just before this one in BxPaymentProviderStripeV3.php file:

                                        'mode' => $sMode,
                                        'success_url' => '',
                                        'cancel_url' => '',
                                        • Dear @Anton L

                                          Thanks for your reply. Your complete silent for weeks (almost a month) since we started this topic was just overwhelming. I felt ignored and even started thinking maybe you were mad at me. Sorry if I had said something wrong. This topic really matters to us as we definately need to comply with the law.

                                          Thank you so much for providing me with the answers to my questions. I will apply the modification and see how it works.

                                          One again, thanks.

                                          • Hello @OneEagle

                                            I'm sorry for the delay, I was overloaded. I hope my answer will help you to resolve the problem. Good Luck!

                                            P.S. If sometimes you'll ask me something like this (question about payments or so) and I don't answer then ping me a message via Messenger to let me know that I need to find some time to answer.

                                            Login or Join to comment.