Skip to main content

Update Order

Use this request to update an existing Checkout order.
Only cart and merchantData can be updated on an existing order. If you need to update other fields, simply create a new Checkout order.

caution

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

info

HTTP status code 200 indicates a successful update

info

Method POST is also supported. Works exactly the same way as PUT

Endpoint

Method: POST
/api/orders/{orderId}

Request

URI Parameters

NameDescriptionTypeAdditional Information
orderIdOrderId returned by CreateOrder requestInt64
required field
Body Parameters

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

Response

Order

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