Skip to main content
Business Central forum
Suggested answer

Create payment with g/l account by business central rest api

editSubscribe (1) ShareShare
Posted on by 11
In web UI of business central on page Payment Journals we can create new entries. One of column for fill up is /Account Type/. Here, among other we can select option /G/L Account/. 
I'm trying to find a way how to create payment in payment journal with account type g/l account. I found endpoints /vendorPaymentJournals and indeed - GET /vendorPaymentJournals is returning list of payment journal batches. Problem i have now is inside that endpoint namespace can see only endpoint /vendorPaymentJournals(:journal_id)/vendorPayments which is returning ONLY entries with account type vendor. How I can - using API - create and fetch entries with other account type than vendor ?
-- edit
I found that payment journal entries with g/l account type can be created by using just POST /jounals(:journal_id)/journalLines endpoint. But unfortunately here i cannot define paymentMethodId nor documentType. 
Recap is: I need to create following entry in payment journal:
Document type: Payment
Account type: G/L account
G/L account no: (one of my gl account here)
Payment method code: (one of my payment methods here)
How I should approach that problem ?
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,926 Super User on at
    Create payment with g/l account by business central rest api
    Hi, the only standard API that can be used is journalLines.
    But if there are insufficient fields, unfortunately, as of now, you can only customize a new API page.
    More details: Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans