Update cart
PATCH /v3/session/:sessionId/order/update/cart
Update cart and amounts of a completed but not fully captured session.
Path Parameters
- sessionId string required
Format: UUID
Example: c5674f4f-7e84-405c-a44b-c83736bb7209
Header Parameters
- Content-Type string
Possible values: [
application/json
] - Accept string
Possible values: [
application/json
] - Authorization string
Format: "Basic <base64(username:secret)>"
- application/json
Request Body
data object required
order object required
amountIncVat amountIncVat requiredAmount including vat/tax. Should be in cents / minor units. e.g. 1 SEK = 100.
amountExVat amountExVat requiredAmount excluding vat/tax. Should be in cents / minor units. e.g. 1 SEK = 100.
currency currency requiredExample: SEK, EUR, USD
cart object[] required
Possible values:
>= 1
Array [- oneOf
- Regular items
- US sales tax
productType string requiredPossible values: [
physical
,digital
,discount
,shipping_fee
,deposit
,surcharge
,adjustment
,gift_card
]Type of item.
'discount' - the unitPrice should be negative.
'adjustment' - Can only be used on refunds.
'gift_card' - When gift_card is used, a positive value indicates that a gift card is being purchased, and a negative value indicates a gift card being used as part of the payment. Keep in mind that gift cards are generally exempt from VAT/Tax as it's buying a currency and not a product.reference stringPossible values:
<= 256 characters
The SKU of the item
name string requiredPossible values:
<= 256 characters
quantity integer requiredPossible values:
>= 1
quantityUnit string requiredPossible values:
<= 10 characters
unitPrice integer requiredUnit price in minor units (e.g. 1 EUR = 100 unitPrice). Should be excluding VAT and excluding discount.
taxRate integer requiredThe applicable taxrate in minor units. Eg 25% = 2500
discountPercentage integerDiscount value in percentages. 10% = 1000
productType string requiredPossible values: [
sales_tax
]Has to be "sales_tax".
name string requiredPossible values:
<= 256 characters
reference stringPossible values:
<= 256 characters
Reference
totalTaxAmount integer requiredTotal tax amount for the order in minor units (e.g. 1 USD = 100 totalTaxAmount).
]
- 204
- 400
- 403
- application/json
- Schema
- Example (from schema)
Schema
error object
code stringPossible values: [
INVALID_CREDENTIALS
,INVALID_DATA
,ORDER_NOT_COMPLETED
,ORDER_REJECTED
,ORDER_PENDING
,ORDER_CANCELLED
,UPDATE_NOT_ALLOWED
,UPDATE_NOT_SUPPORTED
,UNKNOWN
]message string
{
"error": {
"code": "INVALID_CREDENTIALS",
"message": "string"
}
}
- application/json
- Schema
- Example (from schema)
Schema
error object
code stringPossible values: [
INVALID_CREDENTIALS
,INVALID_API_KEY
,AUTH_SECRET_EXPIRED
]message string
{
"error": {
"code": "INVALID_CREDENTIALS",
"message": "string"
}
}