DocumentationShipping & Discounts

Shipping & Discounts

4 minLast updated: 2026-03-31

Shipping Zones

Define shipping zones by country codes. Each zone contains rate tiers based on order weight or value:

POST /api/v1/storefront/merchant/shipping-zones
{
  "name": "Serbia Domestic",
  "countries": ["RS"],
  "rates": [
    { "name": "Standard", "min_weight": 0, "max_weight": 5, "price": 350 },
    { "name": "Standard", "min_weight": 5, "max_weight": 20, "price": 550 },
    { "name": "Express", "min_weight": 0, "max_weight": 20, "price": 890 }
  ]
}

Free Shipping Thresholds

Set a minimum order value for free shipping per zone. For example, orders over 5,000 RSD get free standard delivery. This is configured per shipping zone in the rate tiers.

Discount Codes

Create discount codes with flexible rules:

POST /api/v1/storefront/merchant/discounts
{
  "code": "SUMMER20",
  "type": "percentage",
  "value": 20,
  "min_order_value": 2000,
  "max_uses": 500,
  "starts_at": "2026-06-01",
  "expires_at": "2026-08-31"
}

Discount Types

  • percentage: Percentage off order total (e.g., 20% off)
  • fixed: Fixed amount off (e.g., 500 RSD off)
  • free_shipping: Removes shipping cost entirely

Usage Limits

Each discount code supports:

  • max_uses: Total times the code can be used across all customers
  • max_uses_per_customer: Times a single customer can use it
  • min_order_value: Minimum cart total required
  • starts_at / expires_at: Active date range

Usage is tracked atomically during checkout. Expired or exhausted codes are rejected at validation.

Was this article helpful?