{"openapi":"3.0.0","info":{"version":"0.2.6","title":"Superpay Webhooks","description":"Endpoints required for Superpay to work"},"paths":{"/AdjustCart":{"post":{"description":"Updates or creates a new cart with given information and actions","operationId":"AdjustCart","tags":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/CustomerCartRequest"},"examples":{"CreateCart":{"summary":"CreateCart","value":{"customerToken":null,"uid":null,"cartId":null,"isInvoiceSameAsDelivery":true,"actions":[{"type":"addtocart","qty":6,"productId":"1234"}]}},"ApplyDeliveryMethod":{"summary":"ApplyDeliveryMethod","value":{"uid":null,"cartId":"1234","actions":[],"customerToken":null,"isInvoiceSameAsDelivery":true,"deliveryMethod":{"machineName":"postnord","options":[{"key":"place_package","value":"Bag mig"}]}}},"FullRequest":{"summary":"FullRequest","value":{"uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","cartId":"1234","isInvoiceSameAsDelivery":true,"actions":[{"type":"reset"},{"type":"addtocart","qty":6,"productId":"1234"}],"customerToken":null,"contactData":{"fullName":"Casper Rasmussen","phoneNumber":"+4512345678","email":"myreal@email.com"},"deliveryData":{"countryCode":"DK","address":"My Street 2c, st. tv.","zipcode":"8200","city":"Aarhus N"},"deliveryMethod":{"machineName":"postnord","options":[{"key":"place_package","value":"Skal stilles i garagen"}]}}}}}}},"responses":{"200":{"description":"Successfully cart creation with anonymous user","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/CustomerCartStoreResponse"},"examples":{"CreateCartAnonymous":{"value":{"messages":[],"cart":{"uid":null,"id":"asd","checkoutURL":"https://my-webshop.com/checkout/asd","total":"1000","checkoutChargeAmount":"1000","totalTax":"250","contactData":null,"deliveryData":null,"isInvoiceSameAsDelivery":true,"currencyCode":"DKK","lineItems":[],"appliedDiscountCodes":[],"shippingDiscountAllocations":[],"deliveryMethodData":null,"requiredRestrictions":[],"fulfilledRestrictions":[],"isAgeVerifiedOnCart":false,"isAgeVerifiedOnUser":false,"requiresShipping":false},"deliveryMethods":[]}}}}}}}}},"/GetDeliveryMethods":{"post":{"description":"Requests list of possible delivery methods for a specific cart","operationId":"GetDeliveryMethods","tags":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/GetDeliveryMethodsRequestDto"}}}},"responses":{"200":{"description":"Successfully retrieved delivery methods","content":{"application/json":{"schema":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/DeliveryMethod"},"nullable":false},"examples":{"GetDeliveryMethods":{"value":[{"machineName":"postnord","title":"PostNord - Privat","detailed":"Levering til privatadresse","price":"4900","currencyCode":"DKK","type":"HOME_DELIVERY","compareAtPrice":null,"options":[{"type":"place_package","required":true}]},{"machineName":"gls","title":"GLS - Privat","detailed":"Levering til hjemmeadresse","price":"4900","currencyCode":"DKK","type":"HOME_DELIVERY","compareAtPrice":null,"options":[{"type":"place_package","required":true}]}]}}}}}}}},"/GetOrdersByUID":{"post":{"description":"Is used for Superpay's algorithm to complete a customers cart for a one-click purchase. Should return a max of 20 orders and sorted descending order by purchase date","operationId":"GetOrdersByUID","tags":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/GetOrdersByUidRequest"}}}},"responses":{"200":{"description":"Successfully retrieved orders","content":{"application/json":{"schema":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/CustomerData"},"nullable":false}}}}}}},"/PlaceOrder":{"post":{"description":"Place order in store and return payment links, to redirect the user for payment","operationId":"PlaceOrder","tags":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PlaceOrderRequest"}}}},"responses":{"200":{"description":"Successfully placement of order in the store","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PlaceOrderResponse"}}}}}}},"/PaymentAuthorized":{"post":{"description":"Notifies the store that a payment was authorized or that its authorization was invalidated, so the store can complete or release the order it created in PlaceOrder. Must be idempotent: the same event can be delivered more than once.","operationId":"PaymentAuthorized","tags":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PaymentAuthorizedRequest"},"examples":{"Authorized":{"summary":"Authorized","value":{"event":"payment.authorized","orderId":"000000123","paymentId":"000000123","authorizationId":"000000123","psp":"Vipps MobilePay","authorizedAmount":35870,"capturedAmount":0,"refundedAmount":0,"currency":"DKK","cartId":"nVUsJqvc4OvrdA4fPmD6dSXHrJMOrGo7","testMode":false}},"Cancelled":{"summary":"Cancelled","value":{"event":"payment.cancelled","orderId":"000000124","paymentId":"000000124","authorizationId":"000000124","psp":"Vipps MobilePay","authorizedAmount":0,"capturedAmount":0,"refundedAmount":0,"currency":"DKK","cartId":null,"testMode":false}}}}}},"responses":{"200":{"description":"The store accepted the event. SuperPay stops here — a redelivery of the same event must also answer 2xx.","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PaymentAuthorizedResponse"},"examples":{"Handled":{"value":{"orderId":"000000123","status":"processing"}}}}}},"4xx":{"description":"Permanent failure — the store will never accept this event (for example it does not know the order). SuperPay reports it and stops retrying. Do NOT answer 4xx for a temporary problem.","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PaymentAuthorizedResponse"}}}},"5xx":{"description":"Temporary failure. SuperPay fails the payment provider callback, so the provider redelivers on its own retry schedule.","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/PaymentAuthorizedResponse"}}}}}}},"/AuthGetAccount":{"post":{"description":"Not required, is only used for specific webshops with age restricted products. Get account information for a user. Request will always contain either a uid or an email","operationId":"AuthGetAccount","tags":["authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/AuthCreateCustomerTokenRequest"},"examples":{"GetAccountByUID":{"summary":"GetAccountByUID","value":{"email":null,"uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f"}},"GetAccountByEmail":{"summary":"GetAccountByEmail","value":{"email":"my-account@email.com","uid":null}}}}}},"responses":{"200":{"description":"Successfully validated a password for a user","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/AuthAccountResponse"},"examples":{"GetAccount":{"value":{"status":"ok","message":null,"account":{"uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","isEmailVerified":true,"email":"my@email.com","havePassword":true}}}}}}}}}},"/AuthCreateCustomerToken":{"post":{"description":"Not required, is only used for specific webshops with age restricted products. Used to validate a password for a user. If valid the user will be logged in","operationId":"AuthCreateCustomerToken","tags":["authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/AuthCreateCustomerTokenRequest"},"examples":{"UserPasswordVerify":{"summary":"UserPasswordVerify","value":{"cartId":"xasdggds34fds","password":"SuperSecretPassword","authenticationType":"password","uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","email":null,"loginContext":"age-verification"}},"UserPasswordVerifyWithEmail":{"summary":"UserPasswordVerifyWithEmail","value":{"cartId":"xasdggds34fds","password":"SuperSecretPassword","authenticationType":"password","uid":null,"email":"my-account@email.com","loginContext":"age-verification"}},"UserPasskeyVerify":{"summary":"UserPasskeyVerify","value":{"cartId":"xasdggds34fds","authenticationType":"passkey","uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","email":null,"password":null,"loginContext":"age-verification"}}}}}},"responses":{"200":{"description":"Successfully validated a password for a user","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/CreateCustomerTokenResponse"},"examples":{"UserPasswordVerified":{"value":{"status":"ok","message":null,"customerToken":"sfgkslfdkgjdflgk","cart":{"messages":[],"cart":{"uid":null,"id":"asd","checkoutURL":"https://my-webshop.com/checkout/asd","total":"1000","checkoutChargeAmount":"1000","totalTax":"250","contactData":null,"deliveryData":null,"isInvoiceSameAsDelivery":true,"currencyCode":"DKK","lineItems":[],"appliedDiscountCodes":[],"shippingDiscountAllocations":[],"deliveryMethodData":null,"requiredRestrictions":[],"fulfilledRestrictions":[],"isAgeVerifiedOnCart":false,"isAgeVerifiedOnUser":false,"requiresShipping":false},"deliveryMethods":[]},"account":{"uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","isEmailVerified":true,"email":"my@email.com","havePassword":true}}}}}}}}}},"/AuthCreateCustomerAccount":{"post":{"description":"Not required, is only used for specific webshops with age restricted products. Used to create an account with provided credentials","operationId":"AuthCreateCustomerAccount","tags":["authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/AuthCreateCustomerAccountRequest"},"examples":{"CustomerAccountCreate":{"summary":"CustomerAccountCreate","value":{"password":"SuperSecretPassword","email":"my@email.com","cartId":"xasdggds34fds"}}}}}},"responses":{"200":{"description":"Successfully created account","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/CreateCustomerAccountResponse"},"examples":{"AccountCreated":{"value":{"status":"ok","message":null,"customerToken":"sfgkslfdkgjdflgk","account":{"uid":"57863e6b-7a04-4184-ae26-7a2850e48a2f","isEmailVerified":true,"email":"my@email.com","havePassword":true}}}}}}}}}},"/UserIDVerification":{"post":{"description":"Not required, is only used for specific webshops with age restricted products. When a customer succeeds in verifying their identity with MitID, this webhook is used to mark the Cart or User as verified","operationId":"UserIDVerification","tags":["age-verification"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/UserIdVerificationRequest"},"examples":{"UserSucceededMitIDVerification":{"summary":"UserSucceededMitIDVerification","value":{"customerToken":null,"uid":null,"saveOnUser":false,"verificationUserId":"1da5da20-aaf2-4608-a736-a5d333db2ab5","idempotencyKey":"9f3ef445-3f28-4ea8-9b78-4d08a9f2ceeb","birthdate":"2000-03-28T00:00:00.000Z","cartId":"1235lfjgsdfg34","type":"mitid"}},"LoggedInUserSucceededMitIDVerification":{"summary":"LoggedInUserSucceededMitIDVerification","value":{"customerToken":"dfgdfgdfg","uid":"c8b1239a-bb9a-4405-baed-aa830eb54ae1","saveOnUser":true,"verificationUserId":"1da5da20-aaf2-4608-a736-a5d333db2ab5","idempotencyKey":"9f3ef445-3f28-4ea8-9b78-4d08a9f2ceeb","birthdate":"2000-03-28T00:00:00.000Z","cartId":"1235lfjgsdfg34","type":"mitid"}},"RequestToSaveVerificationUserId":{"summary":"RequestToSaveVerificationUserId","value":{"customerToken":"dfgdfgdfg","uid":"c8b1239a-bb9a-4405-baed-aa830eb54ae1","saveOnUser":true,"verificationUserId":"1da5da20-aaf2-4608-a736-a5d333db2ab5","idempotencyKey":"9f3ef445-3f28-4ea8-9b78-4d08a9f2ceeb","birthdate":"2000-03-28T00:00:00.000Z","cartId":"1235lfjgsdfg34","type":"mitid"}}}}}},"responses":{"200":{"description":"Successfully received the user verification","content":{"application/json":{"schema":{"nullable":false,"$ref":"#/components/schemas/CustomerCartStoreResponse"}}}}}}}},"components":{"schemas":{"OrderContact":{"type":"object","properties":{"phoneNumber":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"fullName":{"type":"string","nullable":true}}},"OrderDelivery":{"type":"object","properties":{"countryCode":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true}}},"KeyValue":{"type":"object","properties":{"key":{"type":"string","nullable":false},"value":{"type":"string","nullable":true}}},"OrderDeliveryMethod":{"type":"object","properties":{"deliveryMethod":{"type":"string","nullable":true},"options":{"type":"array","items":{"nullable":true,"$ref":"#/components/schemas/KeyValue"}}}},"OrderInvoiceAddress":{"type":"object","properties":{"phoneNumber":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"fullName":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true}}},"CartActionType":{"type":"string","enum":["addtocart","removefromcart","reset"]},"CustomerCartAction":{"type":"object","properties":{"type":{"nullable":false,"description":"Action type","$ref":"#/components/schemas/CartActionType"},"qty":{"type":"number","nullable":true,"description":"Used with addtocart action"},"productId":{"type":"string","nullable":true,"description":"Used with addtocart or removefromcart action"}}},"ActionInputAddToCart":{"type":"object","description":"One of following fields","properties":{"qty":{"type":"number","nullable":false},"productId":{"type":"string","nullable":false}}},"ActionInputRemoveFromCart":{"type":"object","properties":{"productId":{"type":"string","nullable":false}}},"ProductVariantSelectedOption":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"value":{"type":"string","nullable":false}}},"ActionInputChangeVariant":{"type":"object","properties":{"lineItemId":{"type":"string","nullable":false},"productId":{"type":"string","nullable":false},"options":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/ProductVariantSelectedOption"}}}},"ActionInputApplyDiscountCode":{"type":"object","properties":{"discountCode":{"type":"string","nullable":false}}},"CustomerCartActionV2":{"type":"object","description":"One of following fields","properties":{"addToCart":{"nullable":true,"$ref":"#/components/schemas/ActionInputAddToCart"},"removeFromCart":{"nullable":true,"$ref":"#/components/schemas/ActionInputRemoveFromCart"},"changeVariant":{"nullable":true,"$ref":"#/components/schemas/ActionInputChangeVariant"},"applyDiscount":{"nullable":true,"$ref":"#/components/schemas/ActionInputApplyDiscountCode"},"removeDiscount":{"nullable":true,"$ref":"#/components/schemas/ActionInputApplyDiscountCode"},"resetCart":{"type":"boolean","nullable":true}}},"CustomerCartRequest":{"type":"object","properties":{"uid":{"type":"string","nullable":true},"cartId":{"type":"string","nullable":true,"description":"cartId will be null if a new cart should be created"},"customerToken":{"type":"string","nullable":true,"description":"If store supports user logging in through Superpay, this will contain a customerToken provided by the store if a customer is logged in."},"contactData":{"nullable":true,"$ref":"#/components/schemas/OrderContact"},"deliveryData":{"nullable":true,"$ref":"#/components/schemas/OrderDelivery"},"deliveryMethod":{"nullable":true,"$ref":"#/components/schemas/OrderDeliveryMethod"},"invoiceAddress":{"nullable":true,"description":"Is only used if the customer wants to use a different address for invoicing than the delivery address","$ref":"#/components/schemas/OrderInvoiceAddress"},"isInvoiceSameAsDelivery":{"type":"boolean","nullable":true,"description":"If true, the invoice address will be the same as the delivery address. Is parsed when either shipping or invoice address is set"},"actions":{"type":"array","items":{"nullable":true,"description":"Deprecated: Use actionsV2","deprecated":true,"$ref":"#/components/schemas/CustomerCartAction"}},"actionsV2":{"type":"array","items":{"nullable":true,"$ref":"#/components/schemas/CustomerCartActionV2"}},"extraDataJSON":{"type":"string","nullable":true}}},"CustomerCartLineItemSpec":{"type":"object","properties":{"key":{"type":"string","nullable":false},"label":{"type":"string","nullable":false},"value":{"type":"string","nullable":true}}},"CartLineItemCtaType":{"type":"string","enum":["continue_shopping"]},"CustomerCartLineItemCta":{"type":"object","properties":{"label":{"type":"string","nullable":false},"type":{"nullable":false,"$ref":"#/components/schemas/CartLineItemCtaType"}}},"CartRestriction":{"type":"string","enum":["min_15_years","min_16_years","min_17_years","min_18_years","min_19_years","min_20_years","min_21_years","min_22_years","min_23_years","min_24_years","min_25_years"]},"ProductVariantOptionAvailability":{"type":"string","enum":["in_stock","out_of_stock","unknown"]},"ProductVariantOptionValue":{"type":"object","properties":{"value":{"type":"string","nullable":false},"availability":{"nullable":false,"$ref":"#/components/schemas/ProductVariantOptionAvailability"}}},"ProductVariantOptions":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"values":{"type":"array","items":{"type":"string","nullable":false}},"valuesV2":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/ProductVariantOptionValue"}}}},"LineItemDiscountAllocation":{"type":"object","properties":{"discountCode":{"type":"string","nullable":true,"description":"The discount code that was applied. May be null for automatic discounts."},"title":{"type":"string","nullable":false,"description":"The title/name of the discount (e.g., \"10% off products\")"},"discountedAmount":{"type":"string","nullable":false,"description":"The total discounted amount for this line item in minor units (e.g., cents/øre)"},"currencyCode":{"type":"string","nullable":false,"description":"The currency code for the discounted amount (e.g., \"DKK\")"}}},"CustomerCartLineItem":{"type":"object","properties":{"productId":{"type":"string","nullable":true},"qty":{"type":"integer","nullable":false},"singlePrice":{"type":"string","nullable":false},"totalPrice":{"type":"string","nullable":false},"totalCompareAtPrice":{"type":"string","nullable":true},"title":{"type":"string","nullable":false},"qtyChangeable":{"type":"boolean","nullable":false},"currencyCode":{"type":"string","nullable":false},"tax":{"type":"string","nullable":false},"url":{"type":"string","nullable":true},"thumbnailURL":{"type":"string","nullable":true},"specs":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/CustomerCartLineItemSpec"}},"cta":{"nullable":true,"$ref":"#/components/schemas/CustomerCartLineItemCta"},"requiredRestrictions":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/CartRestriction"}},"variantOptions":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/ProductVariantOptions"}},"selectedOptions":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/ProductVariantSelectedOption"}},"discountAllocations":{"type":"array","items":{"nullable":false,"description":"Discount allocations applied to this line item. Shows which discounts are active and how much they reduce the price.","$ref":"#/components/schemas/LineItemDiscountAllocation"}}}},"CtaItemTag":{"type":"object","properties":{"label":{"type":"string","nullable":false},"value":{"type":"string","nullable":false}}},"CtaItemCarouselBlockItem":{"type":"object","properties":{"title":{"type":"string","nullable":false},"description":{"type":"html","nullable":false},"imageURL":{"type":"string","nullable":false},"defaultQty":{"type":"integer","nullable":false},"productId":{"type":"string","nullable":false},"currencyCode":{"type":"string","nullable":false},"compareAtPrice":{"type":"string","nullable":true},"compareAtPriceMinQty":{"type":"integer","nullable":true},"price":{"type":"string","nullable":false},"priceMinQty":{"type":"integer","nullable":false},"unit":{"type":"string","nullable":false},"minQty":{"type":"integer","nullable":false},"maxQty":{"type":"integer","nullable":true},"itemURL":{"type":"string","nullable":true},"tags":{"type":"array","items":{"nullable":true,"$ref":"#/components/schemas/CtaItemTag"}}}},"CtaItemCarouselBlock":{"type":"object","properties":{"title":{"type":"string","nullable":false},"items":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/CtaItemCarouselBlockItem"}}}},"CustomerCartLineItemEnum":{"type":"array","items":{"oneOf":[{"nullable":false,"$ref":"#/components/schemas/CustomerCartLineItem"},{"nullable":false,"$ref":"#/components/schemas/CtaItemCarouselBlock"}]}},"AppliedCodeType":{"type":"string","enum":["DISCOUNT_CODE","GIFT_CARD"]},"AppliedDiscountCode":{"type":"object","properties":{"discountCode":{"type":"string","nullable":false},"applicable":{"type":"boolean","nullable":false,"description":"If the cart have changed and the discount code is no longer applicable, this should return false. Superpay will let the customer know and remove the code"},"discountAmount":{"type":"number","nullable":false},"message":{"type":"string","nullable":true,"description":"A message explaining why the discount code is not applicable, e.g. \"RABAT10 couldn't be used with your existing discounts.\""},"type":{"nullable":false,"description":"The type of code - either a regular discount code or a gift card","$ref":"#/components/schemas/AppliedCodeType"},"giftCardBalance":{"type":"number","nullable":true,"description":"The remaining balance on the gift card after this transaction (in minor units). Only set for gift cards."},"lastCharacters":{"type":"string","nullable":true,"description":"The last 4 characters of the gift card code for identification. Only set for gift cards."}}},"CustomerCart":{"type":"object","properties":{"id":{"type":"string","nullable":false},"uid":{"type":"string","nullable":true},"total":{"type":"string","nullable":false},"checkoutChargeAmount":{"type":"string","nullable":false,"description":"The amount to charge at checkout after gift cards are applied. This is the amount that should be sent to the PSP. If zero, the order can be completed without PSP payment (100% gift card payment)."},"currencyCode":{"type":"string","nullable":false},"totalTax":{"type":"string","nullable":false},"checkoutURL":{"type":"string","nullable":false,"description":"Used to link directly into checkout for this cart. Superpay will add \"cartId\" and \"uid\" as query parameter if available"},"lineItems":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/CustomerCartLineItemEnum"}},"invoiceAddress":{"nullable":true,"description":"Is only used if the customer wants to use a different address for invoicing than the delivery address","$ref":"#/components/schemas/OrderInvoiceAddress"},"isInvoiceSameAsDelivery":{"type":"boolean","nullable":false,"description":"This is a calculated field by Superpay. Will be overridden if parsed by store integration"},"requiresShipping":{"type":"boolean","nullable":false,"description":"If not parsed by store integration, this is always true"},"contactData":{"nullable":true,"$ref":"#/components/schemas/OrderContact"},"deliveryData":{"nullable":true,"$ref":"#/components/schemas/OrderDelivery"},"deliveryMethodData":{"nullable":true,"$ref":"#/components/schemas/OrderDeliveryMethod"},"requiredRestrictions":{"type":"array","items":{"nullable":false,"description":"Only used for age restricted products","$ref":"#/components/schemas/CartRestriction"}},"fulfilledRestrictions":{"type":"array","items":{"nullable":false,"description":"Only used for age restricted products","$ref":"#/components/schemas/CartRestriction"}},"appliedDiscountCodes":{"type":"array","items":{"nullable":false,"description":"A list of active discount codes applied to the cart","$ref":"#/components/schemas/AppliedDiscountCode"}},"shippingDiscountAllocations":{"type":"array","items":{"nullable":false,"description":"Discount allocations applied to shipping. Contains discount info when shipping discount codes like FRIFRAGT are applied.","$ref":"#/components/schemas/LineItemDiscountAllocation"}},"isAgeVerifiedOnCart":{"type":"boolean","nullable":false,"description":"Only used for age restricted products. Case 1: If a user is logged in and have previously completed an age-verification flow. Case 2: User is not logged in, but the user have completed an age-verification for this cart"},"isAgeVerifiedOnUser":{"type":"boolean","nullable":false,"description":"Only used for age restricted products. Is used to indicate if a user should login and reuse their verification from previously completed age-verification flow"}}},"DeliveryMethodPickupPointAddress":{"type":"object","properties":{"address":{"type":"string","nullable":false},"zipcode":{"type":"string","nullable":false},"city":{"type":"string","nullable":false},"countryCode":{"type":"string","nullable":false}}},"Coordinates":{"type":"object","properties":{"latitude":{"type":"number","nullable":false},"longitude":{"type":"number","nullable":false}}},"OpeningHours":{"type":"object","properties":{"from":{"type":"string","nullable":false},"to":{"type":"string","nullable":false}}},"WeekdayOpeningHours":{"type":"object","properties":{"monday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"tuesday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"wednesday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"thursday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"friday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"saturday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"},"sunday":{"nullable":false,"$ref":"#/components/schemas/OpeningHours"}}},"DeliveryMethodPickupPoint":{"type":"object","properties":{"id":{"type":"string","nullable":false},"code":{"type":"string","nullable":false},"title":{"type":"string","nullable":false},"distanceMeters":{"type":"number","nullable":false},"address":{"nullable":false,"$ref":"#/components/schemas/DeliveryMethodPickupPointAddress"},"coordinates":{"nullable":false,"$ref":"#/components/schemas/Coordinates"},"openingHours":{"nullable":false,"$ref":"#/components/schemas/WeekdayOpeningHours"}}},"DeliveryMethodOption":{"type":"object","properties":{"type":{"type":"string","nullable":false,"description":"Options: place_package, delivery_date, pickup_point"},"required":{"type":"boolean","nullable":false},"minDate":{"type":"string","nullable":true,"description":"Only used for type delivery_date"},"maxDate":{"type":"string","nullable":true,"description":"Only used for type delivery_date"},"disabledDates":{"type":"array","items":{"type":"string","nullable":true,"description":"Only used for type delivery_date"}},"pickupPoints":{"type":"array","items":{"nullable":true,"description":"Only used for type pickup_point","$ref":"#/components/schemas/DeliveryMethodPickupPoint"}}}},"DeliveryMethodType":{"type":"string","enum":["HOME_DELIVERY","PICKUP_POINT","PICKUP_STORE"]},"DeliveryMethod":{"type":"object","properties":{"machineName":{"type":"string","nullable":false},"title":{"type":"string","nullable":false},"detailed":{"type":"string","nullable":true},"price":{"type":"string","nullable":false},"compareAtPrice":{"type":"string","nullable":true,"description":"The original price before any shipping discounts. If null, there is no discount on shipping."},"currencyCode":{"type":"string","nullable":false},"options":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/DeliveryMethodOption"}},"type":{"nullable":true,"description":"Defaults to home delivery","$ref":"#/components/schemas/DeliveryMethodType"}}},"CustomerCartStoreResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"string","nullable":false}},"cart":{"nullable":false,"$ref":"#/components/schemas/CustomerCart"},"deliveryMethods":{"type":"array","items":{"nullable":false,"$ref":"#/components/schemas/DeliveryMethod"}}}},"GetDeliveryMethodsRequestDto":{"type":"object","properties":{"cartId":{"type":"string","nullable":false}}},"GetOrdersByUidRequest":{"type":"object","properties":{"uid":{"type":"string","nullable":true,"description":"At least uid or email is provided"},"email":{"type":"string","nullable":true,"description":"At least uid or email is provided"}}},"CustomerData":{"type":"object","properties":{"orderId":{"type":"string","nullable":false},"uid":{"type":"string","nullable":false},"paymentMethod":{"type":"string","nullable":true},"contactData":{"nullable":true,"$ref":"#/components/schemas/OrderContact"},"deliveryData":{"nullable":true,"$ref":"#/components/schemas/OrderDelivery"},"deliveryMethodData":{"nullable":true,"$ref":"#/components/schemas/OrderDeliveryMethod"}}},"PlaceOrderRequest":{"type":"object","properties":{"cartId":{"type":"string","nullable":false},"uid":{"type":"string","nullable":true},"customerToken":{"type":"string","nullable":true,"description":"If store supports user logging in through Superpay, this will contain a customerToken provided by the store if a customer is logged in."},"acceptsMarketing":{"type":"boolean","nullable":true,"description":"Is true if customer have accepted marketing"}}},"PlaceOrderResponse":{"type":"object","properties":{"continueURL":{"type":"string","nullable":false},"callbackURL":{"type":"string","nullable":false},"continue_url":{"type":"string","nullable":false,"description":"Deprecated: use continueURL instead","deprecated":true},"callback_url":{"type":"string","nullable":false,"description":"Deprecated: use callbackURL instead","deprecated":true},"orderId":{"type":"string","nullable":false},"orderTotal":{"type":"number","nullable":false,"description":"Is used to compare cart total with generated order total"}}},"PaymentAuthorizedEvent":{"type":"string","enum":["payment.authorized","payment.cancelled"]},"PaymentAuthorizedRequest":{"type":"object","properties":{"event":{"nullable":false,"$ref":"#/components/schemas/PaymentAuthorizedEvent"},"orderId":{"type":"string","nullable":false,"description":"The order id your store returned from PlaceOrder. This is what the payment was created against, so it is how you look the order up."},"paymentId":{"type":"string","nullable":false,"description":"The payment's id at the payment provider."},"authorizationId":{"type":"string","nullable":false,"description":"Identifies the authorization itself. Stable across redeliveries of the same event, so it is usable as an idempotency key."},"psp":{"type":"string","nullable":false,"description":"Which payment provider handled the payment, e.g. \"Vipps MobilePay\"."},"authorizedAmount":{"type":"integer","nullable":false,"description":"Amount reserved, in minor units (Danish øre). Compare this with your own order total before marking the order paid."},"capturedAmount":{"type":"integer","nullable":false,"description":"Amount captured so far, in minor units."},"refundedAmount":{"type":"integer","nullable":false,"description":"Amount refunded so far, in minor units."},"currency":{"type":"string","nullable":false},"cartId":{"type":"string","nullable":true},"testMode":{"type":"boolean","nullable":false,"description":"True when the payment was made against the provider's test environment."}}},"PaymentAuthorizedResponse":{"type":"object","properties":{"orderId":{"type":"string","nullable":true,"description":"Echo of the order id that was updated. Informational."},"status":{"type":"string","nullable":true,"description":"Informational status of the order after handling, e.g. \"processing\". SuperPay does not act on this — the HTTP status code is what matters."}}},"CustomerAuthenticationType":{"type":"string","enum":["password","passkey"]},"AuthCreateCustomerTokenRequest":{"type":"object","properties":{"uid":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"authenticationType":{"nullable":false,"$ref":"#/components/schemas/CustomerAuthenticationType"},"loginContext":{"type":"string","nullable":false},"cartId":{"type":"string","nullable":true,"description":"If a cart id is available at login, it will be provided here"},"password":{"type":"string","nullable":true,"description":"Only provided when authenticationType is password"}}},"AuthAccount":{"type":"object","properties":{"uid":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"isEmailVerified":{"type":"boolean","nullable":false},"havePassword":{"type":"boolean","nullable":false}}},"AuthAccountResponse":{"type":"object","properties":{"status":{"type":"string","nullable":false},"message":{"type":"string","nullable":true},"account":{"nullable":true,"$ref":"#/components/schemas/AuthAccount"}}},"CreateCustomerTokenResponse":{"type":"object","properties":{"status":{"type":"string","nullable":false},"message":{"type":"string","nullable":true},"customerToken":{"type":"string","nullable":true},"account":{"nullable":true,"$ref":"#/components/schemas/AuthAccount"},"cart":{"nullable":true,"$ref":"#/components/schemas/CustomerCartStoreResponse"}}},"AuthCreateCustomerAccountRequest":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false},"cartId":{"type":"string","nullable":false}}},"CreateCustomerAccountResponse":{"type":"object","properties":{"status":{"type":"string","nullable":false},"message":{"type":"string","nullable":true},"customerToken":{"type":"string","nullable":true},"account":{"nullable":true,"$ref":"#/components/schemas/AuthAccount"}}},"UserIdVerificationRequest":{"type":"object","properties":{"type":{"type":"string","nullable":false,"description":"Can only be \"mitid\" for now"},"verificationUserId":{"type":"string","nullable":false,"description":"A unique id returned by the verification service provider"},"cartId":{"type":"string","nullable":false},"idempotencyKey":{"type":"string","nullable":false,"description":"Stable key for deduplicating retries of the same verification callback"},"customerToken":{"type":"string","nullable":true},"uid":{"type":"string","nullable":true,"description":"Is null when the user is a guest"},"saveOnUser":{"type":"string","nullable":false,"description":"If true, the verification user id should be saved on the user, for future use"},"birthdate":{"type":"string","nullable":false,"description":"Birthdate returned by the user id verification service. Format: ISO 8601"}}}}},"servers":[{"description":"Your API base path","url":"{basePath}","variables":{"basePath":{"default":"https://api.supervin.dk","description":"Customer ID assigned by the service provider"}}}]}