Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

EFT Attachment on Sales Order for Versapay Transactions

(5) ShareShare
ReportReport
Posted on by 51
Hi Community,
I have been using ODataV4 WS for attaching EFT transactions on the Sales orders. The payments happen in Versapay/Chargelogic gateway.

Here is the process:
1. Collect payment in versapay gateway at the point of sale. This generates a 12 digit order number in versapay.
2. Sales Order is created in BC with all the necessary fields, all sales lines are created. Sales Order creation is complete.
3. Attach EFT and release the sales order. I write the Versapay Orde No. from step 1 to Your_Reference field in Sales Order and mark the SO released.
 
Step 3 takes for ever where as it should take 1-3 seconds. I have even tried attaching EFT in separate PUT request and no success there. This was working fine and we haven't made any changes to code.
When enquired with Versapay, they suggested checking saved cards/payment accounts on the customer record as BC might be scanning through all the saved cards before attaching EFT(Not sure why this needs to happen as we are not storing ecommerce cards for every order on the customer record, we save only the cards for direct orders). There are a few saved cards but the result is inconsistent meaning some EFTs get attached very quick though they have more cards saved on the customer record compared to the one's taking longer time.
 
Here is the error response that I get from BC after FET fails to attach:
error: {
    code: 'RequestTimeout',
    message: 'The operation has been canceled because it took longer to generate rows than the specified threshold (00:08:00). Refine your filters to include less data and try again.  CorrelationId:  ed990398-50>
  }
 
I totally understand the message but this issue has been in-consistent. For the same order, if I try pushing the SO again, it successfully attaches EFT.
 
Please provide any information or feedback on where to look as I am still working with versapay team in debugging the issue.
 
Thanks,
Kishore.
  • Kishore22 Profile Picture
    51 on at
    EFT Attachment on Sales Order for Versapay Transactions
    It was the "Saved Cards Lookup Delay"
     
    Had to un-check the checkbox in BC which says Save Card on customer.
     
  • Verified answer
    Saif Ali Sabri Profile Picture
    1,390 Super User 2025 Season 1 on at
    EFT Attachment on Sales Order for Versapay Transactions
    Possible Causes & Solutions:
    1. Database Performance Issues
      • Check BC Performance: Run performance monitoring on Business Central to see if database queries are slow.
      • Try a Different Endpoint: Instead of OData, test the API/V2 endpoint for better performance.
    2. Saved Cards Lookup Delay
      • Test with a Customer with No Saved Cards: If the EFT attachment is faster, then saved cards might be causing delays.
      • Optimize Data Retrieval: If BC is scanning saved cards, check if a background process or unnecessary validation is triggered.
    3. Concurrency & Locking
      • Retry Logic: If resending the request works, it could be a locking issue. Implement a short delay and retry mechanism.
      • Check Background Jobs: Ensure there are no conflicting background jobs (like payment sync or batch processing).
    4. OData Request Optimization
      • Filter Data Efficiently: Reduce unnecessary fields in your request to limit data retrieval load.
      • Use Batch Requests: Instead of multiple individual PUT requests, consider batching them.
    5. Business Central Timeout Threshold
      • Increase Timeout: If possible, increase OData execution timeout settings.
    Next Steps:
    • Test without saved cards → If faster, optimize card lookup.
    • Try API/V2 instead of ODataV4 → OData might be inefficient for large data.
    • Check background processes & locks → Look for conflicts.
    • Enable telemetry in BC → Identify slow queries in Azure Application Insights.
    Would you like specific guidance on logging and telemetry setup?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,309 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,162 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans