Skip to main content

Replace Invoice

Change a pending invoice. This API will replace all current articles with the new specified articles.

Parameters​

Fieldmin OccursnillableMaxTypeDescription
Username1false50stringThe username used to authorize the request.
Password1false50stringThe password used to authorize the request.
ClientIpAddress1false50stringThe IP address of the customer performing the purchase at the partner's web shop.
CorrelationId1false50stringCorrelationID is sent back in the response.
CountryCode1false2stringThe country code (ISO 3166-1 alpha-2) for the country.
InvoiceNo1false50stringThe invoice number previously returned in AddInvoice.
InvoiceRows1false-InvoiceRow[]The list of articles that shall replace current invoice rows.
PurchaseClassification1true50stringThis field is used for an alternative credit evaluation. Contact Walley for more details.
StoreId1false-intThe StoreId used for identification of store.

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. pcs, meter, number, kg etc.
UnitPricexdecimal6,2Price per unit incl. VAT.
VATxdecimal6,2VAT in per cent

Response​

Fieldmin OccursnillableMaxTypeDescription
CorrelationId1true50stringCorrelationID from the request if any.
InvoiceStatus1false-integerStatus of the invoice
TotalAmount1false-decimalTotal amount of the invoice

Example Requests​

 Value
Environment:UAT
Service:PaymentService
URL:https://ecommercetest.collector.se/v3.0/PaymentServiceV10.svc?wsdl
Function:ReplaceInvoice
Description:The operation reaplaces all invoice rows an the specified 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>USERNAME</pay:Username>
<pay:Password>PASSWORD</pay:Password>
</soapenv:Header>
<soapenv:Body>
<pay:ReplaceInvoiceRequest>
<pay:CorrelationId>ReplaceInvoiceV10</pay:CorrelationId>
<pay:CountryCode>SE</pay:CountryCode>
<pay:InvoiceNo>62396765</pay:InvoiceNo>
<pay:InvoiceRows>
<!--Zero or more repetitions:-->
<pay:InvoiceRow>
<pay:ArticleId>Article 11</pay:ArticleId>
<pay:Description>Description 11</pay:Description>
<pay:Quantity>11</pay:Quantity>
<pay:QuantityUnit>pcs</pay:QuantityUnit>
<pay:UnitPrice>11</pay:UnitPrice>
<pay:VAT>25</pay:VAT>
</pay:InvoiceRow>
</pay:InvoiceRows>
<pay:PurchaseClassification xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<pay:StoreId>1234</pay:StoreId>
</pay:ReplaceInvoiceRequest>
</soapenv:Body>
</soapenv:Envelope>

Error Codes​

Please see separate page Error Codes

Fault CodeDescription
VALIDATION_INVOICE_NUMBER_REQUIREDThe InvoiceNumber field was not present in the request.