Stripe · Capability

Stripe Refunds API — Refunds

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

Run with Naftiko StripeRefunds

What You Can Do

GET
Getrefunds

Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object.

/v1/v1/refunds
POST
Postrefunds

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

/v1/v1/refunds
GET
Getrefundsrefund

Retrieves the details of an existing refund.

/v1/v1/refunds/{refund}
POST
Postrefundsrefund

Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.

/v1/v1/refunds/{refund}
POST
Postrefundsrefundcancel

Cancels a refund with a status of requires_action.

/v1/v1/refunds/{refund}/cancel

MCP Tools

p-returns-list-all-refunds-you

Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object.

read-only idempotent
p-when-you-create-new-refund

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

p-retrieves-details-existing-refund-p

Retrieves the details of an existing refund.

read-only idempotent
p-updates-refund-that-you-specify

Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.

p-cancels-refund-status-code-requires-action

Cancels a refund with a status of requires_action.

Capability Spec

refunds-refunds.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Refunds API — Refunds
  description: 'Stripe Refunds API — Refunds. 5 operations. Lead operation: Refunds. Self-contained Naftiko capability covering
    one Stripe business surface.'
  tags:
  - Stripe
  - Refunds
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: refunds-refunds
    baseUri: https://api.stripe.com
    description: Stripe Refunds API — Refunds business capability. Self-contained, no shared references.
    resources:
    - name: v1-refunds
      path: /v1/refunds
      operations:
      - name: getrefunds
        method: GET
        description: <p>Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent
          refunds appearing first The 10 most recent refunds are always available by default on the Charge object.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: charge
          in: query
          type: string
          description: Only return refunds for the charge specified by this charge ID.
        - name: created
          in: query
          type: string
        - 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: payment_intent
          in: query
          type: string
          description: Only return refunds for the PaymentIntent specified by this ID.
        - 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: postrefunds
        method: POST
        description: <p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create
          it.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-refunds-refund
      path: /v1/refunds/{refund}
      operations:
      - name: getrefundsrefund
        method: GET
        description: <p>Retrieves the details of an existing refund.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: refund
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: postrefundsrefund
        method: POST
        description: <p>Updates the refund that you specify by setting the values of the passed parameters. Any parameters
          that you don’t provide remain unchanged.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: refund
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-refunds-refund-cancel
      path: /v1/refunds/{refund}/cancel
      operations:
      - name: postrefundsrefundcancel
        method: POST
        description: <p>Cancels a refund with a status of <code>requires_action</code>.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: refund
          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: refunds-refunds-rest
    port: 8080
    description: REST adapter for Stripe Refunds API — Refunds. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/refunds
      name: v1-refunds
      description: REST surface for v1-refunds.
      operations:
      - method: GET
        name: getrefunds
        description: <p>Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent
          refunds appearing first The 10 most recent refunds are always available by default on the Charge object.</p>
        call: refunds-refunds.getrefunds
        with:
          charge: rest.charge
          created: rest.created
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          payment_intent: rest.payment_intent
          starting_after: rest.starting_after
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postrefunds
        description: <p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create
          it.</p>
        call: refunds-refunds.postrefunds
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/refunds/{refund}
      name: v1-refunds-refund
      description: REST surface for v1-refunds-refund.
      operations:
      - method: GET
        name: getrefundsrefund
        description: <p>Retrieves the details of an existing refund.</p>
        call: refunds-refunds.getrefundsrefund
        with:
          expand: rest.expand
          refund: rest.refund
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postrefundsrefund
        description: <p>Updates the refund that you specify by setting the values of the passed parameters. Any parameters
          that you don’t provide remain unchanged.</p>
        call: refunds-refunds.postrefundsrefund
        with:
          refund: rest.refund
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/refunds/{refund}/cancel
      name: v1-refunds-refund-cancel
      description: REST surface for v1-refunds-refund-cancel.
      operations:
      - method: POST
        name: postrefundsrefundcancel
        description: <p>Cancels a refund with a status of <code>requires_action</code>.</p>
        call: refunds-refunds.postrefundsrefundcancel
        with:
          refund: rest.refund
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: refunds-refunds-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Refunds API — Refunds. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: p-returns-list-all-refunds-you
      description: <p>Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent
        refunds appearing first The 10 most recent refunds are always available by default on the Charge object.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: refunds-refunds.getrefunds
      with:
        charge: tools.charge
        created: tools.created
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        payment_intent: tools.payment_intent
        starting_after: tools.starting_after
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-when-you-create-new-refund
      description: <p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create
        it.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: refunds-refunds.postrefunds
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-details-existing-refund-p
      description: <p>Retrieves the details of an existing refund.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: refunds-refunds.getrefundsrefund
      with:
        expand: tools.expand
        refund: tools.refund
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-updates-refund-that-you-specify
      description: <p>Updates the refund that you specify by setting the values of the passed parameters. Any parameters that
        you don’t provide remain unchanged.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: refunds-refunds.postrefundsrefund
      with:
        refund: tools.refund
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-cancels-refund-status-code-requires-action
      description: <p>Cancels a refund with a status of <code>requires_action</code>.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: refunds-refunds.postrefundsrefundcancel
      with:
        refund: tools.refund
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.