naftiko: 1.0.0-alpha2 info: label: Stripe Payment Method API — Payment Methods description: 'Stripe Payment Method API — Payment Methods. 6 operations. Lead operation: Payment Methods. Self-contained Naftiko capability covering one Stripe business surface.' tags: - Stripe - Payment Methods created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: STRIPE_API_KEY: STRIPE_API_KEY capability: consumes: - type: http namespace: payment-method-payment-methods baseUri: https://api.stripe.com description: Stripe Payment Method API — Payment Methods business capability. Self-contained, no shared references. resources: - name: v1-payment_methods path: /v1/payment_methods operations: - name: getpaymentmethods method: GET description:

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods AP outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: customer in: query type: string description: The ID of the customer whose PaymentMethods will be retrieved. - name: ending_before in: query type: string description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 ob - name: expand in: query type: array description: Specifies which fields in the response should be expanded. - name: limit in: query type: integer description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - name: starting_after in: query type: string description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 o - name: type in: query type: string description: An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your int - name: body in: body type: object description: Request body (JSON). required: false - name: postpaymentmethods method: POST description:

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: v1-payment_methods-payment_method path: /v1/payment_methods/{payment_method} operations: - name: getpaymentmethodspaymentmethod method: GET description:

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

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: payment_method in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: postpaymentmethodspaymentmethod method: POST description:

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: payment_method in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: v1-payment_methods-payment_method-attach path: /v1/payment_methods/{payment_method}/attach operations: - name: postpaymentmethodspaymentmethodattach method: POST description:

Attaches a PaymentMethod object to a Customer.

outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: payment_method in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v1-payment_methods-payment_method-detach path: /v1/payment_methods/{payment_method}/detach operations: - name: postpaymentmethodspaymentmethoddetach method: POST description:

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: payment_method 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: payment-method-payment-methods-rest port: 8080 description: REST adapter for Stripe Payment Method API — Payment Methods. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/payment-methods name: v1-payment-methods description: REST surface for v1-payment_methods. operations: - method: GET name: getpaymentmethods description:

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods AP call: payment-method-payment-methods.getpaymentmethods with: customer: rest.customer ending_before: rest.ending_before expand: rest.expand limit: rest.limit starting_after: rest.starting_after type: rest.type body: rest.body outputParameters: - type: object mapping: $. - method: POST name: postpaymentmethods description:

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

call: payment-method-payment-methods.postpaymentmethods with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/payment-methods/{payment-method} name: v1-payment-methods-payment-method description: REST surface for v1-payment_methods-payment_method. operations: - method: GET name: getpaymentmethodspaymentmethod description:

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

call: payment-method-payment-methods.getpaymentmethodspaymentmethod with: expand: rest.expand payment_method: rest.payment_method body: rest.body outputParameters: - type: object mapping: $. - method: POST name: postpaymentmethodspaymentmethod description:

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

call: payment-method-payment-methods.postpaymentmethodspaymentmethod with: payment_method: rest.payment_method body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/payment-methods/{payment-method}/attach name: v1-payment-methods-payment-method-attach description: REST surface for v1-payment_methods-payment_method-attach. operations: - method: POST name: postpaymentmethodspaymentmethodattach description:

Attaches a PaymentMethod object to a Customer.

call: payment-method-payment-methods.postpaymentmethodspaymentmethodattach with: payment_method: rest.payment_method body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/payment-methods/{payment-method}/detach name: v1-payment-methods-payment-method-detach description: REST surface for v1-payment_methods-payment_method-detach. operations: - method: POST name: postpaymentmethodspaymentmethoddetach description:

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

call: payment-method-payment-methods.postpaymentmethodspaymentmethoddetach with: payment_method: rest.payment_method body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: payment-method-payment-methods-mcp port: 9090 transport: http description: MCP adapter for Stripe Payment Method API — Payment Methods. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: p-returns-list-paymentmethods-treasury-flows description:

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods AP hints: readOnly: true destructive: false idempotent: true call: payment-method-payment-methods.getpaymentmethods with: customer: tools.customer ending_before: tools.ending_before expand: tools.expand limit: tools.limit starting_after: tools.starting_after type: tools.type body: tools.body outputParameters: - type: object mapping: $. - name: p-creates-paymentmethod-object-read-href description:

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

hints: readOnly: false destructive: false idempotent: false call: payment-method-payment-methods.postpaymentmethods with: body: tools.body outputParameters: - type: object mapping: $. - name: p-retrieves-paymentmethod-object-attached-stripeaccount description:

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

hints: readOnly: true destructive: false idempotent: true call: payment-method-payment-methods.getpaymentmethodspaymentmethod with: expand: tools.expand payment_method: tools.payment_method body: tools.body outputParameters: - type: object mapping: $. - name: p-updates-paymentmethod-object-paymentmethod-must description:

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

hints: readOnly: false destructive: false idempotent: false call: payment-method-payment-methods.postpaymentmethodspaymentmethod with: payment_method: tools.payment_method body: tools.body outputParameters: - type: object mapping: $. - name: p-attaches-paymentmethod-object-customer-p description:

Attaches a PaymentMethod object to a Customer.

hints: readOnly: false destructive: false idempotent: false call: payment-method-payment-methods.postpaymentmethodspaymentmethodattach with: payment_method: tools.payment_method body: tools.body outputParameters: - type: object mapping: $. - name: p-detaches-paymentmethod-object-customer-after description:

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

hints: readOnly: false destructive: false idempotent: false call: payment-method-payment-methods.postpaymentmethodspaymentmethoddetach with: payment_method: tools.payment_method body: tools.body outputParameters: - type: object mapping: $.