Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. Checkout
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Overridable Templates
      • Legacy Templates
      • Template Replacements
      • Templates Library
        • home.jinja
        • product.jinja
        • cart.jinja
        • category.jinja
        • products.jinja
        • categories.jinja
        • page.jinja
        • blogs.jinja
        • blog.jinja
        • faqs.jinja
        • reviews.jinja
        • questions.jinja
        • shipping_payment.jinja
        • 404_not_found.jinja
    • Settings
      • Schema files
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
    • Theme Editor
      • Overview
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • JS Integration
    • Supporting both Vitrin and Legacy themes
    • Responses & Errors
    • Cart
    • Products
    • Categories
    • Store
    • Account
    • Blogs
    • Options
    • Events
  • Features
    • SDK Popups – Integration Guidelines
    • Custom Styles Guide
    • Gift Card as a Popup
    • Addresses as a Popup
    • Login as a Popup
    • Checkout as a Popup
    • Apple Pay Quick Checkout
    • Region & Language Popup
    • Dynamic Bundle Products
    • Progressive Discounts
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
  • Mobile Apps
    • Scripts
  • API's
    • Authentication
      • Logout
      • Login Status
      • SMS Login
      • Verify SMS Login
      • WhatsApp Login
      • Verify WhatsApp Login
      • Email Login
      • Verify Email Login
      • Register
      • Register Guest
    • Products
      • List Products
      • Search Products
      • Calculate Product Options Price
      • Notify Product Stock Availability
      • Fetch Bundle Offers
      • Fetch Bundle Offers for a Product
      • List My Product Reviews
      • List Product Reviews
      • Create Product Review
      • Update Product Review
      • Delete Product Review
      • List Product Questions
      • Create Product Question
      • Get Product by Slug
      • Get Selection Groups
    • Categories
      • List Categories
    • Checkout
      • Get Cart
        GET
      • Remove Cart
        DELETE
      • Duplicate Cart
        POST
      • Add Cart Item
        POST
      • Empty Cart
        DELETE
      • Update Cart Item
        PATCH
      • Remove Cart Item
        DELETE
      • Upload Cart Input Field
        POST
      • Add Gift Card
        POST
      • Remove Gift Card
        DELETE
      • Apply Coupon
        POST
      • Remove Coupon From Cart
        DELETE
      • Check Coupon Validity
        GET
      • Apply Loyalty Points
        POST
      • Remove Loyalty Points
        DELETE
      • Preview Rewarded Points
        GET
      • List Redemption Methods for Cart
        GET
      • Customer’s Loyalty Wallet
        GET
      • Customer’s Current Points Balance
        GET
    • Account
      • Get Profile
      • Delete Account
      • Update Customer Profile
      • Get Addresses
      • Create an Address
      • Get an Address by ID
      • Update an Existing Address
      • Delete Address
      • Get Orders
      • Get Shareable Wishlist Link
      • Get Wishlist
      • Add Products to Wishlist
      • Remove Product from Wishlist
      • Get Address Form Schema
      • Check Product Purchase Status
    • Storefront
      • Store Scripts
      • Pages
      • Blogs
    • Countries
      • Get Countries
      • Get Cities By Country
  1. Checkout

Duplicate Cart

POST
{store_url}/api/v1//cart/clone
Creates a new cart by duplicating the current reserved cart.
This endpoint only works when the cart is reserved (i.e., payment has already been initiated).
It’s typically used to:
Retry a failed payment
Restart checkout without losing cart contents
Create a fresh cart after reservation

Preconditions#

The current cart must be reserved (is_reserved = true)
Payment initiation must have occurred
If these conditions are not met, the operation may fail.

Request

None

Responses

🟢201Success
application/json
Bodyapplication/json

🟠401Unauthorized
🔴500Internal Server error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff --request POST '{store_url}/api/v1//cart/clone'
Response Response Example
201 - Example 1
{
    "id": "cart_123",
    "session_id": "sess_abc",
    "phase": "cart",
    "required_customer_email": false,
    "currency": {
        "cart_currency": {
            "id": 2,
            "name": "Saudi Riyal",
            "code": "SAR",
            "symbol": "ر.س",
            "country": {
                "id": 183,
                "name": "Saudi Arabia",
                "code": "SA",
                "country_code": "+966",
                "currency_code": "SAR",
                "iso_code_2": "SA",
                "iso_code_3": "SAU"
            }
        },
        "cart_store_currency": {
            "id": 2,
            "name": "Saudi Riyal",
            "code": "SAR",
            "symbol": "ر.س",
            "country": {
                "id": 183,
                "name": "Saudi Arabia",
                "code": "SA",
                "country_code": "+966",
                "currency_code": "SAR",
                "iso_code_2": "SA",
                "iso_code_3": "SAU"
            }
        }
    },
    "customer": "customer_123",
    "skip_address": false,
    "requires_shipping": true,
    "shipping_address": {
        "id": 1,
        "name": "Ahmed Ali",
        "email": "ahmed@example.com",
        "mobile": "+966501234567",
        "address_street": "string",
        "short_address": "string",
        "address_formatted": "string",
        "is_gift_address": false,
        "city": {
            "id": 0,
            "name": "string"
        },
        "country": {
            "id": 183,
            "name": "Saudi Arabia",
            "code": "SA",
            "country_code": "+966",
            "currency_code": "SAR",
            "iso_code_2": "SA",
            "iso_code_3": "SAU"
        }
    },
    "products": [
        {
            "id": 0,
            "product_id": "string",
            "name": "string",
            "sku": "string",
            "quantity": 2,
            "price": 100,
            "price_string": "100 ر.س",
            "total": 200,
            "total_string": "200 ر.س",
            "is_discounted": true,
            "is_taxable": true,
            "error_message": ""
        }
    ],
    "products_count": 3,
    "products_weight": 4.5,
    "products_subtotal": 300,
    "totals": [
        {
            "code": "subtotal",
            "title": "Subtotal",
            "value": 300,
            "value_string": "300 ر.س"
        }
    ],
    "total": {
        "value": 345,
        "value_string": "345 ر.س"
    },
    "created_at": "2025-12-29T06:25:47.487Z",
    "is_reserved": false,
    "basket_url": "https://store.example.com/cart",
    "has_bundle_offer": true
}
Modified at 2026-02-17 07:25:03
Previous
Remove Cart
Next
Add Cart Item
Built with