Affirm · Capability

Affirm Transactions API — Transactions

Affirm Transactions API — Transactions. 7 operations. Lead operation: Affirm List Transactions. Self-contained Naftiko capability covering one Affirm business surface.

Run with Naftiko AffirmTransactions

What You Can Do

GET
Listtransactions — Affirm List Transactions
/v1/transactions
POST
Authorizetransaction — Affirm Authorize a Transaction
/v1/transactions
GET
Readtransaction — Affirm Read a Transaction
/v1/transactions/{id}
POST
Updatetransaction — Affirm Update a Transaction
/v1/transactions/{id}
POST
Capturetransaction — Affirm Capture a Transaction
/v1/transactions/{id}/capture
POST
Refundtransaction — Affirm Refund a Transaction
/v1/transactions/{id}/refund
POST
Voidtransaction — Affirm Void a Transaction
/v1/transactions/{id}/void

MCP Tools

affirm-list-transactions

Affirm List Transactions

read-only idempotent
affirm-authorize-transaction

Affirm Authorize a Transaction

affirm-read-transaction

Affirm Read a Transaction

read-only idempotent
affirm-update-transaction

Affirm Update a Transaction

affirm-capture-transaction

Affirm Capture a Transaction

affirm-refund-transaction

Affirm Refund a Transaction

affirm-void-transaction

Affirm Void a Transaction

Capability Spec

transactions-transactions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Affirm Transactions API — Transactions
  description: 'Affirm Transactions API — Transactions. 7 operations. Lead operation: Affirm List Transactions. Self-contained
    Naftiko capability covering one Affirm business surface.'
  tags:
  - Affirm
  - Transactions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    AFFIRM_API_KEY: AFFIRM_API_KEY
capability:
  consumes:
  - type: http
    namespace: transactions-transactions
    baseUri: https://api.affirm.com/api/v1
    description: Affirm Transactions API — Transactions business capability. Self-contained, no shared references.
    resources:
    - name: transactions
      path: /transactions
      operations:
      - name: listtransactions
        method: GET
        description: Affirm List Transactions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: authorizetransaction
        method: POST
        description: Affirm Authorize a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: transactions-id
      path: /transactions/{id}
      operations:
      - name: readtransaction
        method: GET
        description: Affirm Read a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatetransaction
        method: POST
        description: Affirm Update a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: transactions-id-capture
      path: /transactions/{id}/capture
      operations:
      - name: capturetransaction
        method: POST
        description: Affirm Capture a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: transactions-id-refund
      path: /transactions/{id}/refund
      operations:
      - name: refundtransaction
        method: POST
        description: Affirm Refund a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: transactions-id-void
      path: /transactions/{id}/void
      operations:
      - name: voidtransaction
        method: POST
        description: Affirm Void a Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: basic
      username: '{{env.AFFIRM_USER}}'
      password: '{{env.AFFIRM_PASS}}'
  exposes:
  - type: rest
    namespace: transactions-transactions-rest
    port: 8080
    description: REST adapter for Affirm Transactions API — Transactions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/transactions
      name: transactions
      description: REST surface for transactions.
      operations:
      - method: GET
        name: listtransactions
        description: Affirm List Transactions
        call: transactions-transactions.listtransactions
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: authorizetransaction
        description: Affirm Authorize a Transaction
        call: transactions-transactions.authorizetransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/transactions/{id}
      name: transactions-id
      description: REST surface for transactions-id.
      operations:
      - method: GET
        name: readtransaction
        description: Affirm Read a Transaction
        call: transactions-transactions.readtransaction
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updatetransaction
        description: Affirm Update a Transaction
        call: transactions-transactions.updatetransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/transactions/{id}/capture
      name: transactions-id-capture
      description: REST surface for transactions-id-capture.
      operations:
      - method: POST
        name: capturetransaction
        description: Affirm Capture a Transaction
        call: transactions-transactions.capturetransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/transactions/{id}/refund
      name: transactions-id-refund
      description: REST surface for transactions-id-refund.
      operations:
      - method: POST
        name: refundtransaction
        description: Affirm Refund a Transaction
        call: transactions-transactions.refundtransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/transactions/{id}/void
      name: transactions-id-void
      description: REST surface for transactions-id-void.
      operations:
      - method: POST
        name: voidtransaction
        description: Affirm Void a Transaction
        call: transactions-transactions.voidtransaction
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: transactions-transactions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Affirm Transactions API — Transactions. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: affirm-list-transactions
      description: Affirm List Transactions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: transactions-transactions.listtransactions
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-authorize-transaction
      description: Affirm Authorize a Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: transactions-transactions.authorizetransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-read-transaction
      description: Affirm Read a Transaction
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: transactions-transactions.readtransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-update-transaction
      description: Affirm Update a Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: transactions-transactions.updatetransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-capture-transaction
      description: Affirm Capture a Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: transactions-transactions.capturetransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-refund-transaction
      description: Affirm Refund a Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: transactions-transactions.refundtransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: affirm-void-transaction
      description: Affirm Void a Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: transactions-transactions.voidtransaction
      outputParameters:
      - type: object
        mapping: $.