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

Notifications

Announcements

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)
  • Gerardo Rentería García Profile Picture
    25,525 Most Valuable Professional on at
    Hi
    I hope this can help you and give you some hints.
    BR
    GR
  • Aaron Bauldree Profile Picture
    19 on at

    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.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,167

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,184

#3
YUN ZHU Profile Picture

YUN ZHU 1,161 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans