Data Types
Address
Name | Description | Type | Additional Information |
---|---|---|---|
FullName | For B2B customers this field contains the company name | String | |
FirstName | Empty 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 | |
LastName | Empty 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 | |
StreetAddress | String | ||
StreetAddress2 | May be populated on international addresses that require multiple address rows | String | |
StreetAddress3 | May be populated on international addresses that require multiple address rows | String | |
CoAddress | String | ||
PostalCode | String | ||
City | String | ||
CountryCode | String | ||
(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
Name | Description | Type | Additional Information |
---|---|---|---|
CampaignCode | Int64 | ||
Description | String | ||
PaymentPlanType | Standard (0), InterestFree (1), InterestAndAmortizationFree (2) | ||
ContractLengthInMonths | Int32 | ||
MonthlyAnnuityFactor | Decimal | ||
InitialFee | Decimal | ||
NotificationFee | Decimal | ||
InterestRatePercent | Decimal | ||
NumberOfInterestFreeMonths | Int32 | ||
NumberOfPaymentFreeMonths | Int32 | ||
FromAmount | Decimal | ||
ToAmount | Decimal | ||
MonthlyAmount | Decimal / Null | Is only calculated when an amount was added to the request. |
Cart
Shopping cart.
Quantity, UnitPrice, DiscountPercent, DiscountAmount and VatPercent for each order row expected to be given in minor units.
Name | Description | Type | Additional Information |
---|---|---|---|
Items | Order rows. | Collection of OrderRow | Maximum allowed number of rows per order is 1000. |
CheckoutOrderStatus
CheckoutOrderStatus values indicate in which state the order session is:
Status Code | Numerical Value | Description |
---|---|---|
Cancelled | -1 | Order 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. |
Created | 0 | Checkout order session has been created and is active. When an order session is active, cart and merchantData can be changed. |
Final | 100 | Customer 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
Name | Description | Type | Additional Information |
---|---|---|---|
Valid | Boolean | ||
ClientOrderNumber | String | ||
Message | String |
CreateOrderModel
Name | Description | Type | Additional Information |
---|---|---|---|
countryCode | String | ||
currency | String | ||
locale | Locale for the order | String | Supported: sv-se, da-dk, de-de, en-us, fi-fi, nn-no. |
clientOrderNumber | A 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-123 | String | Max length: 32 |
merchantSettings | MerchantSettings | ||
cart | The total cost of the order rows in the cart needs to be equal or higher than 0 but the cart must not be empty. | Cart | Free order items/rows, like gift cards, can have a value of 0, denoting no cost |
presetValues | Collection of PresetValue | ||
identityFlags | IdentityFlags | ||
requireElectronicIdAuthentication | Boolean | ||
partnerKey | Provided by Svea to select partners. | Guid | |
merchantData | Metadata visible to the store | String | Max length: 6000 Cleaned up from Checkout database after 45 days. |
shippingInformation | Shipping 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 |
validation | Order 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) | OrderValidation | Apply it in order to have order validation such as minimum age / Nullable |
recurring new | Indicates 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 / Null | In order to create recurring order this field should be set to true |
Customer
Name | Description | Type | Additional Information |
---|---|---|---|
Id | Int64 | ||
NationalId | String | ||
CountryCode | String | ||
IsCompany | Boolean | ||
VatNumber | String | ||
IsVerified | Boolean |
Order Model
Name | Description | Type | Additional Information |
---|---|---|---|
OrderId | The id of the Order, needed to get and update order in the Checkout API | Int64 | |
ClientOrderNumber | String | ||
Gui | Contains the Snippet that is used to embed the Checkout UI on your site | Gui | |
Status | The current status of the order | CheckoutOrderStatus | |
Cart | Order rows. | Cart | |
Currency | Currency as defined by ISO 4217 | String | |
Locale | The locale of the Checkout, e.g. sv-SE. | String | |
Customer | Customer information | Customer | |
CountryCode | Defined by two-letter ISO 3166-1 alpha-2, e.g. SE, NO, FI, DK | String | |
EmailAddress | Customer's email address | String | |
PhoneNumber | Customer's phone number | String | |
ShippingAddress | Customer's shipping address. | Address | |
BillingAddress | Customer's billing address. | Address | |
PaymentType | The payment method that the customer used to finish the purchase. Only set when order status is Final
| String | |
Payment | The payment method that the customer used to finish the purchase. Only set when order status is Final | PaymentInfo | |
SveaWillBuyOrder | True = Svea will buy this invoice. False = Svea will not buy this invoice. null = Selected payment method is not Invoice. | Boolean | |
MerchantSettings | MerchantSettings | ||
IdentityFlags | IdentityFlags | ||
CustomerReference | B2B Customer reference | String | |
PeppolId | A 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 | |
MerchantData | Metadata visible to the store | String | Cleaned up from Checkout database after 45 days. |
ShippingInformation | The 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 new | Indicates 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 new | Recurring token to be used for subsequent recurring orders. Only available when order is finalized. Only applicable if merchant has recurring orders enabled. | String / Null | |
BillingReferences | A collection of B2B billing references. | BillingReference | Applicable for B2B orders |
Gui
Name | Description | Type | Additional Information |
---|---|---|---|
Snippet | HTML-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
Name | Description | Type | Additional Information |
---|---|---|---|
HideNotYou | Boolean | ||
HideChangeAddress | Boolean | ||
HideAnonymous | Boolean |
MerchantSettings
Name | Description | Type | Additional Information |
---|---|---|---|
WebhookUri | URI of the webhook in order to be called by shipping services | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
CheckoutUri | URI to the page in the webshop where the Checkout will be shown. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
ConfirmationUri | URI to the page in the webshop where the customer should be redirected after the Checkout is completed. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
TermsUri | URI to a page with webshop terms. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
PushUri | URI 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:
| String | Must be a valid callback URI Max length: 500 |
CheckoutValidationCallBackUri | An 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:
| String | Must be a valid callback URI Max length: 500 |
ActivePartPaymentCampaigns | List of valid CampaignIDs. If used, a list of available part payment campaign options will be filtered through the chosen list. | Collection of Int64 | Must be a list of valid CampaignIDs. |
PromotedPartPaymentCampaign | If used, the chosen campaign will be listed first in all payment method lists. | Int64 | Must be valid CampaignID. |
UseClientSideValidation | If 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 | Boolean | Default value is false. |
RequireClientSideValidationResponse | Used 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 | Boolean | Default value is false. |
Order-Validation
Name | Description | Type | Additional Information |
---|---|---|---|
MinAge | Minimum age required for the order | Int64 / NULL | In order to apply minimum age |
OrderRow
Quantity, UnitPrice, DiscountPercent, DiscountAmount and VatPercent for each order row expected to be given in minor units.
Maximum allowed number of rows per order is 1000.
Name | Description | Type | Additional Information | Examples |
---|---|---|---|---|
Name | Article name. | String | Max length: 40 | |
Quantity | Quantity of the product. | Int64 | 1-7 digits Minor Units. | |
UnitPrice | Price of the product including VAT. | Int64 | 1-13 digits Can be negative. Minor Units. | |
ArticleNumber | Article number | String | Max length: 256 | |
DiscountPercent | The discount percent of the order row. Cannot be used together with DiscountAmount | Int64 | Min: 0 Max: 10000 No fractions Minor Units. | |
DiscountAmount | The total discount amount for this order row. Cannot be used together with DiscountPercent | Int64 | Min: 0 Max: Order row total Minor Units. | |
VatPercent | The VAT percentage of the current product. Valid vat percentage for that country. | Int64 | Minor Units. | |
Unit | The unit type, e.g., “st”, “pc”, “kg” etc. | String | Max length: 4 | |
TemporaryReference | Can 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 | ||
RowNumber | The row number the row will have in the Webpay system | Int32 | ||
MerchantData | Metadata visible to the store | String | Max length: 255 Cleaned up from Checkout database after 45 days. | |
RowType | Is used just to distinguish ShippingFee item from the order items. It is a string and can be one of "Row" or “ShippingFee” | String |
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.
Name | Description | Type | Additional Information |
---|---|---|---|
PaymentMethodType | The final payment method type for the order:
| String | Required. |
CampaignCode | Only available for PaymentPlan | Int64 |
PresetValue
Name | Description | Type | Additional Information |
---|---|---|---|
TypeName | Name of the field you want to set (see limits below). | String | |
Value | See limits below. | String | |
IsReadonly | Set this to true if you don't want the end customer to be able to change the value in the Checkout. | Boolean |
List of presetvalue typenames
Name | Type | Additional Information |
---|---|---|
NationalId | String | Country-specific validation. |
EmailAddress | String | Max 50 characters. Must be a valid email address. |
PhoneNumber | String | 1-18 digits, can include “+”, “-“s and space. |
PostalCode | String | Country-specific validation. |
IsCompany | Boolean | Required if nationalid is set to "read only" |
Shipping data types
GetOrderShippingInformation
Name | Description | Type | Additional Information |
---|---|---|---|
EnforceFallback | To force displaying fallback options set this to true | Boolean | In order to test how your fallback options will be demonstrated (Only for testing purposes) |
EnableShipping | If shipping should be enabled for the specific order | Boolean | If 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) |
Weight | Weight of the parcel in grams to get accurate delivery options from nShift | Double | Weight of the parcel in grams |
Tags | Specific metadata info of the parcel to get accurate delivery options from nShift | Key-Value String pairs | Sample: {"IsBulky": "true"} |
FallbackOptions | An array of specified fallback options used when failing to connect with Transport Management System (nShift) | FallbackOption[] | |
ShippingProvider | ShippingProvider |
ShippingInformation (order)
Name | Description | Type | Additional Information |
---|---|---|---|
EnforceFallback | To force displaying fallback options set this to true | Boolean | In order to test how your fallback options will be demonstrated (Only for testing purposes) |
EnableShipping | If shipping should be enabled for the specific order | Boolean | If 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) |
Weight | Weight of the parcel in grams to get accurate delivery options from nShift | Double | Weight of the parcel in grams |
Tags | Specific metadata info of the parcel to get accurate delivery options from nShift | Key-Value String pairs | Sample: {"IsBulky": "true"} |
FallbackOptions | An array of specified fallback options used when failing to connect with Transport Management System (nShift) | FallbackOption[] | Highly recommended to provide fallback options! |
ShouldRejectShippingSession | If shipping session should be cancelled | Boolean | When 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
Name | Description | Type | Additional Information | Examples |
---|---|---|---|---|
Id | Id of the carrier | String | nShift specific (typically in form of a guid) | 79d0c2d3-71f4-4205-a5bc-4aa9ab324c98 |
Carrier | Name of the carrier | String | nShift specific | DHL Home Delivery |
Name | Delivery option name | String | nShift specific | dhl |
ShippingFee | Price of the parcel | Int64 | minor currency! | 2600 = 26.00SEK |
Addons | nshift format Addons | Addon | As similar as nshift models, find out more here | |
Fields | nshift format Fields | Field | As similar as nshift models, find out more here |
ShippingProvider
Name | Description | Type | Additional Information |
---|---|---|---|
Name | Name 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 | |
ShipmentId | Internal order Id | String | Id is only set if the order is final, otherwise empty string will be set. |
ShippingOption | Shipping option set on the order | ShippingOption |
UpdateOrderModel
Name | Description | Type | Additional Information |
---|---|---|---|
cart | Important: 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 | |
merchantData | Metadata visible to the store | String | Max length: 6000 Cleaned up from Checkout database after 45 days |
shippingInformation | Shipping information to be updated. Only applicable if merchant has shipping enabled. | ShippingInformation (order) | |
validation | Order 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) | OrderValidation | Apply it in order to have order validation such as minimum age / Nullable |
BillingReference
Name | Description | Type | Additional Information |
---|---|---|---|
Type | Billing reference types:
| String | Required. Additional types may be introduced in the future |
Value | Billing reference value | String | Required. |