Skip to main content

Import sales payment salespayment.nv

Recourse: salespayment.nv

HTTP-method: POST

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

2

usePaymentThreshold

Numeric

0...1

Rounding tolerance for performances. If it is 1, the rounding tolerance is taken into account. The rounding tolerance is set in the Company Menu > Company Basic Information and Settings > Basic Information.

1

2

paymentidentifier

String

0...1

An identifier that uniquely identifies the performance. If an ID is provided here, performances cannot be imported with the same ID again. The ID can contain numbers and letters. Character limit is 150 characters.

123456XY

Attr.

overrideaccountingaccountnumber

Numeric

0...1

Account number to override in voucher. If not found, system will return INVALID_DATA. If not provided, the account is retrieved from Netvisor from the payment method/bank account. (debet)

1910

Attr.

overridesalesreceivableaccountnumber

Numeric

0...1

Voucher sales receivable account number override. If not provided, the default Netvisor account 1701 is used. (credit)

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. Allowed VAT-classes are listed here.

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

Did this answer your question?