Remove a coupon from the stack (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
DELETE /admin/orgs/{orgId}/coupon/{couponId}

Removes the named coupon wherever it sits in the organization's stack, then makes the top eligible coupon the active discount, and returns the stack. Returns 404 when the organization has no Stripe customer or the coupon is not on its stack. Super admin only.

Path parameters

  • orgId string Required

    Id of the organization

  • couponId string Required

    Stripe coupon id / redeemable code

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • stack array[object] Required

        Top of the stack first

        Hide stack attributes Show stack attributes object
        • couponId string Required
        • pushedAt string(date-time) Required
        • name string | null Required
        • percentOff number | null Required
        • amountOffCents number | null Required
        • duration string | null Required
        • status string Required

          active/expired/deleted, or "unknown" when the coupon is missing from the local mirror

        • eligible boolean Required

          Whether this entry could be the active discount

        • active boolean Required

          The ONE entry currently mirrored onto the Stripe customer — the top eligible coupon

      • activeCouponId string | null Required

        The coupon currently discounting this org, if any

    • statusCode number Required
    • timestamp string(date-time) Required
DELETE /admin/orgs/{orgId}/coupon/{couponId}
curl \
 --request DELETE 'http://api.example.com/admin/orgs/{orgId}/coupon/{couponId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "stack": [
      {
        "couponId": "SPRING20",
        "pushedAt": "2026-01-15T10:15:00.000Z",
        "name": "Spring 20% off",
        "percentOff": 20,
        "amountOffCents": 42.0,
        "duration": "repeating",
        "status": "active",
        "eligible": true,
        "active": true
      }
    ],
    "activeCouponId": "SPRING20"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}