Stripe · Capability

Stripe Tokens API — Tokens

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

Run with Naftiko StripeTokens

What You Can Do

POST
Posttokens

Creates a single-use token that represents a bank account’s details.

/v1/v1/tokens
GET
Gettokenstoken

Retrieves the token with the given ID.

/v1/v1/tokens/{token}

MCP Tools

p-creates-single-use-token-that

Creates a single-use token that represents a bank account’s details.

p-retrieves-token-given-id-p

Retrieves the token with the given ID.

read-only idempotent

Capability Spec

tokens-tokens-2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Tokens API — Tokens
  description: 'Stripe Tokens API — Tokens. 2 operations. Lead operation: Tokens. Self-contained Naftiko capability covering
    one Stripe business surface.'
  tags:
  - Stripe
  - Tokens
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: tokens-tokens-2
    baseUri: https://api.stripe.com
    description: Stripe Tokens API — Tokens business capability. Self-contained, no shared references.
    resources:
    - name: v1-tokens
      path: /v1/tokens
      operations:
      - name: posttokens
        method: POST
        description: <p>Creates a single-use token that represents a bank account’s details.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-tokens-token
      path: /v1/tokens/{token}
      operations:
      - name: gettokenstoken
        method: GET
        description: <p>Retrieves the token with the given ID.</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: token
          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: tokens-tokens-2-rest
    port: 8080
    description: REST adapter for Stripe Tokens API — Tokens. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/tokens
      name: v1-tokens
      description: REST surface for v1-tokens.
      operations:
      - method: POST
        name: posttokens
        description: <p>Creates a single-use token that represents a bank account’s details.
        call: tokens-tokens-2.posttokens
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tokens/{token}
      name: v1-tokens-token
      description: REST surface for v1-tokens-token.
      operations:
      - method: GET
        name: gettokenstoken
        description: <p>Retrieves the token with the given ID.</p>
        call: tokens-tokens-2.gettokenstoken
        with:
          expand: rest.expand
          token: rest.token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: tokens-tokens-2-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Tokens API — Tokens. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: p-creates-single-use-token-that
      description: <p>Creates a single-use token that represents a bank account’s details.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tokens-tokens-2.posttokens
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-token-given-id-p
      description: <p>Retrieves the token with the given ID.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tokens-tokens-2.gettokenstoken
      with:
        expand: tools.expand
        token: tools.token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.