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 :
Small and medium business | Business Central, N...
Answered

Can't able to Get Customer Payment through API v2.0

(1) ShareShare
ReportReport
Posted on by 20
I can't able to find customer payment through this api :
https:/api.businesscentral.dynamics.com/v2.0/{{TeantID}}/{{env_name}}/api/v2.0/companies({{company_id}})/customerPayments


giving me value empty :
{

    /@odata.context/: https:/api.businesscentral.dynamics.com/v2.0/{tenant} /{env}/api/v2.0/$metadata#companies({com-id})/customerPayments/,
    /value/: []
}

But see i have 2 records there.
How can i get those 2 records using API v2.0?


I have the same question (0)
  • YUN ZHU Profile Picture
    98,416 Super User 2026 Season 1 on at
    Hi, Try adding SystemId?
     
     
    Hope this can give you some hints.
    Thanks.
    ZHU
     
  • Kanta Profile Picture
    20 on at
    Thank you for your guide, Mr. YUN ZHU.
    I actually tried putting system id in URL like this /customerPayments({systemId})
    but I am getting error resource not found.
    I'm not getting it, why I can't get those record, or how should I approach to get those records?


  • Verified answer
    YUN ZHU Profile Picture
    98,416 Super User 2026 Season 1 on at
    Hi, Sorry, it looks like you are doing it right. However, Microsoft has filtered the results. The following three conditions must be met to obtain them from the standard API.
     
    Two Examples:
    https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox241/api/v2.0/companies(938320db-e10b-ef11-9f8d-6045bdacaf36)/customerPaymentJournals?$expand=customerPayments
     
    https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox241/api/v2.0/companies(938320db-e10b-ef11-9f8d-6045bdacaf36)/customerPayments?$filter=journalId eq 587cf070-a414-ef11-9f88-000d3a50c332 and id eq f7afd139-4621-ef11-9f88-00224868ce08
     
    PS: When taking values ​​directly, you must add at least one filter.
     
    Hope this helps.
    Thanks.
    ZHU
  • Kanta Profile Picture
    20 on at
    Thanks a lot YUN ZHU,
    can you do me one more favor please.

    when i'm posting cash recipt journal record my webhook give me response like this.
    But as the line is posted, it got delete from customerPayments, so i can't get the relevent information about the customerPayment. i need to know which customer has paid on which invoice. 
    how can i get the information?
  • Suggested answer
    YUN ZHU Profile Picture
    98,416 Super User 2026 Season 1 on at
    As far as I know, it's not possible with the standard API.
    There are generally two ways to do this:
    1. Let the API return the results you need: As of now, the standard API is not extensible
    2. Find the records in the posted table: There are two tables to look at. But neither has a standard API.
     
    Hope this helps.
    Thanks.
    ZHU

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!

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 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans