Stripe · Capability

Stripe Coupons API — Coupons

Stripe Coupons API — Coupons. 5 operations. Lead operation: Coupons. Self-contained Naftiko capability covering one Stripe business surface.

Run with Naftiko StripeCoupons

What You Can Do

GET
Getcoupons

Returns a list of your coupons.

/v1/v1/coupons
POST
Postcoupons

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

/v1/v1/coupons
DELETE
Deletecouponscoupon

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that

/v1/v1/coupons/{coupon}
GET
Getcouponscoupon

Retrieves the coupon with the given ID.

/v1/v1/coupons/{coupon}
POST
Postcouponscoupon

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

/v1/v1/coupons/{coupon}

MCP Tools

p-returns-list-your-coupons-p

Returns a list of your coupons.

read-only idempotent
p-you-can-create-coupons-easily

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

p-you-can-delete-coupons-href-https

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that

idempotent
p-retrieves-coupon-given-id-p

Retrieves the coupon with the given ID.

read-only idempotent
p-updates-metadata-coupon-other-coupon

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

Capability Spec

coupons-coupons.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Coupons API — Coupons
  description: 'Stripe Coupons API — Coupons. 5 operations. Lead operation: Coupons. Self-contained Naftiko capability covering
    one Stripe business surface.'
  tags:
  - Stripe
  - Coupons
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: coupons-coupons
    baseUri: https://api.stripe.com
    description: Stripe Coupons API — Coupons business capability. Self-contained, no shared references.
    resources:
    - name: v1-coupons
      path: /v1/coupons
      operations:
      - name: getcoupons
        method: GET
        description: <p>Returns a list of your coupons.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created
          in: query
          type: string
          description: 'A filter on the list, based on the object `created` field. The value can be a string with an integer
            Unix timestamp, or it can be a dictionary with a number of '
        - name: ending_before
          in: query
          type: string
          description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list.
            For instance, if you make a list request and receive 100 ob
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: limit
          in: query
          type: integer
          description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default
            is 10.
        - name: starting_after
          in: query
          type: string
          description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list.
            For instance, if you make a list request and receive 100 o
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: postcoupons
        method: POST
        description: <p>You can create coupons easily via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
          page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the
          fly.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-coupons-coupon
      path: /v1/coupons/{coupon}
      operations:
      - name: deletecouponscoupon
        method: DELETE
        description: <p>You can delete coupons via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
          page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied
          the coupon; it means that
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: coupon
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: getcouponscoupon
        method: GET
        description: <p>Retrieves the coupon with the given ID.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: coupon
          in: path
          type: string
          required: true
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: postcouponscoupon
        method: POST
        description: <p>Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design,
          not editable.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: coupon
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.STRIPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: coupons-coupons-rest
    port: 8080
    description: REST adapter for Stripe Coupons API — Coupons. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/coupons
      name: v1-coupons
      description: REST surface for v1-coupons.
      operations:
      - method: GET
        name: getcoupons
        description: <p>Returns a list of your coupons.</p>
        call: coupons-coupons.getcoupons
        with:
          created: rest.created
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          starting_after: rest.starting_after
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postcoupons
        description: <p>You can create coupons easily via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
          page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the
          fly.</p>
        call: coupons-coupons.postcoupons
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/coupons/{coupon}
      name: v1-coupons-coupon
      description: REST surface for v1-coupons-coupon.
      operations:
      - method: DELETE
        name: deletecouponscoupon
        description: <p>You can delete coupons via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
          page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied
          the coupon; it means that
        call: coupons-coupons.deletecouponscoupon
        with:
          coupon: rest.coupon
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getcouponscoupon
        description: <p>Retrieves the coupon with the given ID.</p>
        call: coupons-coupons.getcouponscoupon
        with:
          coupon: rest.coupon
          expand: rest.expand
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postcouponscoupon
        description: <p>Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design,
          not editable.</p>
        call: coupons-coupons.postcouponscoupon
        with:
          coupon: rest.coupon
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: coupons-coupons-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Coupons API — Coupons. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: p-returns-list-your-coupons-p
      description: <p>Returns a list of your coupons.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: coupons-coupons.getcoupons
      with:
        created: tools.created
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        starting_after: tools.starting_after
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-you-can-create-coupons-easily
      description: <p>You can create coupons easily via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
        page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the
        fly.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: coupons-coupons.postcoupons
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-you-can-delete-coupons-href-https
      description: <p>You can delete coupons via the <a href="https://dashboard.stripe.com/coupons">coupon management</a>
        page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the
        coupon; it means that
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: coupons-coupons.deletecouponscoupon
      with:
        coupon: tools.coupon
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-coupon-given-id-p
      description: <p>Retrieves the coupon with the given ID.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: coupons-coupons.getcouponscoupon
      with:
        coupon: tools.coupon
        expand: tools.expand
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-updates-metadata-coupon-other-coupon
      description: <p>Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design,
        not editable.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: coupons-coupons.postcouponscoupon
      with:
        coupon: tools.coupon
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.