{
  "openapi": "3.0.0",
  "paths": {
    "/checkout/stripe": {
      "post": {
        "deprecated": true,
        "description": "Deprecated: use POST /v2/checkout/stripe instead (checkout v2, with hooks and quote). Initiates a Stripe Checkout session. Supports both Guest and Authenticated customers. Note: Authentication is required for recurring items (subscriptions). If the user is authenticated, he must have verified his email.",
        "operationId": "CheckoutStripe",
        "parameters": [
          {
            "name": "store-id",
            "in": "header",
            "description": "Store identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutStripeInputDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stripe session created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The unique Stripe Checkout URL where the user should be redirected.",
                      "example": "https://checkout.stripe.com/c/pay/cs_test_..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Validation or Business Logic errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "message": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string",
                      "example": "Bad Request"
                    }
                  }
                },
                "examples": {
                  "unverifiedEmail": {
                    "summary": "Unverified email",
                    "value": {
                      "statusCode": 400,
                      "message": "Please, verify your email address before completing the purchase",
                      "error": "Bad Request"
                    }
                  },
                  "missingShipping": {
                    "summary": "Missing shipping method",
                    "value": {
                      "statusCode": 400,
                      "message": "Please select a shipping method.",
                      "error": "Bad Request"
                    }
                  },
                  "inconsistentCart": {
                    "summary": "Inconsistent currency/cadence",
                    "value": {
                      "statusCode": 400,
                      "message": "All articles must have the same currency/cadence",
                      "error": "Bad Request"
                    }
                  },
                  "limitExceeded": {
                    "summary": "Items limit exceeded",
                    "value": {
                      "statusCode": 400,
                      "message": "Exceeded the total items in the cart for this type of order",
                      "error": "Bad Request"
                    }
                  },
                  "authRequiredRecurring": {
                    "summary": "Auth required (Recurring)",
                    "value": {
                      "statusCode": 400,
                      "message": "You must be authenticated in order to buy an item with a recurring billing.",
                      "error": "Bad Request"
                    }
                  },
                  "stripeConfigError": {
                    "summary": "Stripe config error",
                    "value": {
                      "statusCode": 400,
                      "message": "SKU is not configured correctly.",
                      "error": "Bad Request"
                    }
                  },
                  "taxCompatibility": {
                    "summary": "Tax compatibility error",
                    "value": {
                      "statusCode": 400,
                      "message": "The product is not compatible with other items in your cart.",
                      "error": "Bad Request"
                    }
                  },
                  "unknownCountry": {
                    "summary": "Unknown shipping country",
                    "value": {
                      "statusCode": 400,
                      "message": "Shipping country is unknown for product [NAME]",
                      "error": "Bad Request"
                    }
                  },
                  "noShippingMethods": {
                    "summary": "No shipping available",
                    "value": {
                      "statusCode": 400,
                      "message": "No shipping method available for the selected country.",
                      "error": "Bad Request"
                    }
                  },
                  "exclusivePromo": {
                    "summary": "Exclusive promo conflict",
                    "value": {
                      "statusCode": 400,
                      "message": "Promotion \"CODE\" cannot be combined with other codes",
                      "error": "Bad Request"
                    }
                  },
                  "promoExpired": {
                    "summary": "Promotion expired",
                    "value": {
                      "statusCode": 400,
                      "message": "Promotion expired",
                      "error": "Bad Request"
                    }
                  },
                  "authRequiredPromo": {
                    "summary": "Auth required (Promo)",
                    "value": {
                      "statusCode": 400,
                      "message": "Authentication required. Please login.",
                      "error": "Bad Request"
                    }
                  },
                  "promoLimitReached": {
                    "summary": "Promo limit reached",
                    "value": {
                      "statusCode": 400,
                      "message": "This promotion has reached its global usage limit",
                      "error": "Bad Request"
                    }
                  },
                  "minAmount": {
                    "summary": "Min amount not reached",
                    "value": {
                      "statusCode": 400,
                      "message": "Minimum order amount is 50 EUR to apply the promotion CODE",
                      "error": "Bad Request"
                    }
                  },
                  "promoNotApplicable": {
                    "summary": "Promo not applicable",
                    "value": {
                      "statusCode": 400,
                      "message": "Promotion \"CODE\" is not available for variant \"NAME\"",
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Stripe integration issues.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "example": 403
                    },
                    "message": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string",
                      "example": "Forbidden"
                    }
                  }
                },
                "examples": {
                  "missingStore": {
                    "summary": "Missing Store ID",
                    "value": {
                      "statusCode": 403,
                      "message": "Missing storeId",
                      "error": "Forbidden"
                    }
                  },
                  "notIntegrated": {
                    "summary": "Stripe not properly integrated",
                    "value": {
                      "statusCode": 403,
                      "message": "The store has not integrated Stripe properly",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Promotion code not found or inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid or inactive promotion code(s)"
                    },
                    "error": {
                      "type": "string",
                      "example": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error during Stripe session creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "message": {
                      "type": "string",
                      "example": "There was an error when creating the session. Please contact us if the error persists"
                    },
                    "error": {
                      "type": "string",
                      "example": "Internal Server Error"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Start Stripe Checkout",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v2/checkout/quote": {
      "post": {
        "description": "Read-only. It is the ONE call that prices a cart and describes it (it replaces `POST /cart/total` for the v2 sites): every line also carries its name, slug, cover, options, available stock and the delivery methods the product allows, read from OpenSearch like `/cart/total` does (from Postgres only if OpenSearch is down). Computes what the customer would pay, with the store checkout hooks applied: lines with net, VAT and gross (per unit and per line, rounded to the currency digits), discounts, shipping options with their cost and the totals. It writes nothing (hook logs are written only when a hook fails), but it tracks the cart (`cartTrackingId`, when sent) for the abandoned-cart analytics, as `POST /cart/total` of commerce-core does. A line that cannot be bought because there is not enough stock (no backorder) is NOT an error here: it comes back in `unavailable`, priced like the others but without discounts, and it is left out of `items`, `totals`, promotions, shipping and hooks; the whole line is unavailable even if some units exist (`availableStock` says how many). If no line can be bought, `items` is empty and the totals are zero. The payment never accepts such a line (400). Without `shippingMethodId` the totals exclude shipping and `shippingPending` is true; each option reports `grandGrossIfSelected`. Hooks run in two phases: `cart-transform` hooks one after the other (by position, then creation date), then `discount`, `shipping` and `validation` hooks in parallel. The server never takes a total from a hook: it applies what the hooks ask for, on the net amounts.",
        "operationId": "CheckoutV2Quote",
        "parameters": [
          {
            "name": "store-id",
            "in": "header",
            "description": "Store identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "langCode",
                  "cartItems",
                  "deliveryMethods"
                ],
                "properties": {
                  "langCode": {
                    "type": "string",
                    "example": "it"
                  },
                  "cartItems": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "variantId",
                        "priceId",
                        "quantity"
                      ],
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "priceId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "additionalData": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "maxProperties": 20,
                          "description": "Free data the customer gave this line (an engraving, a colour, a name): pairs of text, up to 20 keys (key 1 to 64 characters, value up to 500). A line is its variant AND its data: the same variant with other data is another line, the same variant with the same data twice is a 400 `CART_DUPLICATE_ITEMS`. It is written to the order line (`additionalData`) and the checkout hooks receive it."
                        }
                      }
                    }
                  },
                  "deliveryMethods": {
                    "type": "object",
                    "description": "variantId -> pickup | shipping | none. Required for every line in the payment. In the quote a line without a choice gets the product default (shipping, else pickup, else none), reported in the line's `deliveryMethod`.",
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "pickup",
                        "shipping",
                        "none"
                      ]
                    }
                  },
                  "promotionCodes": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  },
                  "shippingMethodId": {
                    "type": "string",
                    "description": "The shipping option chosen by the customer. Absent = not chosen yet."
                  },
                  "shippingAddress": {
                    "type": "object",
                    "required": [
                      "fullName",
                      "addressLine1",
                      "city",
                      "postalCode",
                      "countryCode"
                    ],
                    "properties": {
                      "fullName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "addressLine1": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "province": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string",
                        "example": "IT"
                      },
                      "vatCode": {
                        "type": "string"
                      },
                      "additionalInfo": {
                        "type": "string"
                      }
                    }
                  },
                  "billingAddress": {
                    "type": "object",
                    "required": [
                      "fullName",
                      "addressLine1",
                      "city",
                      "postalCode",
                      "countryCode"
                    ],
                    "properties": {
                      "fullName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "addressLine1": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "province": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string",
                        "example": "IT"
                      },
                      "vatCode": {
                        "type": "string"
                      },
                      "additionalInfo": {
                        "type": "string"
                      }
                    }
                  },
                  "requestsInvoice": {
                    "type": "boolean"
                  },
                  "cartTrackingId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "additionalData": {
                    "type": "object",
                    "description": "Free key/value data: it reaches the checkout hooks and is written to the order."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "currencyCode": {
                      "type": "string"
                    },
                    "cadence": {
                      "type": "string",
                      "enum": [
                        "once",
                        "daily",
                        "weekly",
                        "monthly",
                        "quarterly",
                        "semiannual",
                        "yearly"
                      ],
                      "description": "'once', or the cart's cadence (a cart has only one)"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "variantId": {
                            "type": "string"
                          },
                          "productId": {
                            "type": "string"
                          },
                          "priceId": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "integer"
                          },
                          "deliveryMethod": {
                            "type": "string"
                          },
                          "vatRate": {
                            "type": "number"
                          },
                          "unitNet": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "unitVat": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "unitGross": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalNet": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalVat": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalGross": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "origin": {
                            "description": "\"cart\", or { hookId } for a line added by a hook"
                          },
                          "additionalData": {
                            "type": "object",
                            "nullable": true,
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "The free data of the line, as the request had them (or as a hook added them); null if it has none."
                          },
                          "variantName": {
                            "type": "string"
                          },
                          "productName": {
                            "type": "string",
                            "nullable": true
                          },
                          "variantSlug": {
                            "type": "string"
                          },
                          "skuCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "coverUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "optionName": {
                                  "type": "string"
                                },
                                "tagValue": {
                                  "type": "string"
                                },
                                "tagValueAlias": {
                                  "type": "string",
                                  "nullable": true
                                }
                              }
                            }
                          },
                          "allowedDeliveryMethods": {
                            "type": "array",
                            "description": "How the product can reach the customer: what `deliveryMethods` of the request can choose from.",
                            "items": {
                              "type": "string",
                              "enum": [
                                "pickup",
                                "shipping",
                                "none"
                              ]
                            }
                          },
                          "availableStock": {
                            "type": "integer",
                            "description": "Units available now (not what the line asks)."
                          },
                          "allowBackorder": {
                            "type": "boolean"
                          },
                          "maxOrderQuantity": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "unavailable": {
                      "type": "array",
                      "description": "Lines with not enough stock (no backorder): priced without discounts, not in `items` nor in `totals`. The whole line, even if some units exist.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "variantId": {
                            "type": "string"
                          },
                          "productId": {
                            "type": "string"
                          },
                          "priceId": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "integer",
                            "description": "What was asked."
                          },
                          "deliveryMethod": {
                            "type": "string"
                          },
                          "vatRate": {
                            "type": "number"
                          },
                          "unitNet": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "unitVat": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "unitGross": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalNet": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalVat": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "totalGross": {
                            "type": "number",
                            "description": "Decimal amount in the cart currency."
                          },
                          "additionalData": {
                            "type": "object",
                            "nullable": true,
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "variantName": {
                            "type": "string"
                          },
                          "productName": {
                            "type": "string",
                            "nullable": true
                          },
                          "variantSlug": {
                            "type": "string"
                          },
                          "skuCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "coverUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "optionName": {
                                  "type": "string"
                                },
                                "tagValue": {
                                  "type": "string"
                                },
                                "tagValueAlias": {
                                  "type": "string",
                                  "nullable": true
                                }
                              }
                            }
                          },
                          "allowedDeliveryMethods": {
                            "type": "array",
                            "description": "How the product can reach the customer: what `deliveryMethods` of the request can choose from.",
                            "items": {
                              "type": "string",
                              "enum": [
                                "pickup",
                                "shipping",
                                "none"
                              ]
                            }
                          },
                          "availableStock": {
                            "type": "integer",
                            "description": "Units available now (not what the line asks)."
                          },
                          "allowBackorder": {
                            "type": "boolean"
                          },
                          "maxOrderQuantity": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "discounts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "shipping": {
                      "type": "object",
                      "properties": {
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "selectedId": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "net": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "vat": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "gross": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "discountTotal": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "listGross": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "discountGross": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "shippingNet": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency.",
                          "nullable": true
                        },
                        "shippingVat": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency.",
                          "nullable": true
                        },
                        "shippingGross": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency.",
                          "nullable": true
                        },
                        "grandNet": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "grandVat": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "grandGross": {
                          "type": "number",
                          "description": "Decimal amount in the cart currency."
                        },
                        "shippingPending": {
                          "type": "boolean"
                        }
                      }
                    },
                    "promotions": {
                      "type": "object",
                      "properties": {
                        "applied": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rejected": {
                          "type": "array",
                          "description": "Valid codes that discounted nothing (not an error): NO_ELIGIBLE_ITEMS = no line could take the discount, NOT_APPLICABLE = the code does not apply to this cart (e.g. fixed amount without the cart currency).",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "NO_ELIGIBLE_ITEMS",
                                  "NOT_APPLICABLE"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "additionalData": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid cart or promotion (same errors as the payment, except a line without stock: see `unavailable`), `CHECKOUT_BLOCKED` (a validation hook blocked it), `SHIPPING_METHOD_UNAVAILABLE`."
          },
          "424": {
            "description": "`CHECKOUT_HOOK_FAILED`: a hook configured with `abort` failed."
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Checkout quote",
        "tags": [
          "Checkout v2"
        ]
      }
    },
    "/v2/checkout/stripe": {
      "post": {
        "description": "Same calculation as the quote, always from the database and always logging the hook calls, then reserves the stock, creates the order and the Stripe Checkout session. There is no Stripe Tax and no Stripe price: every line is sent with its rounded gross unit amount, so Stripe charges exactly the total of the quote. Requires the email, a shipping address when something is shipped, and the chosen shipping option. Recurring items need an authenticated customer with a verified email.",
        "operationId": "CheckoutV2Stripe",
        "parameters": [
          {
            "name": "store-id",
            "in": "header",
            "description": "Store identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "langCode",
                  "cartItems",
                  "deliveryMethods",
                  "email"
                ],
                "properties": {
                  "langCode": {
                    "type": "string",
                    "example": "it"
                  },
                  "cartItems": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "variantId",
                        "priceId",
                        "quantity"
                      ],
                      "properties": {
                        "variantId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "priceId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "additionalData": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "maxProperties": 20,
                          "description": "Free data the customer gave this line (an engraving, a colour, a name): pairs of text, up to 20 keys (key 1 to 64 characters, value up to 500). A line is its variant AND its data: the same variant with other data is another line, the same variant with the same data twice is a 400 `CART_DUPLICATE_ITEMS`. It is written to the order line (`additionalData`) and the checkout hooks receive it."
                        }
                      }
                    }
                  },
                  "deliveryMethods": {
                    "type": "object",
                    "description": "variantId -> pickup | shipping | none. Required for every line in the payment. In the quote a line without a choice gets the product default (shipping, else pickup, else none), reported in the line's `deliveryMethod`.",
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "pickup",
                        "shipping",
                        "none"
                      ]
                    }
                  },
                  "promotionCodes": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  },
                  "shippingMethodId": {
                    "type": "string",
                    "description": "The shipping option chosen by the customer. Absent = not chosen yet."
                  },
                  "shippingAddress": {
                    "type": "object",
                    "required": [
                      "fullName",
                      "addressLine1",
                      "city",
                      "postalCode",
                      "countryCode"
                    ],
                    "properties": {
                      "fullName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "addressLine1": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "province": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string",
                        "example": "IT"
                      },
                      "vatCode": {
                        "type": "string"
                      },
                      "additionalInfo": {
                        "type": "string"
                      }
                    }
                  },
                  "billingAddress": {
                    "type": "object",
                    "required": [
                      "fullName",
                      "addressLine1",
                      "city",
                      "postalCode",
                      "countryCode"
                    ],
                    "properties": {
                      "fullName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "addressLine1": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "province": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string",
                        "example": "IT"
                      },
                      "vatCode": {
                        "type": "string"
                      },
                      "additionalInfo": {
                        "type": "string"
                      }
                    }
                  },
                  "requestsInvoice": {
                    "type": "boolean"
                  },
                  "cartTrackingId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "additionalData": {
                    "type": "object",
                    "description": "Free key/value data: it reaches the checkout hooks and is written to the order."
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "invoiceVatCode": {
                    "type": "string"
                  },
                  "invoiceRecipientCode": {
                    "type": "string"
                  },
                  "successUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Where the customer is sent after a completed payment. Defaults to `/checkout/success` on the store domain. Must be sent together with `cancelUrl`. The origin must be the store domain, one of the store's allowed origins, localhost or this store's draft preview. Required if the store has no published site."
                  },
                  "cancelUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Where the customer is sent if they cancel the payment. Defaults to `/checkout/cancel` on the store domain. Must be sent together with `successUrl`, with the same origin rules."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stripe session created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "example": "https://checkout.stripe.com/c/pay/cs_test_..."
                    },
                    "orderId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reference": {
                      "type": "integer",
                      "nullable": true,
                      "description": "The order's number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, cart, promotion or shipping; `CHECKOUT_BLOCKED`; `SHIPPING_METHOD_UNAVAILABLE`."
          },
          "403": {
            "description": "Stripe not integrated or cart disabled."
          },
          "424": {
            "description": "`CHECKOUT_HOOK_FAILED`: a hook configured with `abort` failed."
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Start Stripe Checkout (v2)",
        "tags": [
          "Checkout v2"
        ]
      }
    }
  },
  "info": {
    "title": "Webround Commerce Checkout APIs",
    "description": "The Webround Commerce Checkout APIs documentation for Webround software",
    "version": "1.0",
    "contact": {}
  },
  "tags": [],
  "servers": [
    {
      "url": "https://checkout-api.webround.com",
      "description": "Production Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "CheckoutCartItemDTO": {
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid",
            "example": "b089f57c-4d86-4d9f-bb01-84c6b13b4f88"
          },
          "quantity": {
            "type": "number",
            "example": 1,
            "minimum": 1,
            "maximum": 10000
          },
          "priceId": {
            "type": "string",
            "format": "uuid",
            "example": "7f58d339-f138-4d8d-94a2-2fa842f262c5"
          }
        },
        "required": [
          "variantId",
          "quantity",
          "priceId"
        ]
      },
      "CustomerAddressDTO": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "example": "Mario Rossi"
          },
          "company": {
            "type": "string",
            "example": "ACME S.r.l."
          },
          "vatCode": {
            "type": "string",
            "example": "01234567891",
            "maxLength": 32
          },
          "phone": {
            "type": "string",
            "example": "+393331234567"
          },
          "addressLine1": {
            "type": "string",
            "example": "Via Roma 123"
          },
          "addressLine2": {
            "type": "string",
            "example": "Scala B, interno 7"
          },
          "city": {
            "type": "string",
            "example": "Milano"
          },
          "province": {
            "type": "string",
            "example": "MI"
          },
          "postalCode": {
            "type": "string",
            "example": "20100"
          },
          "countryCode": {
            "type": "string",
            "example": "IT",
            "description": "ISO 3166-1 alpha-2 country code"
          },
          "additionalInfo": {
            "type": "string",
            "example": "Palazzo giallo"
          }
        },
        "required": [
          "fullName",
          "addressLine1",
          "city",
          "postalCode",
          "countryCode"
        ]
      },
      "CheckoutStripeInputDTO": {
        "type": "object",
        "properties": {
          "langCode": {
            "type": "string",
            "enum": [
              "af",
              "am",
              "sq",
              "ar",
              "hy",
              "az",
              "eu",
              "be",
              "bn",
              "bs",
              "bg",
              "ca",
              "ceb",
              "ny",
              "zh",
              "co",
              "hr",
              "cs",
              "da",
              "nl",
              "sjn",
              "en",
              "eo",
              "et",
              "tl",
              "fo",
              "fj",
              "fi",
              "fr",
              "fy",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "haw",
              "ht",
              "ha",
              "he",
              "hi",
              "hmn",
              "hu",
              "is",
              "ig",
              "id",
              "iu",
              "iku",
              "ga",
              "it",
              "ja",
              "jw",
              "kk",
              "kn",
              "km",
              "ko",
              "kok",
              "ky",
              "ku",
              "ckb",
              "sdh",
              "lo",
              "lv",
              "lt",
              "lb",
              "mk",
              "mg",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "mi",
              "my",
              "ne",
              "no",
              "pap",
              "fa",
              "pl",
              "pt",
              "pa",
              "ps",
              "otq",
              "ro",
              "ru",
              "sm",
              "gd",
              "sr",
              "sr-LA",
              "sd",
              "si",
              "sk",
              "sl",
              "sn",
              "st",
              "so",
              "es",
              "su",
              "sw",
              "sv",
              "ty",
              "ta",
              "tg",
              "te",
              "th",
              "bo",
              "to",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "xh",
              "yi",
              "yo",
              "yua",
              "yue",
              "zu",
              "default"
            ],
            "default": "default",
            "example": "it"
          },
          "cartItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckoutCartItemDTO"
            }
          },
          "email": {
            "type": "string",
            "example": "user@email.com"
          },
          "cartTrackingId": {
            "type": "string",
            "format": "uuid"
          },
          "promotionCodes": {
            "maxItems": 10,
            "example": [
              "PROMO20"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "shippingMethodId": {
            "type": "string",
            "format": "uuid"
          },
          "deliveryMethods": {
            "type": "string",
            "enum": [
              "pickup",
              "shipping",
              "digital",
              "none"
            ],
            "example": {
              "b089f57c-4d86-4d9f-bb01-84c6b13b4f88": "shipping"
            }
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/CustomerAddressDTO"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/CustomerAddressDTO"
          },
          "requestsInvoice": {
            "type": "boolean"
          },
          "successUrl": {
            "type": "string",
            "example": "https://example.com/success",
            "description": "Where the customer is sent after a completed payment. Defaults to `/checkout/success` on the store domain. Must be sent together with `cancelUrl`. The origin must be the store domain, one of the store's allowed origins, or localhost."
          },
          "cancelUrl": {
            "type": "string",
            "example": "https://example.com/cancel",
            "description": "Where the customer is sent if they cancel the payment. Defaults to `/checkout/cancel` on the store domain. Must be sent together with `successUrl`. The origin must be the store domain, one of the store's allowed origins, or localhost."
          },
          "additionalData": {
            "type": "object",
            "example": {
              "custom_data": "1234"
            }
          }
        },
        "required": [
          "langCode",
          "cartItems",
          "email",
          "deliveryMethods"
        ]
      }
    }
  }
}