Sales payments' handling functions are divided into the following resources:
Integration | HTTP-method | Resource | DTD | Schema | Example |
Get sales payment list | GET | salespaymentlist.nv | Download | ||
Import sales payment | POST | salespayment.nv | salespayment.dtd | Download | |
Delete sales payment | POST | deletesalespayment.nv | - | ||
Deleted sales payments | GET | deletedsalespayments.nv | |||
Mass posting for sales payments | POST | masspayments.nv | Download | ||
Sales payment targeting | POST | matchpayment.nv | matchpayment.xsd | Download | |
Get purchase payment list | GET | paymentlist.nv | masspayments.xsd | Download | |
Deleted purchase payments | GET | deletedpurchasepayments.nv | |||
Get unprocessed outgoing payments | GET | unprocessedoutgoingpayments.nv | Download | ||
Import bank transfer | POST | payment.nv | payment.dtd | Download |
Get sales payment list
Recourse: salespaymentlist.nv
Querystring parameters:
Parameter name | Occurs | Description | Example |
abovenetvisorkey | 0...1 | Return only sales payment above given id | 123 |
begindate | 0...1 | Return only sales payments with date after defined value | 2021-10-23 |
enddate | 0...1 | Return only sales payments with date before defined value | 2021-10-24 |
searchbyname | 0...1 | Return only sales payments with given name | |
limitlinkedpayments | 0...1 | Limits based on linked invoices 0 - payment doesn't have invoice linked to it 1 - payment has invoice linked to it | 1 |
limitbytype | 0...1 | Limits based on payment type onlycreditloss - lists only credit loss excludecreditloss - lists all but credit loss | excludecreditloss |
lastmodifiedstart | 0...1 | Returns sales payments that have been changed since the given date. Given as yyyy-MM-ddTHH:mm:ss | 2021-12-10 12:00:00 |
lastmodifiedend | 0...1 | Returns sales payments that have been changed before the given date. Given as yyyy-MM-ddTHH:mm:ss | 2021-12-10T12:00:00 |
invoicenetvisorkey | 0...1 | Returns sales payments related to a specific sales invoice by the given sales invoice's NetvisorKey | 123 |
invoicenumber | 0...1 | Returns sales payments related to a specific sales invoice by the given sales invoice's invoice number | 45876 |
Response:
Level | Element name | Type and length | Occurs | Description | Example |
Root | Root | Aggr. | 1 | ||
1 | SalesPaymentList | Aggr. | 1 | ||
2 | SalesPayment | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Sales payment identifier in Netvisor | 123 |
3 | Name | String | 1 | Name of the payment | |
3 | Date | Date | 1 | Date of the payment | |
3 | Sum | Numeric | 1 | Sum of the payment | |
3 | ReferenceNumber | String | 1 | Reference number of the payment | |
3 | ForeignCurrencyAmount | Numeric | 1 | ||
3 | InvoiceNumber | String | 1 | Invoice number | |
3 | PaymentAccountName | String | 1 | Name of the bank/payment method | cash |
3 | VoucherID | Numeric | 1 | Voucher's NetvisorKey | 44 |
3 | LastModifiedTimestamp | Merkkijono | 1 | The last time the voucher was modified | 7.10.2021 14:24:42 |
3 | PaymentAccountNumber | String | 1 | Account number if payment from bank | FI12 3456 xxx |
3 | PaymentSource | Numeric | 1 | Source of the payment 1 = reference payment 2 = credit note 3 = financing service 99 = other | 1 |
3 | BankStatus | String | 1 | OK or FAILED | OK |
3 | BankStatusErrorDescription | String | 0...1 | D escription of error | |
Attr. | code | String | 0...1 | Error code, see below |
Bank status error codes:
NO_ACCOUNT_FOUND | Account was not found |
NO_PAYMENT_SERVICE_ACCOUNT | Account is not for payments |
ERROR_IN_DUE_DATE | Duedate is incorrect |
BALANCE_IS_EXCEEDED | Balance is not sufficient |
PAYER_HAS_CANCELED | Payer cancelled payment |
FORM_NOT_CORRECT | Formal error |
BANK_HAS_CANCELLED | Bank cancelled operation |
CANCELLATION_NOT_CLEARING | |
AUTHORIZATION_IS_MISSING | Authorization 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 invoice status is Paid, payment will not be targeted to invoice.
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 "overridesalesreceivableaccountnumber" must be given in the element "paymentmethod". The account should be same as which is set in Netvisor's default prepayment account.
Request:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | salespayment | Aggr. | 1 | ||
2 | sum | Numeric | 1 | Sale payment sum | 50,00 |
Attr. | currency | String | 1 | Currency code. If not found in the system, will return INVALID_DATA and defenition. Default EUR | EUR |
2 | paymentdate | Date | 1 | Date of the payment | 2023-09-04 |
2 | targetidentifier | String | 1 | Identifier that is used to connect payment to invoice | 123 |
Attr. | type | String | 1 | Type 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. | targettype | String | 0...1 | Target of payment, invoice or order | invoice |
2 | sourcename | String | 1 | Name of the payment source | Eric Example |
2 | paymentmethod | String | 1 | Payment method. Payment method name or bankaccount number have to be found from target company's Netvisor environment. | pankkikortti |
Attr. | type | String | 1 | Indicates paymentmethod type alternative or bankaccount | alternative |
Attr. | overrideaccountingaccountnumber | Numeric | 0...1 | Account number to override in voucher. If not found, system will return INVALID_DATA | 1910 |
Attr. | overridesalesreceivableaccountnumber | Numeric | 0...1 | Voucher payment account number override | 1707 |
2 | salespaymentvoucherlines | Aggr. | 0...n | ||
3 | voucherline | Aggr. | 1...n | ||
4 | linesum | Numeric | 1 | Line sum | 50,00 |
Attr. | type | String | 1 | Line sum type: net (VAT is not included) or gross (VAT is included) | gross |
4 | description | String | 0...1 | Line description | Sales event |
4 | accountnumber | Numeric | 1 | Accounting account number for line | 1701 |
4 | vatpercent | Numeric | 1 | VAT percent | 24 |
Attr. | vatcode | String | 1 | VAT code *1 | KOMY |
4 | dimension | Aggr. | 0...n | ||
5 | dimensionname | String | 1 | Name of the dimension | Käteiskauppa |
5 | dimensionitem | String | 1 | Name of the dimension item. | Myynti |
*1) NONE, KOOS, EUOS, EUUO, EUPO, 100, KOMY, EUMY, EUUM, EUPM312, EUPM309, MUUL, EVTO, EVPO
VAT-class | VAT-code | VAT-percent |
No VAT processing | NONE | 0 |
Domestic sales | KOMY | 0, 10, 14, 24 |
EU sales | EUMY | 0 |
Sales outside the EU | EUUM | 0 |
Domestic purchase | KOOS | 0, 10, 14, 24 |
EU purchase | EUOS | 0, 10, 14, 24 |
EU service purchase | EUPO | 0, 10, 14, 24 |
Non - EU purchases | EUUO | 0, 10, 14, 24 |
100% deductible tax | 100 | 0 |
312 EU service sales | EUPM312 | 0 |
309 EU service sales | EUPM309 | 0 |
Other turnover excluding VAT (310) | MUUL | 0, 10, 14, 24 |
Purchases of goods from other EU countries, non-deductible | EVTO | 0, 10, 14, 24 |
Purchases of services from other EU countries, non-deductible | EVPO | 0, 10, 14, 24 |
Sale of construction services | RAMY | 0 |
Purchase of construction service | RAOS | 0, 10, 14, 24 |
Non-deductible purchase of construction service | EVRO | 0, 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 name | Occurs | Description |
paymentid | 1 | Sales 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:
Parameter | Occurs | Description | Example |
deletedsince | 1 | Mandatory 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 | Element | Type | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | DeletedSalesPayments | Aggr. | 1 | ||
2 | DeletedSalesPayment | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Netvisor ID of sales payment | 5 |
3 | DeleteDate | Date | 1 | Delete date | 2022-06-08 15:14 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
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:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | masspayments | Aggr. | 1 | ||
2 | vouchertype | String | 1 | Voucher 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 |
2 | voucherdate | Date | 0...1 | Voucher date. Compulsory if "vouchertype=single" | 2021-11-25 |
2 | voucherdescription | String | 1 | Voucher description | Payments |
2 | layoutrulenetvisorkey | Numeric | 1 | Layoutrule NetvisorKey. Must exist in Netvisor. | 1 |
2 | masspayment | Attr. | 1...n | ||
3 | paymentnetvisorkey | Numeric | 1 | Sales payment NetvisorKey | 3000 |
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:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | matchpayment | Aggr. | 1 | ||
2 | handlingtype | String | 1 | Handling type: normal, rounding, discount, partialpayment, overpayment, notargeting, collection or creditloss | rounding |
2 | paymentnetvisorkey | Numeric | 1 | Sales payment NetvisorKey | 1 |
2 | invoicenetvisorkey | Numeric | 1 | Sales 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 name | Occurs | Description | Example |
limitabovenetvisorkey | 0...1 | Returns only payments above given id | |
limitbegindate | 0...1 | Returns only payments with date after defined value | 2015-10-23 |
limitenddate | 0...1 | Returns only payments with date before defined value | 2015-10-24 |
limitreference | 0...1 | Limits payment based on reference | |
limitinvoiceid | 0...1 | Returns only payments for given purchaseinvoice | 1 |
Response:
Level | Element name | Type and length | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | PaymentList | Aggr. | 1 | ||
2 | Payment | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Netvisor id for payment | 1 |
3 | PayerName | String | 1 | Payment name | |
3 | Date | Date | 1 | Payment date | |
3 | HomeCurrencySum | Numeric | 1 | Payment sum | |
3 | ForeignCurrencySum | Numeric | 1 | ||
3 | Reference | String | 1 | Payment reference | |
3 | InvoiceKey | Numeric | 1 | Purchase invoice Netvisor id | |
3 | InvoiceNumber | Numeric | 1 | Purchase invoice number | |
3 | InvoiceURI | String | 1 | ||
3 | VoucherKey | Numeric | 1 | Voucher Netvisor id | |
3 | VoucherNumber | Numeric | 1 | Voucher 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:
Parameter | Occurs | Description | Example |
deletedsince | 1 | Mandatory 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 | Element | Type | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | DeletedPurchasePayments | Aggr. | 1 | ||
2 | DeletedPurchasePayment | Aggr. | 0...n | ||
3 | NetvisorKey | Numeric | 1 | Netvisor ID of purchase payment | 5 |
3 | DeleteDate | Date | 1 | Delete date | 2022-06-08 15:14 |
Attr. | format | String | 1 | Date format, always ansi | ansi |
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 name | Occurs | Description | Example |
idlist | 1 | Get status of sent payments. idlist = InsertedDataIdentifier from payment.nv |
Response:
Level | Element name | Type and length | Occurs | Description | Example |
root | Root | Aggr. | 1 | ||
1 | Payments | Aggr. | 1 | ||
2 | Payment | Aggr. | 0...n | ||
3 | Identifier | Numeric | 1 | Payment Netvisor id | |
3 | Status | String | 1 | Payment status 2 = OK 3 = error | |
3 | StatusDescription | String | 1 | More specific error message |
Import bank transfer
Resource: payment.nv
Bank transfers can be imported via the API but they must be accepted or paid in Netvisor. Receiver bank account number must be a valid IBAN in Single Euro Payments Area (SEPA). Validity of BIC/SWIFT format is checked if Netvisor can not identify the bank from the given IBAN (see Supported banks). Currency of bank transfers in Netvisor is EUR.
If payment has a past due date, Netvisor will change the due date to the current date when the payment is paid in Netvisor. You can bundle multiple payments together regardless of whether they were imported via API or created in Netvisor. All payments that share the same payers account number and due date are taken into payment together. Payments can be edited in Netvisor after import.
Request:
Level | Element name | Type and length | Occurs | Description | Example |
root | root | Aggr. | 1 | ||
1 | payment | Aggr. | 1 | ||
2 | bankpaymentmessagetype | String | 1 | Message type: FinnishReference = Reference FreeText = Message | FinnishReference |
2 | bankpaymentmessage | String | 1 | Payment message: reference or message | 1071 |
2 | recipient | Aggr. | 1 | ||
3 | organizationcode | String | 0...1 | Receivers business ID | 1234567-8 |
3 | name | String | 1 | Receivers name | Ville Valta |
3 | address | String | 0...1 | Receivers address | Valtakatu 51 |
3 | postcode | String | 0...1 | Receivers postal code | 53100 |
3 | town | String | 0...1 | Receivers town | Lappeenranta |
3 | country | String | 0...1 | Receivers country as ISO-3166 alpha-2 code | |
2 | sourcebankaccountnumber | Numeric | 1 | Payers bank account number | FI000998874123 |
2 | destinationbankaccount | Aggr. | 1 | ||
3 | bankname | String | 1 | Receivers banks name | Handelsbanken |
3 | bankbranch | String | 1 | Receivers BIC | HANDFIHH |
3 | destinationbankaccountnumber | Text | 1 | Receivers bank account number | FI000111234567 |
2 | duedate | Date | 1 | Due date Please note the information about due date at the beginning of the documentation | 2016-05-25 |
2 | amount | Numeric | 1 | Sum | 10,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