Data Structures
InvoiceResultDetails
Field | U | R | Type | Description |
---|
InvoiceId | * | - | Long | |
DueDate | * | - | DateTime | Due date for the invoice; when Svea Payments wants the invoice to be paid. |
InvoiceDate | * | - | DateTime | Date when the invoice is created in Svea’s system. Due date is InvoiceDate + Credit days. |
InvoiceDistributionType | * | - | InvoiceDistributionType | See InvoiceDistributionType. |
PaymentPlanResultDetails
Field | U | R | Type | Description |
---|
ContractNumber | * | * | Long | |
AccountCreditResultDetails
Field | U | R | Type | Description |
---|
ContractNumber | * | * | Long | |
AccountCreditId | * | * | Long | Id for the created account credit. This is unique to the client. |
OrderRow
Field | U | R | Type | Description |
---|
ArticleNumber | - | - | String(10) | Article number of the product. |
Description | - | - | String(40) | Description of the product. |
PricePerUnit | * | - | Decimal(9,2) | Price per product unit, default is excluding tax. To create a “discount row”, enter a negative amount. To add a line of text, enter amount 0. |
PriceIncludingVAT | - | - | Nullable of Boolean | If true, PricePerUnit will be considered as including tax. True is recommended if the customer is an individual, and false if the customer is a company. |
NumberOfUnits | * | - | Decimal(5,2) | Number of units. |
Unit | - | - | String(3) | Short description of unit. i.e. “ea.” |
VATPercent | * | - | Decimal(2,0) | Tax rate in percent (0–99). |
DiscountPercent | * | - | Decimal(3,0) | Discount rate in percent (0–100). |
DiscountAmount | - | - | Nullable<Decimal(10,2)> | If any, the amount will be deducted from the order row’s amount. |
DiscountAmountIncludingVAT | - | - | Nullable<Boolean> | If true, the discount amount will be deducted after VAT is added (use for individual end customers). If false, the discount amount will be deducted before VAT is added (use for business end customers). |
TemporaryReference | - | - | String | Can be used to reference a row identifier on the client’s side. |
RowType | - | - | RowType | See RowType. |
ClientAuthInfo
Field | U | R | Type | Description |
---|
ClientNumber | * | - | Integer(7) | Client number. Assigned to you by Svea. |
Username | * | - | String(80) | Username. Assigned to you by Svea. |
Password | * | - | String(50) | Password. Assigned to you by Svea. |
Note: The above table describes the authentication details structure. The authentication details are provided by Svea.
General Enumerations
OrderType
Value | Description |
---|
Invoice | - |
PaymentPlan | - |
AccountCredit | - |
Supported Country Codes
Country Name | CountryCode |
---|
Sweden | SE |
Norway | NO |
Finland | FI |
Denmark | DK |
Netherlands | NL |
Germany | DE |
RowType
Value | Description |
---|
AdjustmentRow | Deprecated |
GiftCard | Deprecated |
InvoiceFee | Used to specify the type of fee associated with an invoice payment. Required if Invoice fee is applied. |
Country Specific Required Customer Identifiers
Since we support a variety of countries with different methods of identifying companies and private individuals, we require different input parameters to check the history of the customer.
Note: Please note that not all countries mentioned in this table may be supported by the current implementation of the service. See Supported Country Codes table above for the list of supported countries.
The following tables list the required fields for customer identification by country. Please note that as much information as possible is appreciated, but only the fields specified below are required.
Sweden (SE)
Field | Customer Type | Description |
---|
NationalId | Private | Personnummer |
NationalId | Company | Organisationsnummer |
Norway (NO)
Field | Customer Type | Description |
---|
NationalId | Private | Personal number |
NationalId | Company | Organisationsnummer |
Denmark (DK)
Field | Customer Type | Description |
---|
NationalId | Private | CPR |
NationalId | Company | CVR |
Finland (FI)
Field | Customer Type | Description |
---|
NationalId | Private | Henkilötunnus |
NationalId | Company | Yritystunnus |
Germany (DE)
Field | Customer Type | Description |
---|
BirthDate | Private | YYYYMMDD |
FirstName | Private | |
LastName | Private | |
HouseNumber | Both | |
ZipCode | Both | |
Street | Both | |
Locality | Both | |
FullName | Both | |
VatNumber | Company | |
Netherlands (NL)
Field | Customer Type | Description |
---|
BirthDate | Private | YYYYMMDD |
Initials | Private | Voorletters |
FirstName | Private | |
LastName | Private | |
HouseNumber | Both | |
ZipCode | Both | |
Street | Both | |
Locality | Both | |
FullName | Both | |
VatNumber | Company | |
Result Codes
Result Code Table
The tables below summarize some common result code categories and provide details for each code.
Note: See a more extensive result code table in the AdminService documentation page.
Result Code Categories
Success
Value | Description |
---|
0 | The operation was successful |
Authentication
Value | Description |
---|
10000 | Client authentication failed |
Order
Value | Description |
---|
20000 | Order is closed. |
20001 | Order is denied. |
20002 | Something is wrong with the order. |
20003 | Order has expired. |
20004 | Order does not exist. |
20005 | OrderType mismatch. |
20006 | The sum of all order rows cannot be zero or negative. |
20013 | Order is pending. |
20014 | OrderAlternateDeliveryAddressNotAllowed |
20019 | ClientOrderNumberAlreadyExists |
20021 | NoOrderRows |
20023 | DiscountPercentNotAllowed |
20024 | InvalidVatPercent |
Invoice
Value | Description |
---|
24000 | Invoice amount exceeds the authorized amount. |
Credit Invoice
Value | Description |
---|
24500 | The invoice to credit does not exist. |
24501 | The invoice to credit does not belong to this order. |
24502 | Credit amount exceeds invoiced amount. |
24503 | The invoice to credit is not approved. |
PaymentPlan
Value | Description |
---|
27000 | The provided campaigncode-amount combination does not match any campaign code attached to this client. |
27001 | Cannot deliver order since the specified pdf template is missing. Contact Svea Payments’ support. |
27002 | Cannot partial deliver a PaymentPlan. |
27003 | Cannot mix CampaignCode with a fixed Monthly Amount. |
27004 | Cannot find a suitable CampaignCode for the Monthly Amount. |
Credit Rejection
Value | Description |
---|
30000 | The credit report was rejected. |
30001 | The customer is blocked or has shown strange or unusual behavior. |
30002 | Based upon the performed credit check the request was rejected. |
30003 | Customer cannot be found by credit check. |
30004 | The Customer's credit limit has been reached. |
Customer Identification
Value | Description |
---|
40000 | No customer found. |
40001 | The provided CountryCode is not supported. |
40002 | Invalid Customer information. |
40003 | Invalid Co-Customer information. |
40004 | Could not find any addresses for this customer. |
40005 | CustomerIsNotPreApproved. |
Request Validation
Value | Description |
---|
50000 | Client is not authorized for this method. |
50001 | OrderType is required. |
50002 | AddressSelector is not valid for this CountryCode. |
50003 | CreatePaymentPlanDetails must be null when OrderType is Invoice. |
50004 | CreatePaymentPlanDetails must not be null when OrderType is PaymentPlan. |
50005 | Missing Identification Value. |
50006 | No order amount limits exist for this client. |
50007 | Invalid applicant CountryCode. |
50008 | InvoiceDistributionType is required. |
50009 | DeliverInvoiceDetails must not be null. |
50010 | InvoiceToCredit must be null. |
50011 | InvoiceToCredit must not be null. |
50012 | OrderInformation is required. |
50013 | CustomerIdentity is required. |
50014 | Invalid input value. See ErrorMessage for description. |
50015 | The specified OrderType is invalid. |
50016 | The order does not belong to this client. |
50017 | Missing applicant CountryCode. |
50018 | The OrderDate is invalid. |
50019 | An Individual-type CustomerIdentity cannot have a CompanyIdentity-structure. |
50020 | A Company-type CustomerIdentity cannot have an IndividualIdentity-structure. |
50021 | IndividualIdentity must be null for Individuals for this country. |
50022 | CompanyIdentity must be null for Companies for this country. |
50023 | The provided AddressSelector is invalid. |
50024 | AddressProvider is not supported for this CustomerType. |
50025 | The zip code is not valid for this country. |
50028 | CloseOrderInformationIsRequired. |
50029 | AddressInformationIsRequired. |
50030 | InvalidCountryCodeGetAddresses. |
50031 | ZipCodeShouldBeNullForCompanies. |
50032 | InvalidVatAmount. |
50036 | PriceIncludingVat mismatch. |
50037 | The provided print type is not valid. |
50038 | The provided DistributionType is not valid. |
50039 | The provided DistributionType is not valid for the client country. |
50050 | Partial delivery is only allowed for Payment plan and Invoice. |
Account Credit
Value | Description |
---|
70000 | Account credit does not exist. |
70001 | Unable to find a campaign. |
70002 | The sum of the order is lower than the minimum allowed for account credit orders. |
70003 | Unable to find an account credit campaign with the given campaign code. |
70004 | Cannot cancel account credit. |
70005 | AccountCreditsToRetrieve must contain at least one entry. |
70006 | Account credit amount exceeds the authorized orders amount. |
If the returned ResultCode is not present in the tables above, please contact Svea Payments for further information.
Order Processes
Below are the instructions for creating, delivering, and closing orders using our web service methods.
Detailed Process Descriptions
Order Creation
This section describes how to create and deliver an order.
- Step 1: Perform a CreateOrderEu request with desired OrderType.
- Step 2: Upon receiving a successful response, save the
SveaOrderId
for further use.
- Step 3: Deliver the order using the DeliverOrderEu method.
CloseOrder
To close an order, simply call the CloseOrderEu method with the SveaOrderId
of the order you wish to close.