Salla Docs
Merchant API
Merchant API
Salla OAuth 2.0
Partner APIs
App API
Shipment API
Storefront
Twilight Engine
Twilight SDK
Web Components
Change Log
Salla CLI
Merchant API
Merchant API
Salla OAuth 2.0
Partner APIs
App API
Shipment API
Storefront
Twilight Engine
Twilight SDK
Web Components
Change Log
Salla CLI
Blog
Developer Portal
Cart
Languages
Notify
Event
Overview
Storage
Configuration
Forms
Helpers
Auth
Login
Logout
Verify
Resend
Register
Refresh
Cart
Latest
Details
Quick Add
Add Item
Delete Item
Delete Image
Add Coupon
Remove Coupon
Get Upload Image
Get Quick Order Settings
Create Quick Order
Order Status
Get Current Cart Id
Price Quote
Wishlist
Add
Remove
Toggle
Loyalty
Get Program
Exchange
Reset
Comment
Add Comment
Fetch
Get Page Comments
Get Product Comments
Profile
Update profile
Update contact
Product
Get price
Product availability
Categories
Offer details
Search products
Get Gift Details
Add Gift To Cart
Upload Gift Image
Get Product Details
Fetch
Fetch Options
Size Guides
Order
Create cart from order
Cancel
Send invoice
Show order
Booking
Add
Rating
Order
Store
Products
Shipping
Currency
Change
List
Component
Reviews
Menus
Cart
Add Coupon
A coupon is a code that consists of a special series of characters, or string, used by customers to get a discounted price or limited offer on the cart's items. This
add
endpoint is used for this purpose.
Payload
#
AddCouponPayload
coupon
string
required
The code of the coupon in form of string.
Response
#
Success
Error
cart.addCoupon.success
success
boolean
success
required
Response flag
status
enum<number>
status
required
Allowed values:
200
201
202
data
object
data
optional
Response data.
cart
object
CartSummary
required
Usage
#
To perform the action of applying a coupon to the cart's items, the developer may call the
add()
as shown below.
Events
#
This endpoint may trigger two events, the onCouponAdded and onCouponAdditionFailed events.
onCouponAdded
#
This event is triggered when applying a new coupon by the customer is done without having any errors coming back from the backend.
onCouponAdditionFailed
#
This event is triggered when applying a new coupon by the customer is not completed and an error has occurred.
Modified at
2024-02-18 08:51:05
Previous
Delete Image
Next
Remove Coupon