Shift4 Payments · Capability

Shift4 Payments API — Refunds

Shift4 Payments API — Refunds. 4 operations. Lead operation: Refund a Charge. Self-contained Naftiko capability covering one Shift4 Payments business surface.

Run with Naftiko Shift4 PaymentsRefunds

What You Can Do

POST
Createrefund — Refund a Charge
/v1/refunds
GET
Listrefunds — List Refunds
/v1/refunds
GET
Getrefund — Retrieve a Refund
/v1/refunds/{refundid}
POST
Updaterefund — Update a Refund
/v1/refunds/{refundid}

MCP Tools

refund-charge

Refund a Charge

list-refunds

List Refunds

read-only idempotent
retrieve-refund

Retrieve a Refund

read-only idempotent
update-refund

Update a Refund

Capability Spec

shift4-refunds.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Shift4 Payments API — Refunds
  description: 'Shift4 Payments API — Refunds. 4 operations. Lead operation: Refund a Charge. Self-contained Naftiko capability
    covering one Shift4 Payments business surface.'
  tags:
  - Shift4 Payments
  - Refunds
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SHIFT4_PAYMENTS_API_KEY: SHIFT4_PAYMENTS_API_KEY
capability:
  consumes:
  - type: http
    namespace: shift4-refunds
    baseUri: https://api.shift4.com
    description: Shift4 Payments API — Refunds business capability. Self-contained, no shared references.
    resources:
    - name: refunds
      path: /refunds
      operations:
      - name: createrefund
        method: POST
        description: Refund a Charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listrefunds
        method: GET
        description: List Refunds
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: refunds-refundId
      path: /refunds/{refundId}
      operations:
      - name: getrefund
        method: GET
        description: Retrieve a Refund
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updaterefund
        method: POST
        description: Update a Refund
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: basic
      username: '{{env.SHIFT4_PAYMENTS_USER}}'
      password: '{{env.SHIFT4_PAYMENTS_PASS}}'
  exposes:
  - type: rest
    namespace: shift4-refunds-rest
    port: 8080
    description: REST adapter for Shift4 Payments API — Refunds. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/refunds
      name: refunds
      description: REST surface for refunds.
      operations:
      - method: POST
        name: createrefund
        description: Refund a Charge
        call: shift4-refunds.createrefund
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listrefunds
        description: List Refunds
        call: shift4-refunds.listrefunds
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/refunds/{refundid}
      name: refunds-refundid
      description: REST surface for refunds-refundId.
      operations:
      - method: GET
        name: getrefund
        description: Retrieve a Refund
        call: shift4-refunds.getrefund
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updaterefund
        description: Update a Refund
        call: shift4-refunds.updaterefund
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: shift4-refunds-mcp
    port: 9090
    transport: http
    description: MCP adapter for Shift4 Payments API — Refunds. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: refund-charge
      description: Refund a Charge
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: shift4-refunds.createrefund
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-refunds
      description: List Refunds
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: shift4-refunds.listrefunds
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-refund
      description: Retrieve a Refund
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: shift4-refunds.getrefund
      outputParameters:
      - type: object
        mapping: $.
    - name: update-refund
      description: Update a Refund
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: shift4-refunds.updaterefund
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.