Apply Coupon

Applies a coupon code to the cart. The discount is calculated and reflected in the cart response.

Request

curl -X POST https://sandbox-api.cardcash.com/v3/carts/CART_ID/coupons/SAVE10 \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

Returns the full cart object with couponData populated:
{
  "cartId": "...",
  "cards": [...],
  "couponData": {
    "id": 456,
    "type": "P",
    "coupon": "SAVE10",
    "totalAmount": 10,
    "discount": 4.58,
    "description": "10% OFF",
    "expires": "12/31/2026",
    "usage": 1,
    "cards": [
      {
        "id": "card-uuid-001",
        "perCardDiscount": 2.29,
        "discount": 4.58
      }
    ]
  }
}

Coupon Types

TypeDescriptionExample
PPercentage off”10% OFF”
FFixed store credit”$5 STORE CREDIT”
SPromo credit”$10 PROMO CREDIT”

Error Response

{
  "message": ["Invalid coupon"]
}

Remove Coupon

Removes a previously applied coupon from the cart.

Request

curl -X DELETE https://sandbox-api.cardcash.com/v3/carts/CART_ID/coupons/SAVE10 \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

Returns the full cart object with couponData set to null.

Notes

  • Only one coupon can be applied per cart
  • Some coupons are restricted to specific merchants or account types
  • Coupon discount is calculated against the current cart contents
  • A warningMessage field may appear if the coupon only partially applies