Skip to main content

Data Structures


InvoiceResultDetails

FieldURTypeDescription
InvoiceId*-Long
DueDate*-DateTimeDue date for the invoice; when Svea Payments wants the invoice to be paid.
InvoiceDate*-DateTimeDate when the invoice is created in Svea’s system. Due date is InvoiceDate + Credit days.
InvoiceDistributionType*-InvoiceDistributionTypeSee InvoiceDistributionType.

PaymentPlanResultDetails

FieldURTypeDescription
ContractNumber**Long

AccountCreditResultDetails

FieldURTypeDescription
ContractNumber**Long
AccountCreditId**LongId for the created account credit. This is unique to the client.

OrderRow

FieldURTypeDescription
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 BooleanIf 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--StringCan be used to reference a row identifier on the client’s side.
RowType--RowTypeSee RowType.

ClientAuthInfo

FieldURTypeDescription
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

ValueDescription
Invoice-
PaymentPlan-
AccountCredit-

Supported Country Codes

Country NameCountryCode
SwedenSE
NorwayNO
FinlandFI
DenmarkDK
NetherlandsNL
GermanyDE

RowType

ValueDescription
AdjustmentRowDeprecated
GiftCardDeprecated
InvoiceFeeUsed 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)

FieldCustomer TypeDescription
NationalIdPrivatePersonnummer
NationalIdCompanyOrganisationsnummer

Norway (NO)

FieldCustomer TypeDescription
NationalIdPrivatePersonal number
NationalIdCompanyOrganisationsnummer

Denmark (DK)

FieldCustomer TypeDescription
NationalIdPrivateCPR
NationalIdCompanyCVR

Finland (FI)

FieldCustomer TypeDescription
NationalIdPrivateHenkilötunnus
NationalIdCompanyYritystunnus

Germany (DE)

FieldCustomer TypeDescription
BirthDatePrivateYYYYMMDD
FirstNamePrivate
LastNamePrivate
HouseNumberBoth
ZipCodeBoth
StreetBoth
LocalityBoth
FullNameBoth
VatNumberCompany

Netherlands (NL)

FieldCustomer TypeDescription
BirthDatePrivateYYYYMMDD
InitialsPrivateVoorletters
FirstNamePrivate
LastNamePrivate
HouseNumberBoth
ZipCodeBoth
StreetBoth
LocalityBoth
FullNameBoth
VatNumberCompany

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

ValueType
0Success
10XXXAuthentication
20XXXOrder
24XXXInvoice
245XXCredit Invoice
27XXXPayment Plan
3XXXXCredit Rejection
4XXXXCustomer Identification
5XXXXRequest Validation
7XXXXAccount credit

Success

ValueDescription
0The operation was successful

Authentication

ValueDescription
10000Client authentication failed

Order

ValueDescription
20000Order is closed.
20001Order is denied.
20002Something is wrong with the order.
20003Order has expired.
20004Order does not exist.
20005OrderType mismatch.
20006The sum of all order rows cannot be zero or negative.
20013Order is pending.
20014OrderAlternateDeliveryAddressNotAllowed
20019ClientOrderNumberAlreadyExists
20021NoOrderRows
20023DiscountPercentNotAllowed
20024InvalidVatPercent

Invoice

ValueDescription
24000Invoice amount exceeds the authorized amount.

Credit Invoice

ValueDescription
24500The invoice to credit does not exist.
24501The invoice to credit does not belong to this order.
24502Credit amount exceeds invoiced amount.
24503The invoice to credit is not approved.

PaymentPlan

ValueDescription
27000The provided campaigncode-amount combination does not match any campaign code attached to this client.
27001Cannot deliver order since the specified pdf template is missing. Contact Svea Payments’ support.
27002Cannot partial deliver a PaymentPlan.
27003Cannot mix CampaignCode with a fixed Monthly Amount.
27004Cannot find a suitable CampaignCode for the Monthly Amount.

Credit Rejection

ValueDescription
30000The credit report was rejected.
30001The customer is blocked or has shown strange or unusual behavior.
30002Based upon the performed credit check the request was rejected.
30003Customer cannot be found by credit check.
30004The Customer's credit limit has been reached.

Customer Identification

ValueDescription
40000No customer found.
40001The provided CountryCode is not supported.
40002Invalid Customer information.
40003Invalid Co-Customer information.
40004Could not find any addresses for this customer.
40005CustomerIsNotPreApproved.

Request Validation

ValueDescription
50000Client is not authorized for this method.
50001OrderType is required.
50002AddressSelector is not valid for this CountryCode.
50003CreatePaymentPlanDetails must be null when OrderType is Invoice.
50004CreatePaymentPlanDetails must not be null when OrderType is PaymentPlan.
50005Missing Identification Value.
50006No order amount limits exist for this client.
50007Invalid applicant CountryCode.
50008InvoiceDistributionType is required.
50009DeliverInvoiceDetails must not be null.
50010InvoiceToCredit must be null.
50011InvoiceToCredit must not be null.
50012OrderInformation is required.
50013CustomerIdentity is required.
50014Invalid input value. See ErrorMessage for description.
50015The specified OrderType is invalid.
50016The order does not belong to this client.
50017Missing applicant CountryCode.
50018The OrderDate is invalid.
50019An Individual-type CustomerIdentity cannot have a CompanyIdentity-structure.
50020A Company-type CustomerIdentity cannot have an IndividualIdentity-structure.
50021IndividualIdentity must be null for Individuals for this country.
50022CompanyIdentity must be null for Companies for this country.
50023The provided AddressSelector is invalid.
50024AddressProvider is not supported for this CustomerType.
50025The zip code is not valid for this country.
50028CloseOrderInformationIsRequired.
50029AddressInformationIsRequired.
50030InvalidCountryCodeGetAddresses.
50031ZipCodeShouldBeNullForCompanies.
50032InvalidVatAmount.
50036PriceIncludingVat mismatch.
50037The provided print type is not valid.
50038The provided DistributionType is not valid.
50039The provided DistributionType is not valid for the client country.
50050Partial delivery is only allowed for Payment plan and Invoice.

Account Credit

ValueDescription
70000Account credit does not exist.
70001Unable to find a campaign.
70002The sum of the order is lower than the minimum allowed for account credit orders.
70003Unable to find an account credit campaign with the given campaign code.
70004Cannot cancel account credit.
70005AccountCreditsToRetrieve must contain at least one entry.
70006Account 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.