---
title: "Get a coupon"
method: GET
path: "/v1/projects/{project}/coupons/{coupon}"
tags: ["Coupons"]
---

# Get a coupon

`GET /v1/projects/{project}/coupons/{coupon}`

## Request

- Base URL: `https://api.subscriby.net`
- URL: `https://api.subscriby.net/v1/projects/{project}/coupons/{coupon}`
- Auth: HTTP bearer

One coupon with its currency ISO code loaded. A coupon of another project, or a deleted one, is `404 RESOURCE_NOT_FOUND`.

### Three fields that are easy to misread

> **`plan_ids: []` means every plan, not no plans.** An empty array is how the coupon itself reads an empty plan relation: the code applies to **every** plan in the project, including plans added later. Treating it as "restricted to nothing" inverts the meaning.

**`redemptions.remaining` is derived, not stored.** Prefer it over computing `max_redemptions - count` yourself. The quota counts settled redemptions *plus* reservations whose hold has not expired, so an in-flight checkout is already accounted for, and an abandoned one returns its slot without any sweeper job. Your own subtraction will disagree.

**`discount.value` is a decimal string with four places**: `"25.0000"` for 25% off, `"10.0000"` for ten of the coupon's currency. Parse it as a decimal, never a float. `currency_id` is `null` on a percentage coupon and set on a fixed-amount one, because a percentage applies to a plan in any currency and a fixed amount only to plans priced in its own.

`currency` (the ISO code) is present only when the relation is loaded: on a single read, a create and an update, not on every list row.

## Path parameters

- `project` string, uuid, required
- `coupon` string, uuid, required

## Response `200`

The coupon.

- object
  - `data` CouponResource, required: A coupon: one code many subscribers can redeem for money off at checkout, with its discount, limits, redemption tally and sales window.
    - `id` string, required: The coupon's id.
    - `project_id` string, required: The project the coupon belongs to; codes are unique within a project, not across projects.
    - `code` string, required: The code subscribers type at checkout, stored and matched in upper case.
    - `name` string, required: A creator-facing label, never shown to subscribers.
    - `discount` object, required: What comes off the price.
      - `type` string, required: `percentage` or `fixed`.
      - `value` string, required: A decimal string with four places: `"25.0000"` for 25% off, `"10.0000"` for ten of the coupon's currency. Parse it as a decimal, never a float.
      - `currency_id` string, nullable, required: The currency a `fixed` discount is denominated in; null on a `percentage` coupon, which applies to a plan in any currency.
      - `currency` string, nullable: That currency's ISO 4217 code, present only when the relation is loaded: on a single read, a create and an update, not on every list row.
    - `duration` string, required: Always `once`: only first-payment discounts exist today.
    - `limits` object, required: How often and on what the code may be used.
      - `max_redemptions` integer, nullable, required: The total cap across everyone; null for unlimited.
      - `max_redemptions_per_user` integer, required: How many times one member may redeem the code.
      - `minimum_amount` string, nullable, required: The order floor, in the plan's own currency; null for none.
    - `redemptions` object, required: How far the cap has been used.
      - `count` integer, required: Settled redemptions so far.
      - `remaining` integer, nullable, required: Derived, not stored: the cap minus settled redemptions and reservations whose hold has not expired, so an in-flight checkout is already counted and an abandoned one gives its slot back. Prefer it over your own subtraction, which will disagree. Null when uncapped.
      - `exhausted` boolean, required: Whether nothing remains under the cap.
    - `window` object, required: When the code can be redeemed.
      - `starts_at` string, nullable, required: When redemption opens, ISO 8601; null for immediately.
      - `expires_at` string, nullable, required: When redemption closes, ISO 8601; null for never.
    - `plan_ids` object, required: The plans the code is restricted to. An empty array means **every** plan in the project, including plans added later, not no plans.
    - `active` boolean, required: The creator's on/off switch. Not the same as redeemable.
    - `redeemable` boolean, required: The combined answer: switched on, inside its window, not exhausted. Read this rather than `active` to know whether the code applies right now.
    - `created_at` string, nullable, required: When the coupon was created, ISO 8601.
    - `updated_at` string, nullable, required: When it last changed, ISO 8601.

## Other responses

- `401`: `AUTHENTICATION_REQUIRED`: the request carries no bearer token, or one that is revoked, malformed, or minted for another environment (an `sbt_test_` token on production).
- `403`: `TOKEN_MISSING_ABILITY`: the token is valid but does not carry the ability this endpoint requires; `error.context.required_ability` names the one to grant. An endpoint that also checks who owns a row or which tier the account is on answers `FORBIDDEN`, `TEAM_TIER_REQUIRED` or `CONNECTOR_TIER_REQUIRED` with the same status, and says so in its own description.
- `404`: `RESOURCE_NOT_FOUND`: an id in the path names nothing the token can see. `TENANT_MISMATCH`: the project sits outside the token's `scope:project:` allow-list, or the token carries no team scope. Both answer 404 rather than 403 so that existence outside the token's scope cannot be inferred.
- `429`: `RATE_LIMITED`: the token has spent its 300 requests a minute or 10,000 an hour; `Retry-After` says when the next one is accepted.

---

[API](https://skmtc.dev/memberpass/apis/subscriby-rest-api.md) · [All operations](https://skmtc.dev/memberpass/apis/subscriby-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memberpass/apis/subscriby-rest-api/revisions/59c4df91d764?raw)
