The AddInvoice requests credit checks the customer, and if approved, adds the invoice. If rejected, an error message is returned. 

After the invoice has been added, it needs to be activated. There's a few different ways to do this and you can find details of this under the Invoice administration menu. 

This method will return the invoice number (InvoiceNo) which should be stored and used when handling the invoice in the future or for reference. 

This method is available in the following countries:

Request parameters:

Field nillable Max Type Description
Username false 50 string The username used to authorize the request.
Password false 50 string The password used to authorize the request.
StoreId true 4 short The StoreId used for identification of store.
CorrelationId true 50 string CorrelationID is sent back in the response.
CountryCode false 2 string The country code (ISO 3166-1 alpha-2) for the country.
RegNo false 12 string The organization number should be provided. 
ClientIpAddress false 50 string The IP address of the customer performing the purchase at the partner’s web shop.
Currency false 3 string Currency 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.
CustomerNo true 20 string If 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.
OrderNo true 20 string The order's identification can be used to search for a specific order in the Collector Partner Portal.
OrderDate false - datetime The date that the costumer placed the order.
InvoiceRows false - Invoice rows The articles that should be listed on the invoice and contains the quantity and price of the article.
InvoiceType false - int

Specify 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 depending on InvoiceDeliveryMethod. If InvoiceDeliveryMethod is set to 1, Collector will not send this invoice to the customer, you will send it as part of the package. If InvoiceDeliveryMethod is set to 2, Collector will send the invoice by email.

1 = Monthly single invoice OR Aggregated Invoice, depending on the agreement with Collector. Collector will send this invoice if InvoiceDeliveryMethod is set to 1. If an agreement for Aggregated Invoice is made, Collector will set up the aggregation logic. All invoices incoming during the same month will then be aggregated to one invoice. 

InvoiceAddress false - Address The invoice address where the invoice should be sent to. 
DeliveryAddress false - Address The address where the product should be delivered to. 
CreditTime true - int Not used at the moment.
ActivationOption false - int Different 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 ActivateInvoice, PartActivateInvoice 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.
Reference true 50 string The Reference that should be as a reference on an invoice. 
CostCenter true 64 string For companies that needs to specify a cost center.
Gender true - int Not used for companies. 
InvoiceDeliveryMethod false - int

The way to send the invoice. By default this is determined 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 (default is 1):

1 = Normal mail or in package based on invoice type.

2 = E-mail. 

If value 3 is specified, both Normal mail and e-mail should be used.

ProductCode true 16 string Used for setting specific non-standard terms to the purchase. The product code is determined by Collector. To use these products an agreement with Collector must be made.
PurchaseType true - int

The 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 = SMS

SalesPerson true 50 string Salesperson for order, if used.
AdditionalInformation true - - Used for specific handling, contact Collector for further information how to use this.


Response parameters:

Field nillable Max Type Description
CorrelationId true 50 string CorrelationID from the request if any.
PaymentReference true 50 string The 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.
AvailableReservationAmount true 6,2 decimal The current available reservation amount. If no credit reservation is available, 0 will be returned.
LowestAmountToPay true 6,2 decimal The lowest amount to pay on the invoice. Only returned if the invoice is auto activated.
TotalAmount true 6,2 decimal The total amount to pay for the invoice. Only returned if the invoice is auto activated.
InvoiceNo false - string The invoice number of the invoice.
InvoiceStatus false - int The status of the invoice. 
DueDate true - datetime The due date of the invoice. Will only be returned when a purchase is directly activated.
InvoiceUrl true 200 string The url to invoice in pdf format.