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

Community site session details

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

Fetching Posted Payments - API/Odata

(1) ShareShare
ReportReport
Posted on by
I've been trying to fetch all posted payments using the V2 Apis.

The /customerpayments and /vendorpayments endpoint return only the draft payments (journal lines).
I am now trying to fetch the posted payments from the VendorLedgerEntries and Cust_LedgerEntries endpoints using Odata but i only get the contact and invoice document numbers. Is there any way from which i can directly get the posted payments with the proper contact and invoice platform unique id.

If not possible, how can i create a custom web service to fetch the posted payments.
I have the same question (0)
  • Aaron Bauldree Profile Picture
    19 on at
    Fetching Posted Payments - API/Odata

    To fetch posted payments via API, you're looking in the right place by checking the Customer Ledger Entries. While I'm not familiar with the exact data on that page, I can share my experience with custom API pages for similar data.

    If you need more details about the Customer and Invoice for each payment, you have a couple of options:

    1. Request Ledger Entries and Loop Through: You can request the Ledger Entries and then loop through them, making separate API calls to fetch the customer and invoice details. While this method works, it can be somewhat heavy and less efficient.

    2. Create a Custom API Page: A better approach would be to expand the custom API page for the Customer Ledger Entries to include the necessary fields from the Customer and Invoice tables. Once you've created this custom page in BC, you can publish it as a Web Service.

    By creating a custom API page, you can directly get the posted payments with the proper contact and invoice platform unique IDs.

  • Gerardo Rentería García Profile Picture
    22,524 Most Valuable Professional on at
    Fetching Posted Payments - API/Odata
    Hi
    I hope this can help you and give you some hints.
    BR
    GR

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans