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)

100-0000-0000-0000

Buying for a VAT-registered business? Enter its 15-digit TRN to get a full tax invoice.

الرقم الضريبي للشركة (TRN) (اختياري)

100-0000-0000-0000

تشتري لنشاط تجاري مسجّل في ضريبة القيمة المضافة؟ أدخل رقمه الضريبي المكوّن من 15 رقمًا لتحصل على فاتورة ضريبية كاملة.

The field with its default settings on an English and an Arabic storefront. On your store it takes your theme's font and colours.

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 entersSaved?Message (English / Arabic)
15 digits starting with 100SuccessYesTRN added. It will be on your tax invoice.أُضيف الرقم الضريبي. سيظهر في فاتورتك الضريبية.
15 digits not starting with 100WarningYesTRN added. Most UAE VAT TRNs start with 100 — please check the number.أُضيف الرقم الضريبي. تبدأ معظم الأرقام الضريبية الإماراتية بـ 100 — يُرجى التحقق من الرقم.
Fewer than 15 digits, after leaving the fieldErrorNo, a saved TRN is removedA TRN has 15 digits. This one has 12.يتكوّن الرقم الضريبي من 15 رقمًا. عدد الأرقام المُدخلة: 12.
All zerosErrorNo, a saved TRN is removedThis 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.

  1. Install the Fatura app

    Install the Fatura app from the Shopify App Store and finish setup, so paid orders get their invoices.

  2. 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.

  3. Add the Buyer TRN (Fatura) block

    Choose Add block and pick Buyer TRN (Fatura).

  4. 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".

  5. 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.

  6. 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.

SettingDefaultWhat it does
Field labelعنوان الحقلEmptyThe 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إظهار السطر الذي يشرح سبب طلب الرقم الضريبيOnThe 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 TRNFit the TRN on the cart page, Full width in the cart drawerWhether the field takes the full width or is just wide enough for a TRN.
AlignmentالمحاذاةOptions: Start, Center, EndStartStart 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 40 pxSpace between the field and what sits above it.
Space belowالمسافة أسفل الحقلOptions: 0 to 64 px, in steps of 416 pxSpace between the field and what sits below it.
Placeholderالنص الإرشادي داخل الحقلEmptyThe example inside the empty field. Leave it empty to show 100-0000-0000-0000.
Ask first: buying for a company?اسأل أولًا: هل الشراء لشركة؟OffBuyers 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إظهاره فقط للمشترين من الإماراتOffUses 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.

Common questions

Do buyers have to enter a TRN?
No. The field is optional and the label says so. Buyers who leave it empty check out as usual; for a VAT-registered store their order gets a simplified tax invoice, or a full tax invoice if the total is over AED 10,000.
Does the TRN field work in a cart drawer?
Yes. Turn on the app embed "Buyer TRN in cart drawer (Fatura)" under App embeds in the theme editor. The field goes at the top of the drawer's footer and comes back each time the drawer redraws. If it doesn't show on your theme, enter a CSS selector for the drawer's footer in the embed's Drawer location setting.
Is the TRN field in Arabic?
Yes. On an Arabic storefront the label, help line, checkbox and messages are in Arabic and the field follows the right-to-left layout; the TRN itself stays left to right. Start alignment is the right side on Arabic storefronts. The block's settings have Arabic names too.
What happens if a buyer enters a wrong TRN?
Only a valid TRN, 15 digits and not all zeros, is saved. With fewer digits the buyer sees "A TRN has 15 digits" and how many they typed; all zeros shows "This TRN isn't valid". In both cases nothing is saved, and a TRN saved before is removed. A TRN that doesn't start with 100 is saved with a warning to check the number. The field checks the format only; to check a TRN on the FTA register, use the TRN checker.
Do consumers see the TRN field?
Everyone who opens the cart sees it, marked optional. To keep it out of the way, turn on "Ask first: buying for a company?" so buyers see a checkbox first, or "Show only to buyers shopping from the UAE". Buyers who pay with Buy it now, Shop Pay or Apple Pay buttons skip the cart and don't see the field.
Which Shopify themes does the TRN field work with?
The cart page block goes into the theme's cart template, and the drawer embed finds the cart drawer of common themes or the spot you name. The field uses your theme's own form styles, so on Dawn, Horizon and themes built on them it gets their font, size, colours and borders. It works on every Shopify plan.
Where does the buyer's TRN show up after checkout?
On the order, as the attribute buyer_trn. When the order is paid, the Fatura app reads it and issues a full tax invoice with that TRN: 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. If the TRN arrives after the invoice is issued, issue a credit note and a corrected invoice in Fatura Go.

Give business buyers a place for their TRN

Install the Fatura app from the Shopify App Store, add the Buyer TRN (Fatura) block to your cart, and orders with a buyer TRN get a full tax invoice with it.