Skip to main content

Data Types

Address

NameDescriptionTypeAdditional Information
FullNameFor B2B customers this field contains the company nameString
FirstNameEmpty for B2B customers

Some address providers used by Checkout in Norway do not supply FirstName and LastName separately for B2C customers. In those cases only FullName is available.
String
LastNameEmpty for B2B customers

Some address providers used by Checkout in Norway do not supply FirstName and LastName separately for B2C customers. In those cases only FullName is available.
String
StreetAddressString
StreetAddress2May be populated on international addresses that require multiple address rowsString
StreetAddress3May be populated on international addresses that require multiple address rowsString
CoAddressString
PostalCodeString
CityString
CountryCodeString
(IsGeneric)(Deprecated) International addresses have the same structure as domestic addresses with addition of properties StreetAddress2 and StreetAddress3

Returns true if the address is a generic/international address. Generic addresses only have values in fullName and addressLines.
Boolean
(AddressLines)(Deprecated) International addresses have the same structure as domestic addresses with addition of properties StreetAddress2 and StreetAddress3

This is only populated if the address is a generic/international address (IsGeneric returns true).
Collection of String

CampaignCodeInfo

NameDescriptionTypeAdditional Information
CampaignCodeInt64
DescriptionString
PaymentPlanTypeStandard (0), InterestFree (1), InterestAndAmortizationFree (2)
ContractLengthInMonthsInt32
MonthlyAnnuityFactorDecimal
InitialFeeDecimal
NotificationFeeDecimal
InterestRatePercentDecimal
NumberOfInterestFreeMonthsInt32
NumberOfPaymentFreeMonthsInt32
FromAmountDecimal
ToAmountDecimal
MonthlyAmountDecimal / NullIs only calculated when an amount was added to the request.

Cart

Shopping cart.

caution

Quantity, UnitPrice, DiscountPercent, DiscountAmount and VatPercent for each order row expected to be given in minor units.

NameDescriptionTypeAdditional Information
ItemsOrder rows.Collection of OrderRowMaximum allowed number of rows per order is 1000.

CheckoutOrderStatus

CheckoutOrderStatus values indicate in which state the order session is:

Status CodeNumerical ValueDescription
Cancelled-1Order session becomes cancelled when time limit has expired without any purchase being finalized. When an order session is cancelled, no further actions can be made.
Created0Checkout order session has been created and is active. When an order session is active, cart and merchantData can be changed.
Final100Customer has seen the confirmation page which closes the checkout order session. When an order session is Final, no further actions can be made.

Observe that none of the status codes mean that the order is ready to be delivered. To make sure that the order can be delivered, please refer to the order status in Payment Admin.

CheckoutValidationCallbackResponse

NameDescriptionTypeAdditional Information
ValidBoolean
ClientOrderNumberString
MessageString
required field

CreateOrderModel

NameDescriptionTypeAdditional Information
countryCodeString
currencyString
localeLocale for the orderStringSupported: sv-se, da-dk, de-de, en-us, fi-fi, nn-no.
clientOrderNumberA string that identifies the order in the merchant’s systems. The ClientOrderNumber is unique per order. Attempting to create a new order with a previously used ClientOrderNumber will result in the create method returning the already existing order instead. If using Vipps payment method, allowed values are any combination of: A-Z, a-z, 0-9, - and _ (underscore). Example for Vipps: abc-12d-efg-123StringMax length: 32
merchantSettingsMerchantSettings
cartThe total cost of the order rows in the cart needs to be equal or higher than 0 but the cart must not be empty.CartFree order items/rows, like gift cards, can have a value of 0, denoting no cost
presetValuesCollection of PresetValue
identityFlagsIdentityFlags
requireElectronicIdAuthenticationBoolean
partnerKeyProvided by Svea to select partners.Guid
merchantDataMetadata visible to the storeStringMax length: 6000
Cleaned up from Checkout database after 45 days.
shippingInformationShipping information needed for the shipping checkout. Only applicable if merchant has shipping enabled.ShippingInformation (order)In order to have the shipping checkout 'enableShipping' should be set to true
validationOrder validations such as minimum age requirement should be fulfilled here. (It's nullable it means you do not need to provide anything in case the age limit is not required)OrderValidationApply it in order to have order validation such as minimum age / Nullable
recurring newIndicates if the order is recurring order and will create a recurring token when order is finalized. Only applicable if merchant has recurring orders enabled.
Please check Recurring Order for more details
Boolean / NullIn order to create recurring order this field should be set to true
required field

Customer

NameDescriptionTypeAdditional Information
IdInt64
NationalIdString
CountryCodeString
IsCompanyBoolean
VatNumberString
IsVerifiedBoolean

Order Model

NameDescriptionTypeAdditional Information
OrderIdThe id of the Order, needed to get and update order in the Checkout APIInt64
ClientOrderNumberString
GuiContains the Snippet that is used to embed the Checkout UI on your siteGui
StatusThe current status of the orderCheckoutOrderStatus
CartOrder rows.Cart
CurrencyCurrency as defined by ISO 4217String
LocaleThe locale of the Checkout, e.g. sv-SE.String
CustomerCustomer informationCustomer
CountryCodeDefined by two-letter ISO 3166-1 alpha-2, e.g. SE, NO, FI, DKString
EmailAddressCustomer's email addressString
PhoneNumberCustomer's phone numberString
ShippingAddressCustomer's shipping address.Address
BillingAddressCustomer's billing address.Address
PaymentTypeThe payment method that the customer used to finish the purchase. Only set when order status is Final
  • INVOICE
  • ADMININVOICE
  • ACCOUNT
  • PAYMENTPLAN
  • ZEROSUM
  • SVEACARDPAY
  • SVEACARDPAY_PF
  • TRUSTLY
  • SWISH
  • SWISH_PF
  • VIPPS
  • LEASING
  • LEASINGMANUAL
  • MOBILEPAY
String
PaymentThe payment method that the customer used to finish the purchase. Only set when order status is FinalPaymentInfo
SveaWillBuyOrderTrue = Svea will buy this invoice.
False = Svea will not buy this invoice.
null = Selected payment method is not Invoice.
Boolean
MerchantSettingsMerchantSettings
IdentityFlagsIdentityFlags
CustomerReferenceB2B Customer referenceString
PeppolIdA company’s ID in the PEPPOL network, which allows the company to receive PEPPOL invoices. A PEPPOL ID can be entered when placing a B2B order using the payment method invoice.String
MerchantDataMetadata visible to the storeStringCleaned up from Checkout database after 45 days.
ShippingInformationThe returned Shipping information from a previously created/updated order. After the order is finalized and the shipping is created we will include a couple more properties in the ShippingInformation on Order level associated with the Shipping Provider.GetOrderShippingInformation
Recurring newIndicates if the order is recurring order and will create a recurring token when order is finalized. Only applicable if merchant has recurring orders enabled.Boolean / Null
RecurringToken newRecurring token to be used for subsequent recurring orders. Only available when order is finalized. Only applicable if merchant has recurring orders enabled.String / Null
BillingReferencesA collection of B2B billing references.BillingReferenceApplicable for B2B orders

Gui

NameDescriptionTypeAdditional Information
SnippetHTML-snippet that should be placed on the page where you want the Checkout to be presented.
The snippet includes a javascript that will be executed at page load and insert an iframe containing the Checkout UI.
A unique snippet is generated with every order, do not cache it
Please inject this snippet without modifying it as it is subject regular changes and updates
String

IdentityFlags

NameDescriptionTypeAdditional Information
HideNotYouBoolean
HideChangeAddressBoolean
HideAnonymousBoolean

MerchantSettings

NameDescriptionTypeAdditional Information
WebhookUriURI of the webhook in order to be called by shipping servicesStringMust be a valid URI
Must be accessible by end customer
Max length: 500
CheckoutUriURI to the page in the webshop where the Checkout will be shown.StringMust be a valid URI
Must be accessible by end customer
Max length: 500
ConfirmationUriURI to the page in the webshop where the customer should be redirected after the Checkout is completed.StringMust be a valid URI
Must be accessible by end customer
Max length: 500
TermsUriURI to a page with webshop terms.StringMust be a valid URI
Must be accessible by end customer
Max length: 500
PushUriURI to an endpoint that expects callbacks from the Checkout whenever an order's CheckoutOrderStatus is changed.

May contain a {checkout.order.uri} placeholder which will be replaced with the Checkout order ID.

Requests for this endpoint are made with HTTP Method POST.
Note: Merchant push merely is a notification and may take from seconds to even minutes to be sent, therefore always you have to make sure you communicate with checkout to get all information properly!
Note: You don't have to wait for push to display your finalized page to the customer because that request is asynchronous and should be last resort in that regard!
Note: Merchants should be aware of that this endpoint may get called multiple times for the same state transition.
Note: You get additional information in this format:
{"type": "Created/Cancelled/Finalized"}

Your response's HTTP Status Code is interpreted as:
  • 100-199 are ignored.
  • 200-299 is interpreted as OK.
  • 300-399 are ignored.
  • 404 - the order hasn't been created on your side yet. We will try pushing again. All other 400 status codes are ignored.
  • 500 and above is interpreted as error on your side. We will try pushing again.
StringMust be a valid callback URI
Max length: 500
CheckoutValidationCallBackUriAn optional URI to a location that expects callbacks from the Checkout to validate an order's stock status.
It also allows the possibility to update the Checkout order with a different ClientOrderNumber.

May contain a {checkout.order.uri} placeholder which will be replaced with the Checkout order ID.

Requests for this endpoint are made with HTTP Method GET.
Note: We will make multiple validation callback requests if it is needed to ensure great and smooth purchasing experience.

Your response's HTTP Status Code is interpreted as:
  • 200-299 is interpreted as validation passed.
  • Everything else is interpreted as validation failure.
See CheckoutValidationCallbackResponse for a description of the expected response content.
StringMust be a valid callback URI
Max length: 500
ActivePartPaymentCampaignsList of valid CampaignIDs. If used, a list of available part payment campaign options will be filtered through the chosen list.Collection of Int64Must be a list of valid CampaignIDs.
PromotedPartPaymentCampaignIf used, the chosen campaign will be listed first in all payment method lists.Int64Must be valid CampaignID.
UseClientSideValidationIf set to true, the checkout will give you a chance to do some client side validations when the event order.validationCallback is triggered.
For more info, see Checkout Widget Methods
BooleanDefault value is false.
RequireClientSideValidationResponseUsed in conjunction with UseClientSideValidation.
If set to true, the checkout will await a response before proceeding instead of automatically proceeding after 10 seconds no response had been received.
For more info, see Checkout Widget Methods
BooleanDefault value is false.
required field

Order-Validation

NameDescriptionTypeAdditional Information
MinAgeMinimum age required for the orderInt64 / NULLIn order to apply minimum age

OrderRow

caution

Quantity, UnitPrice, DiscountPercent, DiscountAmount and VatPercent for each order row expected to be given in minor units.

caution

Maximum allowed number of rows per order is 1000.

NameDescriptionTypeAdditional InformationExamples
NameArticle name.StringMax length: 40
QuantityQuantity of the product.Int641-7 digits
Minor Units.
UnitPricePrice of the product including VAT.Int641-13 digits
Can be negative.
Minor Units.
ArticleNumberArticle numberStringMax length: 256
DiscountPercentThe discount percent of the order row.
Cannot be used together with DiscountAmount
Int64Min: 0
Max: 10000
No fractions
Minor Units.
0 = 0%
100 = 1%
9900 = 99%
10000 = 100%
DiscountAmountThe total discount amount for this order row.
Cannot be used together with DiscountPercent
Int64Min: 0
Max: Order row total
Minor Units.
VatPercentThe VAT percentage of the current product. Valid vat percentage for that country.Int64Minor Units.
UnitThe unit type, e.g., “st”, “pc”, “kg” etc.StringMax length: 4
TemporaryReferenceCan be used when creating or updating an order. The returned rows will have their corresponding temporaryreference as they were given in the in data. It will not be stored and will not be returned in GetOrder.String
RowNumberThe row number the row will have in the Webpay systemInt32
MerchantDataMetadata visible to the storeStringMax length: 255
Cleaned up from Checkout database after 45 days.
RowTypeIs used just to distinguish ShippingFee item from the order items. It is a string and can be one of "Row" or “ShippingFee”String
required field

PaymentInfo

The final payment method for the order. Will only have a value when the order is finalized, otherwise null.

Some payment methods might include unique fields that are not available on other payment methods.

NameDescriptionTypeAdditional Information
PaymentMethodTypeThe final payment method type for the order:
  • Invoice
  • AccountCredit
  • PaymentPlan
  • Card
  • Trustly
  • Swish
  • MobilePay
  • Vipps
  • Leasing
  • ZeroSum
StringRequired.
CampaignCodeOnly available for PaymentPlanInt64

PresetValue

NameDescriptionTypeAdditional Information
TypeNameName of the field you want to set (see limits below).String
ValueSee limits below.String
IsReadonlySet this to true if you don't want the end customer to be able to change the value in the Checkout.Boolean
required field

List of presetvalue typenames

NameTypeAdditional Information
NationalIdStringCountry-specific validation.
EmailAddressStringMax 50 characters. Must be a valid email address.
PhoneNumberString1-18 digits, can include “+”, “-“s and space.
PostalCodeStringCountry-specific validation.
IsCompanyBooleanRequired if nationalid is set to "read only"

Shipping data types

GetOrderShippingInformation

NameDescriptionTypeAdditional Information
EnforceFallbackTo force displaying fallback options set this to trueBooleanIn order to test how your fallback options will be demonstrated (Only for testing purposes)
EnableShippingIf shipping should be enabled for the specific orderBooleanIf Shipping is enabled at Svea for the specific merchant and the property enableShipping = false then shipping will be disabled for that order (for example if the order is digital then the shipping can be disabled using this parameter, however merchant can also configure digital items in nShift for example if weight is set to 0)
WeightWeight of the parcel in grams to get accurate delivery options from nShiftDoubleWeight of the parcel in grams
TagsSpecific metadata info of the parcel to get accurate delivery options from nShiftKey-Value String pairsSample: {"IsBulky": "true"}
FallbackOptionsAn array of specified fallback options used when failing to connect with Transport Management System (nShift)FallbackOption[]
ShippingProviderShippingProvider

ShippingInformation (order)

NameDescriptionTypeAdditional Information
EnforceFallbackTo force displaying fallback options set this to trueBooleanIn order to test how your fallback options will be demonstrated (Only for testing purposes)
EnableShippingIf shipping should be enabled for the specific orderBooleanIf Shipping is enabled at Svea for the specific merchant and the property enableShipping = false then shipping will be disabled for that order (for example if the order is digital then the shipping can be disabled using this parameter, however merchant can also configure digital items in nShift for example if weight is set to 0)
WeightWeight of the parcel in grams to get accurate delivery options from nShiftDoubleWeight of the parcel in grams
TagsSpecific metadata info of the parcel to get accurate delivery options from nShiftKey-Value String pairsSample: {"IsBulky": "true"}
FallbackOptionsAn array of specified fallback options used when failing to connect with Transport Management System (nShift)FallbackOption[]Highly recommended to provide fallback options!
ShouldRejectShippingSessionIf shipping session should be cancelledBooleanWhen cart is updated and delivery options may change as a result, this property can be enabled in order to cancel the shipment previously confirmed and enforce the customer to select shipping option again. Is 'false' by default.

FallbackOption-ShippingOption

NameDescriptionTypeAdditional InformationExamples
Id Id of the carrierStringnShift specific (typically in form of a guid)79d0c2d3-71f4-4205-a5bc-4aa9ab324c98
Carrier Name of the carrierStringnShift specificDHL Home Delivery
Name Delivery option nameStringnShift specificdhl
ShippingFee Price of the parcelInt64minor currency!2600 = 26.00SEK
Addonsnshift format AddonsAddonAs similar as nshift models, find out more here
Fieldsnshift format FieldsFieldAs similar as nshift models, find out more here

ShippingProvider

NameDescriptionTypeAdditional Information
NameName of the shipping provider ('nShift' in this case). If shipping provider (nShift) is down and a fallback option is used then the value will be 'fallback'String
ShipmentIdInternal order IdStringId is only set if the order is final, otherwise empty string will be set.
ShippingOptionShipping option set on the orderShippingOption

UpdateOrderModel

NameDescriptionTypeAdditional Information
cartImportant: The entire cart is overwritten on every update. Always send all of the order rows.

It is possible to update the order with a cart that has a total cost of the order rows less than 0 (e.g. an empty cart). However the end customer will not be able to finish the purchase in the Checkout until the total cost of the order rows is equal or higher than 0.
Cart
merchantDataMetadata visible to the storeStringMax length: 6000
Cleaned up from Checkout database after 45 days
shippingInformationShipping information to be updated. Only applicable if merchant has shipping enabled.ShippingInformation (order)
validationOrder validations such as minimum age requirement should be fulfilled here. (It's nullable it means you do not need to provide anything in case the age limit is not required)OrderValidationApply it in order to have order validation such as minimum age / Nullable
required field

BillingReference

NameDescriptionTypeAdditional Information
TypeBilling reference types:
  • Purchase
  • ContactPerson
  • InvoiceReference
  • CostCenter
  • InvoiceRecipient
  • LetterNumber
  • AccountingNumber
StringRequired.
Additional types may be introduced in the future
ValueBilling reference valueStringRequired.