1. Cart
Salla Platform Docs
  • Overview
  • Authentication
  • Key Concepts
  • Usage Flows
  • Cart
    • Save guest cart data
      POST
    • Generate cart
      POST
    • Get cart
      GET
    • Assign cart to Customer
      POST
    • Apply cart coupon
      POST
    • Remove cart coupon
      DELETE
  • Cart Items
    • Add cart item
      POST
    • Update cart item
      PATCH
    • Delete cart item
      DELETE
  • Schemas
    • SuccessEnvelope
    • GuestDataRequest
    • GuestData
    • Error
    • Money
    • CartTotals
    • TotalLineItem
    • CartItem
    • AssignShippingRequest
    • CartItemsRequest
    • ProductIdentifier
    • CartItemEntry
    • RemoveItemsRequest
    • BadRequest
    • Unauthorized
    • Forbidden
    • NotFound
    • ValidationError
    • Currency
    • AmountLine
    • CartScope
    • CartFeatures
    • CartAmounts
    • CartDiscountEntry
    • CartOptionEntry
    • Cart
    • CartShipping
    • CartItemCreateRequest
    • CartItemUpdateRequest
    • ApplyCouponRequest
    • ErrorEnvelope
    • CartItemOptionInput
    • ErrorObject
    • GenerateCartRequest
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Cart

Apply cart coupon

Production
https://api.salla.dev/store/v2/checkout
Production
https://api.salla.dev/store/v2/checkout
POST
https://api.salla.dev/store/v2/checkout
/{id}/coupon
Last modified:2026-06-15 20:30:17
Applies a promotional coupon code to the cart. Some coupons are restricted to specific payment methods. Returns the updated cart with recalculated totals.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Body Params application/json

Example
{
    "coupon": "string",
    "payment_method": "string"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.salla.dev/store/v2/checkout//coupon' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "coupon": "string",
    "payment_method": "string"
}'

Responses

🟢200
application/json
OK
Bodyapplication/json

Example
{
    "status": 200,
    "success": true,
    "data": {
        "id": "abc123def456",
        "store_id": "411465608",
        "count": 2,
        "checkout_url": "https://example.salla.sa/checkout/abc123def456",
        "currency": {
            "label": "ر.س",
            "code": "SAR"
        },
        "scope": {
            "id": "9881",
            "type": "branch"
        },
        "amounts": {
            "sub_total": {
                "title": "Subtotal",
                "amount": {
                    "value": 300,
                    "currency": "SAR"
                }
            },
            "coupon": {
                "title": "Coupon",
                "amount": {
                    "value": 30,
                    "currency": "SAR"
                }
            },
            "offers": {
                "title": "Offers",
                "amount": {
                    "value": 20,
                    "currency": "SAR"
                }
            },
            "tax": {
                "title": "Tax (15%)",
                "amount": {
                    "value": 37.5,
                    "currency": "SAR"
                }
            },
            "total": {
                "title": "Total",
                "amount": {
                    "value": 287.5,
                    "currency": "SAR"
                }
            }
        },
        "shipping": {
            "required": true
        },
        "coupon": null,
        "features": {
            "coupon": true,
            "gift": true,
            "loyalty": false,
            "guest_checkout": true
        },
        "discounts": {
            "coupon": {
                "id": 4521,
                "title": "Coupon",
                "amount": {
                    "value": 30,
                    "currency": "SAR"
                }
            },
            "offers": [
                {
                    "id": 8812,
                    "type": "fixed_amount",
                    "title": "Summer sale",
                    "amount": {
                        "value": 20,
                        "currency": "SAR"
                    }
                }
            ]
        },
        "settings": {
            "gift": {
                "text": "Happy birthday!",
                "type": "free"
            }
        }
    }
}
🟠403
🟠404
🟠422
Modified at 2026-06-15 20:30:17
Previous
Assign cart to Customer
Next
Remove cart coupon