TrueLayer · Capability

TrueLayer Payments API — Refunds

TrueLayer Payments API — Refunds. 2 operations. Lead operation: Create Refund. Self-contained Naftiko capability covering one Truelayer business surface.

Run with Naftiko TruelayerRefunds

What You Can Do

POST
Createrefund — Create Refund
/v1/v3/payments/{id}/refunds
GET
Listpaymentrefunds — List Payment Refunds
/v1/v3/payments/{id}/refunds

MCP Tools

create-refund

Create Refund

list-payment-refunds

List Payment Refunds

read-only idempotent

Capability Spec

payments-refunds.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TrueLayer Payments API — Refunds
  description: 'TrueLayer Payments API — Refunds. 2 operations. Lead operation: Create Refund. Self-contained Naftiko capability
    covering one Truelayer business surface.'
  tags:
  - Truelayer
  - Refunds
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TRUELAYER_API_KEY: TRUELAYER_API_KEY
capability:
  consumes:
  - type: http
    namespace: payments-refunds
    baseUri: https://api.truelayer.com
    description: TrueLayer Payments API — Refunds business capability. Self-contained, no shared references.
    resources:
    - name: v3-payments-id-refunds
      path: /v3/payments/{id}/refunds
      operations:
      - name: createrefund
        method: POST
        description: Create Refund
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Payment UUID to refund
          required: true
        - name: Tl-Signature
          in: header
          type: string
          required: true
        - name: Idempotency-Key
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listpaymentrefunds
        method: GET
        description: List Payment Refunds
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.TRUELAYER_API_KEY}}'
  exposes:
  - type: rest
    namespace: payments-refunds-rest
    port: 8080
    description: REST adapter for TrueLayer Payments API — Refunds. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v3/payments/{id}/refunds
      name: v3-payments-id-refunds
      description: REST surface for v3-payments-id-refunds.
      operations:
      - method: POST
        name: createrefund
        description: Create Refund
        call: payments-refunds.createrefund
        with:
          id: rest.id
          Tl-Signature: rest.Tl-Signature
          Idempotency-Key: rest.Idempotency-Key
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listpaymentrefunds
        description: List Payment Refunds
        call: payments-refunds.listpaymentrefunds
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: payments-refunds-mcp
    port: 9090
    transport: http
    description: MCP adapter for TrueLayer Payments API — Refunds. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-refund
      description: Create Refund
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: payments-refunds.createrefund
      with:
        id: tools.id
        Tl-Signature: tools.Tl-Signature
        Idempotency-Key: tools.Idempotency-Key
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-payment-refunds
      description: List Payment Refunds
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: payments-refunds.listpaymentrefunds
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.