Amazon · Capability

Amazon Pay API — Charges

Amazon Pay API — Charges. 4 operations. Lead operation: Amazon Create a Charge. Self-contained Naftiko capability covering one Amazon business surface.

Run with Naftiko AmazonCharges

What You Can Do

POST
Createcharge — Amazon Create a Charge
/v1/charges
GET
Getcharge — Amazon Get Charge Details
/v1/charges/{chargeid}
DELETE
Cancelcharge — Amazon Cancel a Charge
/v1/charges/{chargeid}/cancel
POST
Capturecharge — Amazon Capture a Charge
/v1/charges/{chargeid}/capture

MCP Tools

amazon-create-charge

Amazon Create a Charge

amazon-get-charge-details

Amazon Get Charge Details

read-only idempotent
amazon-cancel-charge

Amazon Cancel a Charge

idempotent
amazon-capture-charge

Amazon Capture a Charge

Capability Spec

pay-charges.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Amazon Pay API — Charges
  description: 'Amazon Pay API — Charges. 4 operations. Lead operation: Amazon Create a Charge. Self-contained Naftiko capability
    covering one Amazon business surface.'
  tags:
  - Amazon
  - Charges
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    AMAZON_API_KEY: AMAZON_API_KEY
capability:
  consumes:
  - type: http
    namespace: pay-charges
    baseUri: https://pay-api.amazon.com/live/v2
    description: Amazon Pay API — Charges business capability. Self-contained, no shared references.
    resources:
    - name: charges
      path: /charges
      operations:
      - name: createcharge
        method: POST
        description: Amazon Create a Charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: charges-chargeId
      path: /charges/{chargeId}
      operations:
      - name: getcharge
        method: GET
        description: Amazon Get Charge Details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chargeId
          in: path
          type: string
          required: true
    - name: charges-chargeId-cancel
      path: /charges/{chargeId}/cancel
      operations:
      - name: cancelcharge
        method: DELETE
        description: Amazon Cancel a Charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chargeId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: charges-chargeId-capture
      path: /charges/{chargeId}/capture
      operations:
      - name: capturecharge
        method: POST
        description: Amazon Capture a Charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chargeId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: authorization
      value: '{{env.AMAZON_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: pay-charges-rest
    port: 8080
    description: REST adapter for Amazon Pay API — Charges. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/charges
      name: charges
      description: REST surface for charges.
      operations:
      - method: POST
        name: createcharge
        description: Amazon Create a Charge
        call: pay-charges.createcharge
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/charges/{chargeid}
      name: charges-chargeid
      description: REST surface for charges-chargeId.
      operations:
      - method: GET
        name: getcharge
        description: Amazon Get Charge Details
        call: pay-charges.getcharge
        with:
          chargeId: rest.chargeId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/charges/{chargeid}/cancel
      name: charges-chargeid-cancel
      description: REST surface for charges-chargeId-cancel.
      operations:
      - method: DELETE
        name: cancelcharge
        description: Amazon Cancel a Charge
        call: pay-charges.cancelcharge
        with:
          chargeId: rest.chargeId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/charges/{chargeid}/capture
      name: charges-chargeid-capture
      description: REST surface for charges-chargeId-capture.
      operations:
      - method: POST
        name: capturecharge
        description: Amazon Capture a Charge
        call: pay-charges.capturecharge
        with:
          chargeId: rest.chargeId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: pay-charges-mcp
    port: 9090
    transport: http
    description: MCP adapter for Amazon Pay API — Charges. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: amazon-create-charge
      description: Amazon Create a Charge
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: pay-charges.createcharge
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: amazon-get-charge-details
      description: Amazon Get Charge Details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pay-charges.getcharge
      with:
        chargeId: tools.chargeId
      outputParameters:
      - type: object
        mapping: $.
    - name: amazon-cancel-charge
      description: Amazon Cancel a Charge
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: pay-charges.cancelcharge
      with:
        chargeId: tools.chargeId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: amazon-capture-charge
      description: Amazon Capture a Charge
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: pay-charges.capturecharge
      with:
        chargeId: tools.chargeId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.