Skip to main content

Create an Instore Order

To create an order, do a rest POST HTTP call to the "/api/v1/orders" endpoint. The body needs to contain information about the order, the customer's mobile phone number, and some merchant settings

info
  • Each call to the Instore API must contain a unique order number for the specific merchant.
  • Quantity, UnitPrice, DiscountPercent and VatPercent for each order row is expected to be given in minor currency. Eg. send 1000 to set a value of 10
  • The vat percent must be valid for the country of the order

Tagging an Order

When an order is created, meta data about the order can be passed in the "tags" property. Providing tags enables new filtering possibilities for reports and statistics.

Example of tags that can be used:

  • Merchant branch/franchise
  • Store name and location
  • Cash register ID and logged on user

If using tags in an hierarchal organization, it is recommended to provide a tag for the leaf node - i.e., the store, as well as tags for each parent up to the root node, i.e., "Solna, Stockholm, SE' if these are regions in the merchant's organization.

Endpoint

Method: POST
/api/v1/orders

Request

NameDescriptionTypeAdditional Information
merchantOrderNumberA string that identifies the order in the merchant’s systems. The merchantOrderNumber is unique per order. 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
countryCodeString
currencyString
mobilePhoneNumberString
tagsArray of String
orderItemsThe total cost of the order rows in the cart needs to be equal or higher than 0 but the cart must not be empty.Order ItemsFree order items/rows, like gift cards, can have a value of 0, denoting no cost
callbackUriTo receive a callback when an order status changes, you need a web server receiving HTTP POST calls.
termsUriURI to a page with webshop terms.StringMust be a valid URI
Must be accessible by end customer
Max length: 500
deferredDeliveryTo flag an order with deferred delivery, set the "deferredDelivery" property to true (default: false) when creating the order.BooleanMore Information
minutesUntilLinkExpiresInt32
presetValuesCollection of PresetValue
requireElectronicIdAuthenticationBoolean
merchantName
partnerKeyProvided by Svea to select partners.Guid
identityFlagsUsed to control what actions the user is able to performIdentityFlags
required field

Response

NameDescriptionTypeAdditional Information
smsSentSuccessfullyWhether the Instore link was send to customer successfullyBoolean
merchantOrderNumberOrder No from Merchant systemString
instoreUiUriInstore URL generatedString
orderStatusStatus of the orderString
paymentOrderIdCheckout Order Id which identifies an Order , which can be used for managing OrdersString
orderItemsCart