Sales payments' handling functions are divided into the following resources:

IntegrationHTTP-methodResourceDTDSchemaExample
Get sales payment listGETsalespaymentlist.nv  Download
Import sales paymentPOSTsalespayment.nvsalespayment.dtd Download
Delete sales paymentPOSTdeletesalespayment.nv 
-
Deleted sales paymentsGETdeletedsalespayments.nv


Mass posting for sales paymentsPOSTmasspayments.nv

Download
Sales payment targeting
POSTmatchpayment.nv
matchpayment.xsdDownload
Get purchase payment listGETpaymentlist.nv masspayments.xsdDownload
Deleted purchase paymentsGETdeletedpurchasepayments.nv


Get unprocessed outgoing paymentsGETunprocessedoutgoingpayments.nv  Download
Import bank transferPOSTpayment.nv payment.dtd Download

Get sales payment list

Recourse: salespaymentlist.nv

Querystring parameters:

Parameter nameOccursDescriptionExample
abovenetvisorkey0...1Return only sales payment above given id123
begindate0...1 Return only sales payments with date after defined value2021-10-23
enddate0...1 Return only sales payments with date before defined value2021-10-24
searchbyname0...1 Return only sales payments with given name 
limitlinkedpayments0...1 Limits based on linked invoices
0 - payment doesn't have invoice linked to it
1 - payment has invoice linked to it
1
limitbytype0...1Limits based on payment type
onlycreditloss - lists only credit loss
excludecreditloss - lists all but credit loss
excludecreditloss
lastmodifiedstart0...1Returns sales payments that have been changed since the given date. Given as yyyy-MM-ddTHH:mm:ss 2021-12-10 12:00:00
lastmodifiedend0...1Returns sales payments that have been changed before the given date. Given as yyyy-MM-ddTHH:mm:ss2021-12-10T12:00:00
invoicenetvisorkey0...1Returns sales payments related to a specific sales invoice by the given sales invoice's NetvisorKey123
invoicenumber0...1Returns sales payments related to a specific sales invoice by the given sales invoice's invoice number
45876

Response:

LevelElement nameType and lengthOccursDescriptionExample
RootRootAggr.1  
1SalesPaymentListAggr.1  
2SalesPaymentAggr.0...n  
3NetvisorKeyNumeric1Sales payment identifier in Netvisor123
3NameString
1Name of the payment 
3DateDate1Date of the payment 
3SumNumeric1Sum of the payment 
3ReferenceNumberString1Reference number of the payment 
3ForeignCurrencyAmountNumeric1  
3InvoiceNumberString1Invoice number 
3PaymentAccountNameString1Name of the bank/payment methodcash
3
VoucherID
Numeerinen
1
Voucher's NetvisorKey
44
3
LastModifiedTimestamp
Merkkijono
1
The last time the voucher was modified
7.10.2021 14:24:42
3PaymentAccountNumberString
1Account number if payment from bankFI12 3456 xxx
3BankStatusString1OK or FAILEDOK
3BankStatusErrorDescriptionString0...1Description of error 
Attr.codeString0...1Error code, see below  

Bank status error codes:

NO_ACCOUNT_FOUNDAccount was not found
NO_PAYMENT_SERVICE_ACCOUNTAccount is not for payments
ERROR_IN_DUE_DATEDuedate is incorrect
BALANCE_IS_EXCEEDEDBalance is not sufficient
PAYER_HAS_CANCELEDPayer cancelled payment
FORM_NOT_CORRECTFormal error
BANK_HAS_CANCELLEDBank cancelled operation
CANCELLATION_NOT_CLEARING 
AUTHORIZATION_IS_MISSINGAuthorization is missing

Import sales payment

Recourse: salespayment.nv

Importing a sales payment into Netvisor.

Sales invoice must exist before payment can be connected to it. If payment has been imported before invoice, payment will not be targeted to invoice automatically.

If the sales invoice, that the payment is targeted to, allows partial payments the payment is always added. If not, the payment must fit within the cash discount tolerance of the invoice.

If sales payment is imported to an unsent sales invoice, the sales invoice must accept partial payments in order for sales payment to connect to the right invoice. If sales invoice is imported using Web Service interface, the sales invoice message should have element "expectPartialPayments" and if the sales invoice is created in Netvisor, the setting can be done in Basic data of sales.

It is possible to import sales payment to a sales order as an prepayment. When sales invoice is created from the sales order, the prepayment is transferred to the sales invoice as an sales payment. If the amount of the sales payment cover the entire sales invoice, the status of the sales invoice will automatically be "Paid". Note that when the sales payment for the sales order is prepayment, the attribute "overridesalesreceivableaccountnumbermust be given in the element "paymentmethod". The account should be same as which is set in Netvisor's default prepayment account.

Request:

LevelElement nameType and lengthOccursDescriptionExample
RootrootAggr.1  
1salespaymentAggr.1  
2sumNumeric1Sale payment sum10,00
Attr.currencyString
1Currency code. If not found in the system, will return INVALID_DATA and defenition. Default EUREUR
2paymentdateDate1Date of the payment2021-10-12
2targetidentifierString1Identifier that is used to connect payment to invoice1070
Attr.typeString1Type of targetidentifier:
netvisor
when the identifier is invoice id in Netvisor
invoicenumber when identifier is number of invoice
reference when identifier is reference number of invoice
netvisor
Attr.targettypeString0...1Target of payment, invoice or orderorder
2sourcenameString1Name of the payment sourcePekka Pajanen
2paymentmethodString 1Payment method. Payment method name or bankaccount number have to be found from target company's Netvisor environment.pankkikortti
Attr.typeString 1Indicates paymentmethod type alternative or bankaccountalternative
Attr.overrideaccountingaccountnumberNumeric0...1Account number to override in voucher. If not found, system will return INVALID_DATA1900
Attr.overridesalesreceivableaccountnumberNumeric0...1Voucher payment account number override2100
2salespaymentvoucherlinesAggr.0...n  
3voucherlineAggr.1...n  
4linesumNumeric1Line sum10,00
Attr.typeString1Line sum type: net (VAT is not included) or gross (VAT is included)gross
4descriptionString0...1Line descriptionSales event
4accountnumberNumeric 1Accounting account number for line1500
4vatpercentNumeric 1VAT percent24
Attr.vatcodeString 1VAT code *1KOMY
4dimensionAggr.0...n  
5dimensionnameString1Name of the dimensionKäteiskauppa
5dimensionitemString1Name of the dimension item.Myynti

*1) NONE, KOOS, EUOS, EUUO, EUPO, 100, KOMY, EUMY, EUUM, EUPM312, EUPM309, MUUL, EVTO, EVPO 

VAT-classVAT-codeVAT-percent
No VAT processingNONE0
Domestic salesKOMY0, 10, 14, 24
EU salesEUMY0
Sales outside the EUEUUM0
Domestic purchaseKOOS0, 10, 14, 24
EU purchaseEUOS0, 10, 14, 24
EU service purchase EUPO0, 10, 14, 24
Non - EU purchasesEUUO0, 10, 14, 24
100% deductible tax1000
312 EU service salesEUPM3120
309 EU service salesEUPM3090
Other turnover excluding VAT (310)MUUL0, 10, 14, 24
Purchases of goods from other EU countries, non-deductibleEVTO0, 10, 14, 24
Purchases of services from other EU countries, non-deductibleEVPO0, 10, 14, 24
Sale of construction servicesRAMY0
Purchase of construction serviceRAOS0, 10, 14, 24
Non-deductible purchase of construction serviceEVRO0, 10, 14, 24

Delete sales payment

Resource: deletesalespayment.nv

This resource differs from others by it doesn't need XML message to work. Request is transferred in URI.

With this resource it is possible to remove existing sales payment. Deleting the sales payment will automatically invalidate the voucher too.
Querystring parameters:

Parameter nameOccursDescription
paymentid1Sales payment Netvisor ID

Deleted sales payments

Resource: deletedsalespayments.nv

Retrieves sales payments that have been deleted since the given date. Sales payments can be retrieved up to 7 days from the given date.

Querystring parameters:

ParameterOccursDescriptionExample
deletedsince1Mandatory parameter. Retrieves events that have been deleted since the given date. Events can be retrieved up to 7 days from the given date.
2022-06-08

Response:

Level
ElementTypeOccursDescriptionExample
rootrootAggr.1  
1
DeletedSalesPaymentsAggr.1

2
DeletedSalesPaymentAggr.0...n


3
NetvisorKeyNumeric1Netvisor ID of sales payment5
3
DeleteDateDate
1Delete date2022-06-08 15:14
Attr.
formatString1Date format, always ansiansi

Mass posting for sales payments

Resource: masspayments.nv

It is possible to post sales payments as mass using this resource. If sales payments are posted on the same voucher, voucher type is single. If sales payments are posted on multiple vouchers, voucher type is multiple. If voucher type is single, element "voucherdate" is compulsory. Given voucher date and/or the sales payments cannot be on locked period.

Request: 

LevelElement nameType and lengthOccursDescriptionExample
RootrootAggr.1  
1masspaymentsAggr.1  
2vouchertypeString1Voucher type: single or multiple. If single, payments are posted on the same voucher and "paymentdate" is compulsory. If multiple, payments are posted on multiple vouchers.
single
2voucherdateDate0...1Voucher date. Compulsory if "vouchertype=single"2021-11-25
2voucherdescriptionString1Voucher descriptionPayments
2layoutrulenetvisorkeyNumeric1Layoutrule NetvisorKey. Must exist in Netvisor.
1
2
masspaymentAttr.1...n

3
paymentnetvisorkeyNumeric
1Sales payment NetvisorKey3000

Sales payment targeting

Resource: matchpayment.nv

With this resource it is possible to target sales payment to the sales invoice or sales order. Handling types for targeting are: normal, rounding, discount, partialpayment, overpayment, notargeting, collection or creditloss. The handling works same way as in the Netvisor interface.

To use the resource both sales invoice or sales order and sales payment must be found on Netvisor. Sales payment should not be targeting to the sales invoice or sales order. The targeting is made using the NetvisorKey of the sales invoice or sales order and the sales payment. 

If the handling type is notargeting, the element "invoicenetvisorkey" is not mandatory. In this case a voucher is created using account of the payment method and default account of the receivable, but it is not targeted to any sales invoice.

Request: 

LevelElement nameType and lengthOccursDescriptionExample
RootrootAggr.1  
1matchpaymentAggr.1  
2handlingtype
String1Handling type: normal, rounding, discount, partialpayment, overpayment, notargeting, collection or creditloss
rounding
2paymentnetvisorkey
Numeric
1Sales payment NetvisorKey
1
2invoicenetvisorkey
Numeric
1Sales invoice NetvisorKey (not mandatory if handlingtype is notargeting)
1

Get purchase payment list

Resource: paymentlist.nv

Get payment list for purchase invoices. Also shows if purchase invoice is paid or unpaid.

Querystring parameters:

Parameter nameOccursDescriptionExample
limitabovenetvisorkey0...1Returns only payments above given id 
limitbegindate0...1Returns only payments with date after defined value2015-10-23
limitenddate0...1Returns only payments with date before defined value2015-10-24
limitreference0...1Limits payment based on reference 
limitinvoiceid0...1Returns only payments for given purchaseinvoice1

Response:

LevelElement nameType and lengthOccursDescriptionExample
rootRootAggr.1  
1PaymentListAggr.1  
2PaymentAggr.0...n  
3NetvisorKeyNumeric1Netvisor id for payment1
3PayerNameString
1Payment name 
3DateDate1Payment date 
3HomeCurrencySumNumeric1Payment sum 
3ForeignCurrencySumNumeric1  
3ReferenceString1Payment reference 
3InvoiceKeyNumeric1Purchase invoice Netvisor id 
3InvoiceNumberNumeric1Purchase invoice number 
3InvoiceURIString1  
3VoucherKeyNumeric1Voucher Netvisor id 
3VoucherNumberNumeric1Voucher number 

Deleted purchase payments

Resource: deletedpurchasepayments.nv

Retrieves purchase payments that have been deleted since the given date. Purchase payments can be retrieved up to 7 days from the given date.

Querystring parameters:

ParameterOccursDescriptionExample
deletedsince1Mandatory parameter. Retrieves events that have been deleted since the given date. Events can be retrieved up to 7 days from the given date.
2022-06-08

Response:

Level
ElementTypeOccursDescriptionExample
rootrootAggr.1  
1
DeletedPurchasePaymentsAggr.1

2
DeletedPurchasePaymentAggr.0...n


3
NetvisorKeyNumeric1Netvisor ID of purchase payment5
3
DeleteDateDate
1Delete date2022-06-08 15:14
Attr.
formatString1Date format, always ansiansi

Get unprocessed outgoing payments

Resource: unprocessedoutgoingpayments.nv

Get status of payments sent via API. If payment is being processed and bank has not sent status, resource will return nothing.

Parameter nameOccursDescriptionExample
idlist1Get status of sent payments. idlist = InsertedDataIdentifier from payment.nv 

Response:

LevelElement nameType and lengthOccursDescriptionExample
rootRootAggr.1  
1PaymentsAggr.1  
2PaymentAggr.0...n  
3IdentifierNumeric1Payment Netvisor id 
3StatusString
1Payment status
2 = OK
3 = error
 
3StatusDescriptionString1More specific error message 

Import bank transfer

Resource: payment.nv

Bank transfer can be imported via API but this bank transfer must be accepted manually in Netvisor. Bank account number must be Finnish IBAN account number, API will check if the bank account number is valid before bank transfer message is imported to Netvisor.

If payment has a past due date, Netvisor will change the due date to the current date when the payment it is paid in Netvisor. The payment cannot be edited in Netvisor after import.

Request:

LevelElement nameType and lengthOccursDescriptionExample
rootrootAggr.1  
1paymentAggr.1  
2bankpaymentmessagetypeString
1Message type:
FinnishReference = Reference
FreeText = Message
FinnishReference
2bankpaymentmessageString1Payment message:
reference or message
1071
2recipientAggr.1  
3organizationcodeString
0...1Receivers business ID1234567-8
3nameString1Receivers nameVille Valta
3addressString0...1Receivers addressValtakatu 51
3postcodeString0...1Receivers postal code53100
3townString0...1Receivers townLappeenranta
2sourcebankaccountnumberNumeric1Payers bank account numberFI000998874123
2destinationbankaccountAggr.1
 
3banknameString1Receivers banks nameHandelsbanken
3bankbranchString1Receivers BICHANDFIHH
3destinationbankaccountnumberText1Receivers bank account numberFI000111234567
2duedateDate1Due date
Please note the information about due date at the beginning of the documentation
2016-05-25
2amountNumeric1Sum10,00
2
paymentgroup
Aggr.
0...1


3
paymentgrouppayment
Aggr.
0...n
Payment group

4
sum
Numeric
1
Payment group sum

4
reference
Numeric
1
Payment group reference



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.