API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

[solved] Setting payment type

I'm creating creditor invoice via the API, on this invoice there is X amount of ICashBookEntry's.
When I create the ICashBookEntry, I would like to set the paymenttype to Bank Transfer and set the message for the bank transfer.
I've marked the fields that is shown in E-Conomic:

Best Regards
Dennis Dupont
created Apr 26, 2012 by wsd
0% Accept Rate
Q 2 A 2 C 0

4 Answers


1. Retrieve all payment types using session.BankPaymentType.GetAll().
2. Pick out the one representing the bank transfer
3. Call .SetRemittanceInformation() on your CashBookEntry, specifying the payment type found in (2), as well as the supplier ID (in this case, a bank account number) and payment ID (in this case the message).

Best regards,
answered Apr 27, 2012 by Christian Estrup
Thank you it worked.

And to help others here is the code:
(It's in VB)

Dim theBook As ICashBook = sessionCashBookGetAll()(0)
Dim c As ICreditor = sessionCreditorFindByNumber(creitor_id)
Dim b As String = lineProductBarCode
'We use the products barcode, to save the account
Dim a As IAccount = sessionAccountFindByNumber(b)
Dim icb As ICashBookEntry = sessionCashBookEntryCreateCreditorInvoice(theBook, c, a)

icbDueDate = DateNowAddDays(cTermOfPaymentDays)
icbSetRemittanceInformation(cDefaultPaymentType, cDefaultPaymentCreditorId, Text to bankpayment)
answered May 22, 2012 by wsd
Hi wsd and christian,

My question is not really a dev one, and i appologize for this in advance but it is related to...

I'd like to know how to display this payment type drop down list in cash entry registration in the UI.
I need to do the same as you wsd using the API but first I did not find how to do it using the UI.
In addition to that: how can we configure those payment types if possible?

I activated every modules but cannot get it.

Thanks for your help on this.

Best regards
answered Jun 12, 2012 by GuCa
Hi all,

I found the answer but did not have time to post it.

Here is how you get payment types:

Please note that name are in english.
answered Jan 25, 2013 by GuCa
Visma e-conomic A/S