web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Gift card numbers may not exceed 30 characters

(1) ShareShare
ReportReport
Posted on by 66

Hi all,

We are working with the Store Commerce app and have a custom payment connector for external gift cards. Now we notice that in the gift card dialog there is a limitation on the length of a gift card. Apparently it does not accept gift card numbers which are longer than 30 characters. The UI of the Store commerce app gives back the following error:

"Gift card numbers may not exceed 30 characters."

In the meanwhile I know how to develop a payment connector, but I'm new to making customizations to the POS. Can someone help me or point me in the right direction about what to extend or customize to make it possible to enter gift cards longer than 30?

Thx in advance!

Capture.PNG
Categories:
I have the same question (0)
  • Suggested answer
    Assisted by AI
    ANInnoSolutions Profile Picture
    516 on at
    Hi Mica,
     
    1) Issue
    - In Store Commerce (D365 Commerce), entering a gift card number longer than 30 characters triggers an error: "Gift card numbers may not exceed 30 characters."  
    - The limitation occurs in the POS UI during gift card entry (as shown in the screenshot)  
    - A custom payment connector is already implemented, but the POS blocks longer values before reaching the connector  
    - Requirement is to allow gift card numbers longer than 30 characters  
     
    2) Reason
    - The limitation is enforced in the POS client (Store Commerce App), not in the payment connector  
    - From the screenshot stack trace, the error originates from:
      - CommerceError  
      - AddIssueGiftCardDialog.updateCardNumber  
    - This confirms, that the validation is implemented in POS UI logic (TypeScript / POS SDK layer), what is typically hardcoded in:
      - Gift card dialog controls  
      - POS input validation utilities  
     
    Additionally:
    - The length limit is aligned with:
    - Backend entities (channel DB / HQ tables)  
    - Gift card number fields are often defined with:
    - max length = 30 characters  
     
    Therefore:
    - Even if UI is extended, backend constraints may still reject longer values  
    - This is a cross-layer constraint:
    - POS UI  
    - CRT (Commerce Runtime)  
    - Channel DB schema  
    - HQ data model  
     
    3) Resolution
    Standard capability:
    - There is no configuration parameter to increase gift card number length  
    - The 30-character limit is part of standard Commerce design  
    - Customization approach (required):
     
    Step 1: POS extension (mandatory)
    - Extend or override:
    - AddIssueGiftCardDialog or relevant input control  
    - Remove/adjust validation:
    - Increase allowed length beyond 30  
    - Implement via POS extension package (TypeScript)
     
    Step 2: CRT (Commerce Runtime)
    - Validate whether:
    - Gift card APIs accept longer values  
    - If not:
    - Extend CRT to support longer strings in request/response handling  
     
    Step 3: Channel DB + HQ (critical)
    - Check database schema:
    - Gift card number field length (e.g., nvarchar(30))  
    - If limited → must extend:
    - Channel DB table schema  
    - Data entities  
    - HQ tables if applicable  
     
    Step 4: End-to-end validation
    - Verify flow:
    - POS → CRT → Channel DB → HQ → payment connector  
    - Ensure no truncation occurs at any stage  
     
    Important considerations:
    - This is high-impact customization:
    - Affects data model + UI + integration and requires:
    - Full regression testing  
    - Upgrade impact assessment  
     
    Alternative recommendation:
    - Instead of increasing length:
    - Implement mapping layer in payment connector:
    - Convert long external gift card number → shorter internal token (≤30 chars)  
    - Maintain mapping externally  
    - This avoids: Deep platform customization  
     
    Conclusion
    - The 30-character limit is hardcoded and systemic, not configurable  
    - To extend it, changes are required across:
    - POS UI  
    - CRT  
    - Data model  
    - Best practice: use mapping/tokenization approach unless full customization is justified
     
    For a more detailed answer, please provide more information.
     

    Rg,

    Alexander

    *Due to the complex and different possibilities of deploying Dynamics 365 I highly recommend not to setup the application without some expert/partner or support. (For more information contact me under anassl@inno-solutions.info or visit www.inno-solutions.de)

    *The Information comes directly from the manufacturer or provider and are validated (not guaranteed) up to date of creation of the posting.

    References:

    1. Microsoft Licensing Guide
    2. Microsoft Doc`s/Learn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 151 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 106 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans