Fatura app for Shopify
Add a buyer TRN field to your Shopify cart (UAE)
To collect a customer's TRN in a UAE Shopify store, install the Fatura app and add its Buyer TRN (Fatura) block to your cart page, plus the cart drawer embed if your theme uses a drawer. Business buyers then see an optional "Company TRN" field in the cart. A valid 15-digit TRN is saved on the cart as the attribute buyer_trn, stays with the order, and when the order is paid Fatura Go issues a full tax invoice with the buyer's TRN on it.
Last updated:
Company TRN (optional)
Buying for a VAT-registered business? Enter its 15-digit TRN to get a full tax invoice.
الرقم الضريبي للشركة (TRN) (اختياري)
تشتري لنشاط تجاري مسجّل في ضريبة القيمة المضافة؟ أدخل رقمه الضريبي المكوّن من 15 رقمًا لتحصل على فاتورة ضريبية كاملة.
What is the buyer TRN field?
It is an optional "Company TRN" field that the Fatura app adds to your Shopify cart page and cart drawer, so a buyer shopping for a VAT-registered business can enter its 15-digit TRN and get a full tax invoice with that TRN. Nothing shows until you add the block or turn on the embed in your theme.
The buyer's TRN is saved on the cart as the attribute buyer_trn and reaches the order with it. When the order is paid, the app reads the TRN, checks it is 15 digits and not all zeros, and the invoice for that order becomes a full tax invoice with the buyer's TRN. Which invoice a buyer needs is explained in tax invoice vs simplified tax invoice.
What does the buyer see?
The buyer sees the label "Company TRN" marked (optional), the example 100-0000-0000-0000 inside the empty field, and the line "Buying for a VAT-registered business? Enter its 15-digit TRN to get a full tax invoice." under it. The field takes digits only, up to 15, and groups them as they type, as in 100-1234-5678-9012. A pasted TRN with spaces or dashes is cleaned the same way.
On an Arabic storefront the label (الرقم الضريبي للشركة (TRN)), help line, checkbox and messages are in Arabic and the field follows the right-to-left layout, while the TRN itself stays left to right.
The TRN is saved half a second after the buyer stops typing and when they leave the field; going to checkout waits for that save. A line under the field tells the buyer what happened:
| Buyer enters | Saved? | Message (English / Arabic) |
|---|---|---|
| 15 digits starting with 100Success | Yes | TRN added. It will be on your tax invoice.أُضيف الرقم الضريبي. سيظهر في فاتورتك الضريبية. |
| 15 digits not starting with 100Warning | Yes | TRN added. Most UAE VAT TRNs start with 100 — please check the number.أُضيف الرقم الضريبي. تبدأ معظم الأرقام الضريبية الإماراتية بـ 100 — يُرجى التحقق من الرقم. |
| Fewer than 15 digits, after leaving the fieldError | No, a saved TRN is removed | A TRN has 15 digits. This one has 12.يتكوّن الرقم الضريبي من 15 رقمًا. عدد الأرقام المُدخلة: 12. |
| All zerosError | No, a saved TRN is removed | This TRN isn't valid. Check the number on the VAT certificate.هذا الرقم الضريبي غير صالح. تحقّق من الرقم في شهادة التسجيل الضريبي. |
The "too short" message shows the number of digits typed and appears once the buyer leaves the field, not while they type. Clearing the field removes the TRN from the cart. The field checks the format only; to check a TRN on the FTA register, use the TRN checker.
How do I add the TRN field to my Shopify cart?
Add the Buyer TRN (Fatura) block to the cart template in the theme editor, and turn on the cart drawer embed if your cart opens in a drawer. The Fatura app's Home shows "Add the TRN field to your cart" with buttons that open both places.
Install the Fatura app
Install the Fatura app from the Shopify App Store and finish setup, so paid orders get their invoices.
Open the cart template in the theme editor
In Shopify, go to Online Store → Themes → Customize and open the Cart template. Or, in the Fatura app's Home, open "Add the TRN field to your cart" → Add the field → Add to cart page, which opens it for you.
Add the Buyer TRN (Fatura) block
Choose Add block and pick Buyer TRN (Fatura).
Move it under the cart items
Drag the block right under your cart items, near the checkout button. On some themes, such as Dawn, it first appears at the bottom of the page, under "You may also like".
Turn on the cart drawer embed
If your theme opens the cart in a drawer, turn on Buyer TRN in cart drawer (Fatura) under App embeds. The Fatura app's "Turn on for cart drawer" button opens it.
Save the theme
Press Save. The field takes the font and colours of your theme.
The field uses your theme's own form styles: on Dawn, Horizon and themes built on them it gets their input font, size, colours and borders, and on other themes it inherits the font and text colour. In the cart drawer, the field goes at the top of the drawer's footer and comes back whenever the drawer redraws. If it doesn't show in your drawer, set the embed's Drawer location to a CSS selector for the drawer's footer.
Which settings does the TRN field have?
The cart page block (Buyer TRN (Fatura)) and the cart drawer embed (Buyer TRN in cart drawer (Fatura)) each have these settings, set separately. Arabic names are what the theme editor shows in Arabic.
| Setting | Default | What it does |
|---|---|---|
| Field labelعنوان الحقل | Empty | The text above the field. Leave it empty to show "Company TRN" in your store's language (الرقم الضريبي للشركة (TRN) in Arabic). |
| Show the line explaining what the TRN is forإظهار السطر الذي يشرح سبب طلب الرقم الضريبي | On | The help line under the field: "Buying for a VAT-registered business? Enter its 15-digit TRN to get a full tax invoice." |
| WidthالعرضOptions: Full width, Fit the TRN | Fit the TRN on the cart page, Full width in the cart drawer | Whether the field takes the full width or is just wide enough for a TRN. |
| AlignmentالمحاذاةOptions: Start, Center, End | Start | Start is the left side, or the right side on Arabic storefronts; End is the opposite side. |
| Space aboveالمسافة أعلى الحقلOptions: 0 to 64 px, in steps of 4 | 0 px | Space between the field and what sits above it. |
| Space belowالمسافة أسفل الحقلOptions: 0 to 64 px, in steps of 4 | 16 px | Space between the field and what sits below it. |
| Placeholderالنص الإرشادي داخل الحقل | Empty | The example inside the empty field. Leave it empty to show 100-0000-0000-0000. |
| Ask first: buying for a company?اسأل أولًا: هل الشراء لشركة؟ | Off | Buyers first see a checkbox, "I'm buying for a VAT-registered business". The TRN field shows once it's ticked; unticking removes the TRN from the cart. |
| Show only to buyers shopping from the UAEإظهاره فقط للمشترين من الإمارات | Off | Uses the country the buyer picked in your store. Buyers shopping from another country don't see the field, and a TRN already in their cart is removed. Use the same choice for the cart page block and the cart drawer. |
The cart drawer embed has one more setting, Drawer location (optional): Leave it empty for most themes. If the field doesn't show in your cart drawer, enter a CSS selector for the drawer's footer.
With "Ask first: buying for a company?" on, the buyer sees the checkbox "I'm buying for a VAT-registered business" (أشتري لنشاط تجاري مسجّل في ضريبة القيمة المضافة), and once ticked the field shows without the "(optional)" mark and with the help line "Enter its 15-digit TRN to get a full tax invoice." If the cart already has a TRN, the box starts ticked.
Where does the buyer's TRN go after checkout?
The TRN stays on the Shopify order as the attribute buyer_trn, and the Fatura app puts it on the order's invoice when the order is paid. The TRN the buyer enters in the cart for an order is the one printed on that order's tax invoice. If the buyer leaves the field empty, the TRN saved on the customer in Fatura Go, if there is one, is used. Entering a TRN in the cart does not change the customer record in Fatura Go.
For a VAT-registered store, an order with a valid buyer TRN gets a full tax invoice with the buyer's TRN; without one it gets a simplified tax invoice, unless the total is over AED 10,000. The app also reads a TRN you collect another way: an order note attribute named trn or tax_registration_number, or "TRN:" and the number in the order note. An issued invoice can't be edited: if the TRN reaches you after the invoice is issued, issue a credit note and a corrected invoice in Fatura Go.