Add Invoice

The AddInvoice requests performs a credit check of the customer, and if approved, adds the invoice. Otherwise an error message is returned.

Unless using the GetAddress/GetCompaynInformation method (only available in Sweden), this is the first step in creating an invoice.

This method will return the Invoice number (InvoiceNumber) which should be stored and used when handling the order/invoice later (e.g. CreditInvoice, PartCreditInvoice, AdjustInvoice, CancelInvoice etc).

The created invoice then needs to be activated through the ActivateInvoice or PartActivateInvoice (The invoice can also be autoactivated directly in the AddInvoice request, if the package is sent directly when ordered).

The functionality Campaign Products, included in the AddInvoice request, allows you to customize and set up campaigns for your customers with special conditions of sale, e.g. campaigns with longer payment time, different invoice fees or specific transaction costs. To use this functionality, an agreement with Collector must be made.

This method is available in the following countries:

Request Parameters

IMPORTANT

Please note that the order of the parameters is of importance. The list below displays the expected order.

FieldOccursnullableMaxTypeDescription
ClientIpAddress1false50stringThe IP address of the customer performing the purchase at the partner's web shop.
Password1false50stringThe password used to authorize the request.
Username1false50stringThe username used to authorize the request.
ActivationOption1false-intDifferent options for affecting a purchase.
Following values can be used (default value is 0):
0 = Purchase will be preliminary and must be
activated, by using the ActivateInovice or through
the Collector Partner Portal.
1 = Auto activation, will automatically active the
invoice so it can be sent out directly.
This can only be used when the order can be
delivered directly.
2 = Pre-Paid invoice. The purchase will be activated
first when an invoice is paid. Not used at the moment.
AdditionalInformation[]1true-AdditionalInformation[]Used depening on agreement with Collector.
AuthorizedSignatory1False-[]In case of a B2B purchase using part payment
Authorized (InvoiceType=5). This segment is used to send out a
Signatory digital signing task to the authorized signatory.
Nillable in case of B2C purchase.
Buyer1true-Buyer[]This field is used for company purchases where the
details of the person making the purchase should be
sent in
CorrelationId1true50stringCorrelationID is sent back in the response.
CostCenter1true50stringFor companies that needs to specify a cost center.
CountryCode1false2stringThe country code (ISO 3166-1 alpha-2) for country.
Currency1false3stringCurrency used during the purchase. Must be the same currency where the customer is registered, and the e-store owner is located. Currency code is a three-letter combination based on ISO 4217, for example: SEK, DKK, EUR.
CustomerNumber1true20stringIf the e-store wants to search for a customer by their
own customer id, this field can be used to specify
that number. Also shown on invoice.
CustomerProxyIdentifier1true50stringtext
DeliveryAddress1true-Address[]The address where the product should be delivered
to. For private persons this must be the address
where the person is registered.
ElectronicInvoiceDeliveryInformation1true1000stringUsed for passing information about electronic invoice information.
Currently used for Finvoice in Finland.
Used in combination with InvoiceDeliveryMethod 8
Format:
IntermediatorAddress ; ReceiverAddress
ForceApproveCreditCheck1true-boolValidation of address information can be ignored if the purchase is prepaid
IgnoreAddressValidationForPrepaid1true-boolUsed to ignore address validation on purchases made using prepaid payment methods.
IntegrationId1true128stringThe integration ID can be assigned to customers in order to uniquely identify customers (instead of using Civic reg no).
InvoiceAddress1true-Address[]The invoice address where the invoice should be
sent to. For private persons this must be the address
where the person is registered.
InvoiceDeliveryMethod1false-intThe way to send the invoice. By default this is set by
Collector, but can be negotiated with Collector. If a
current invoice exists, the latest information will be
used next time the invoice is sent.
The Value can be:
1 = By post or in package based on invoice type.
2 = E-mail.
3 = Both by post and e-mail
8 = Electronic invoice delivery
16 = Suppress delivery of invoice
32 = Force mail (only used in combination with InvoiceType 0 and if agreed with Collector)
InvoiceRows1false-InvoiceRow[]The articles that should be listed on the invoice and
contains the quantity and price of the article.
InvoiceType1false-intSpecify the type of invoice to use.
The values (default value is 0) are:
0 = Invoice will be in the package and/or directly
sent with e-mail if InvoiceDeliveryMethod is set to e-
mail, Collector will not send this invoice to the
customer, you will send it as part of the package.
1 = Monthly invoice. Collector will send this invoice.
2 = Part Payment. Collector will send a part payment
invoice with interest.
OrderDate1false-datetimeThe date that the costumer placed the order.
OrderNumber1true20stringThe order's identification can be used to search for a
specific order in the Collector Partner Portal.
PaymentInfo1true-PaymentInfoBank or invoice Information for payout. Cannot be used in combination with SettlementReference.
ProductCode1true16stringThe campaign product code. The product code is
determined by Collector. To use campaign products
an agreement with Collector must be made.
PurchaseClassification1true50stringThis field is used for an alternative credit evalutaion. Concatc Collector for more details.
PurchaseType1true-intThe type of the purchase, to specify where the
purchase originates from. The value can be:
0 = E-Commerce
1 = Store
2 = InvoicePayment
3 = P2P
4 = Telesales
Reference1true64stringThe Reference that should be as a reference on an
invoice. Will only be used for companies.
RegNo1true20stringThe registration number of the customer. Either civic registration number or organization number. Only nillable if an IntegrationId is set andhas been assigned to the RegNo beforehand.
RequireStrongCustomerVerification1true-boolDetermines if the customer should be required to
authenticate themselves using some type of strong verification method.
RequireUnknownRegistrationNumber1true-boolUsed to enable anonymous purchases, without known registration number.
SalesPerson1true50stringInformation about the sales person
SettlementReference1true350stringSettlement reference added to the payment. Cannot be used in combination with PaymentInfo.
StoreId1true4intThe StoreId used for identification of store.
StoreReference1true50stringThis field can be used for specifying a store reference

InvoiceRow

ParameterRequiredTypeMaxDescription
ArticleIdxstring50The ArticleId of the product.
Descriptionxstring50The description of the product.
Quantityxint8The quantity of the product. 1-99999999 (0 not allowed)
QuantityUnit-string50The quantity unit of the product, e.g. styck, kg etc.
UnitPricexdecimal6,2Price per unit incl. VAT.
VATxdecimal6,2VAT in per cent

PaymentInfo

ParameterRequiredTypeMaxDescription
ReceiverName-string64Name of the company
ReceiverRegNumber-string64The organization number of receiving company
PaymentReference-string350Reference added to the payment. OCR number must be no longer than 20 characters
BankAccount-string50Bank account number. For bank account types with multiple parts "" (pipe) is used as a delimiter.
BankAccountType-intSee below

BankAccountType

  • 0 - Bic Iban (DEUTDEFF DE99203205004989123456)
  • 1 - Iban (DE99203205004989123456)
  • 2 - Plusgiro, with OCR
  • 3 - Plusgiro, with message
  • 4 - Bankgiro, with OCR
  • 5 - Bankgiro, with message

Response Parameters

FieldOccursnullableMaxTypeDescription
CorrelationId1true50stringCorrelationID from the request if any.
PaymentReference1true50stringThe payment identification number. This is the id the
customer must use when they do a payment of an
invoice. Only returned if the invoice is auto activated.
AvailableReservationAmount1true6,2decimalThe current available reservation amount. If no credit reservation is done, 0 will be returned.
LowestAmountToPay1true6,2decimalThe lowest amount to pay on the invoice. Only returned
if the invoice is auto activated.
TotalAmount1true6,2decimalThe total amount to pay for the invoice. Only returned if
the invoice is auto activated.
InvoiceNumber1false-stringThe invoice number of the invoice.
InvoiceStatus1false-stringThe status of the purchase. Values:
0 = On hold - Collector haven't approved the invoice
yet.
1 = Approved - The invoice is approved by Collector and
can be activated though the ActivateInvoice or
PartActivateInvoice method or from the Collector
Partner Portal.
2 = Activated - The product(s) is delivered and Collector
will buy the invoice.
DueDate1true-datetimeThe due date of the invoice. Only returned if the invoice
is auto activated.
InvoiceUrl1true-stringIf the invoice is auto activated and the invoice type is

direct invoice, the InvoiceUrl contains a url to theinvoice in a pdf file format.

Example Requests

 Value
Environment:UAT
Service:PaymentService
URL:https://ecommercetest.collector.se/v3.0/PaymentServiceV10.svc?wsdl
Function:AddInvoice
Description:The operation returns invoice information upon creation of an invoice.
Notes:N/A
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pay="http://schemas.ecommerce.collector.se/v30/PaymentService">
<soapenv:Header>
<pay:Username>test</pay:Username>
<pay:Password>123456</pay:Password>
<pay:ClientIpAddress>127.0.0.1</pay:ClientIpAddress>
</soapenv:Header>
<soapenv:Body>
<pay:AddInvoiceRequest>
<pay:ActivationOption>0</pay:ActivationOption>
<pay:AdditionalInformation>
</pay:AdditionalInformation>
<pay:CorrelationId>AddInvoiceV10</pay:CorrelationId>
<pay:CostCenter xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:CountryCode>SE</pay:CountryCode>
<pay:Currency>SEK</pay:Currency>
<pay:CustomerNumber xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:CustomerProxyIdentifier xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:DeliveryAddress>
<pay:Address1>Testgatan 1</pay:Address1>
<pay:Address2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:COAddress>C/O Address</pay:COAddress>
<pay:City>Test CIty</pay:City>
<pay:CompanyName xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:CountryCode>SE</pay:CountryCode>
<pay:Email>nohmtest@collecotrobank.se</pay:Email>
<pay:Firstname>FirstName</pay:Firstname>
<pay:Lastname>LastName</pay:Lastname>
<pay:MobilePhone>+461234567890</pay:MobilePhone>
<pay:PhoneNumber xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:PostalCode>12345</pay:PostalCode>
</pay:DeliveryAddress>
<pay:ElectronicInvoiceDeliveryInformation xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:IntegrationId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:InvoiceAddress>
<pay:Address1>Testgatan 1</pay:Address1>
<pay:Address2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:COAddress>C/O Address</pay:COAddress>
<pay:City>Test CIty</pay:City>
<pay:CompanyName xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:CountryCode>SE</pay:CountryCode>
<pay:Email>nohmtest@collecotrobank.se</pay:Email>
<pay:Firstname>FirstName</pay:Firstname>
<pay:Lastname>LastName</pay:Lastname>
<pay:MobilePhone>+461234567890</pay:MobilePhone>
<pay:PhoneNumber xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:PostalCode>12345</pay:PostalCode>
</pay:InvoiceAddress>
<pay:InvoiceDeliveryMethod>1</pay:InvoiceDeliveryMethod>
<pay:InvoiceRows>
<pay:InvoiceRow><pay:ArticleId>ArticleId 1</pay:ArticleId>
<pay:Description>Description 1</pay:Description>
<pay:Quantity>1</pay:Quantity>
<pay:QuantityUnit>styck</pay:QuantityUnit>
<pay:UnitPrice>100</pay:UnitPrice>
<pay:VAT>25</pay:VAT>
</pay:InvoiceRow>
<pay:InvoiceRow>
<pay:ArticleId>ArticleId 2</pay:ArticleId>
<pay:Description>Description 2</pay:Description>
<pay:Quantity>2</pay:Quantity>
<pay:QuantityUnit>meter</pay:QuantityUnit>
<pay:UnitPrice>200</pay:UnitPrice>
<pay:VAT>12</pay:VAT>
</pay:InvoiceRow>
<pay:InvoiceRow>
<pay:ArticleId>Article 1</pay:ArticleId>
<pay:Description>Description 1</pay:Description>
<pay:Quantity>150</pay:Quantity>
<pay:QuantityUnit>styck</pay:QuantityUnit>
<pay:UnitPrice>150</pay:UnitPrice>
<pay:VAT>25</pay:VAT>
</pay:InvoiceRow>
</pay:InvoiceRows>
<pay:InvoiceType>0</pay:InvoiceType>
<pay:OrderDate>${#Project#DateTimeNow}</pay:OrderDate>
<pay:OrderNumber>O123456789</pay:OrderNumber>
<pay:ProductCode xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:PurchaseClassification xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:PurchaseType xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:Reference xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:RegNo>195109212224 </pay:RegNo>
<pay:SalesPerson xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:SettlementReference xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:StoreId>1234</pay:StoreId>
<pay:StoreReference xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</pay:AddInvoiceRequest>
</soapenv:Body>
</soapenv:Envelope>

Error Codes

Please see separate page Error Codes

Fault CodeDescription
INVALID_REGISTRATION_NUMBER
INTEGRATION_ID_AND_REGISTRATION_NUMBER_MUST_BE_EMPTY
INVOICE_EXCEEDS_AVAILABLE_RESERVATION
EMAIL_IS_MISSINGInclued customer's email address in the request
NOT_ALLOWED_TO_SEND_NOTIFICATION_BY_MAILThe agreement with Collector does not allow invoices by regular post