Stripe · Capability

Stripe Promotion Codes API — Promotion Codes

Stripe Promotion Codes API — Promotion Codes. 4 operations. Lead operation: Stripe List Promotion Codes. Self-contained Naftiko capability covering one Stripe business surface.

Run with Naftiko StripePromotion Codes

What You Can Do

GET
Getpromotioncodes — Stripe List Promotion Codes
/v1/v1/promotion-codes
POST
Postpromotioncodes — Stripe Create Promotion Code
/v1/v1/promotion-codes
GET
Getpromotioncodespromotioncode — Stripe Retrieve Promotion Code
/v1/v1/promotion-codes/{promotion-code}
POST
Postpromotioncodespromotioncode — Stripe Update Promotion Code
/v1/v1/promotion-codes/{promotion-code}

MCP Tools

stripe-list-promotion-codes

Stripe List Promotion Codes

read-only idempotent
stripe-create-promotion-code

Stripe Create Promotion Code

stripe-retrieve-promotion-code

Stripe Retrieve Promotion Code

read-only idempotent
stripe-update-promotion-code

Stripe Update Promotion Code

Capability Spec

promotion-codes-promotion-codes-2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Promotion Codes API — Promotion Codes
  description: 'Stripe Promotion Codes API — Promotion Codes. 4 operations. Lead operation: Stripe List Promotion Codes. Self-contained
    Naftiko capability covering one Stripe business surface.'
  tags:
  - Stripe
  - Promotion Codes
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: promotion-codes-promotion-codes-2
    baseUri: https://api.stripe.com
    description: Stripe Promotion Codes API — Promotion Codes business capability. Self-contained, no shared references.
    resources:
    - name: v1-promotion_codes
      path: /v1/promotion_codes
      operations:
      - name: getpromotioncodes
        method: GET
        description: Stripe List Promotion Codes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: active
          in: query
          type: boolean
          description: Filter promotion codes by whether they are active.
        - name: code
          in: query
          type: string
          description: Only return promotion codes that have this case-insensitive code.
        - name: coupon
          in: query
          type: string
          description: Only return promotion codes for this coupon.
        - name: customer
          in: query
          type: string
          description: Only return promotion codes that are restricted to this customer.
        - 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.
        - 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.
        - 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.
      - name: postpromotioncodes
        method: POST
        description: Stripe Create Promotion Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-promotion_codes-promotion_code
      path: /v1/promotion_codes/{promotion_code}
      operations:
      - name: getpromotioncodespromotioncode
        method: GET
        description: Stripe Retrieve Promotion Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promotion_code
          in: path
          type: string
          required: true
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
      - name: postpromotioncodespromotioncode
        method: POST
        description: Stripe Update Promotion Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promotion_code
          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: promotion-codes-promotion-codes-2-rest
    port: 8080
    description: REST adapter for Stripe Promotion Codes API — Promotion Codes. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/v1/promotion-codes
      name: v1-promotion-codes
      description: REST surface for v1-promotion_codes.
      operations:
      - method: GET
        name: getpromotioncodes
        description: Stripe List Promotion Codes
        call: promotion-codes-promotion-codes-2.getpromotioncodes
        with:
          active: rest.active
          code: rest.code
          coupon: rest.coupon
          customer: rest.customer
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          starting_after: rest.starting_after
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postpromotioncodes
        description: Stripe Create Promotion Code
        call: promotion-codes-promotion-codes-2.postpromotioncodes
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/promotion-codes/{promotion-code}
      name: v1-promotion-codes-promotion-code
      description: REST surface for v1-promotion_codes-promotion_code.
      operations:
      - method: GET
        name: getpromotioncodespromotioncode
        description: Stripe Retrieve Promotion Code
        call: promotion-codes-promotion-codes-2.getpromotioncodespromotioncode
        with:
          promotion_code: rest.promotion_code
          expand: rest.expand
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postpromotioncodespromotioncode
        description: Stripe Update Promotion Code
        call: promotion-codes-promotion-codes-2.postpromotioncodespromotioncode
        with:
          promotion_code: rest.promotion_code
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: promotion-codes-promotion-codes-2-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Promotion Codes API — Promotion Codes. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: stripe-list-promotion-codes
      description: Stripe List Promotion Codes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: promotion-codes-promotion-codes-2.getpromotioncodes
      with:
        active: tools.active
        code: tools.code
        coupon: tools.coupon
        customer: tools.customer
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        starting_after: tools.starting_after
      outputParameters:
      - type: object
        mapping: $.
    - name: stripe-create-promotion-code
      description: Stripe Create Promotion Code
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: promotion-codes-promotion-codes-2.postpromotioncodes
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: stripe-retrieve-promotion-code
      description: Stripe Retrieve Promotion Code
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: promotion-codes-promotion-codes-2.getpromotioncodespromotioncode
      with:
        promotion_code: tools.promotion_code
        expand: tools.expand
      outputParameters:
      - type: object
        mapping: $.
    - name: stripe-update-promotion-code
      description: Stripe Update Promotion Code
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: promotion-codes-promotion-codes-2.postpromotioncodespromotioncode
      with:
        promotion_code: tools.promotion_code
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.