naftiko: 1.0.0-alpha2 info: label: Lean Payment Sources API — Payment Sources description: 'Lean Payment Sources — list, retrieve, and delete tokenized customer payment sources.' tags: - Lean - Payment Sources - Tokenization created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: LEAN_API_TOKEN: LEAN_API_TOKEN capability: consumes: - type: http namespace: payment-sources-payment-sources baseUri: https://api2.leantech.me description: Lean Payment Sources API — Payment Sources business capability backed by Lean Technologies APIs. resources: - name: customer-payment-sources path: /customers/v1/{customer_id}/payment-sources operations: - name: listCustomerPaymentSources method: GET description: Lean List Customer Payment Sources outputRawFormat: json inputParameters: - name: customer_id in: path type: string required: true outputParameters: - name: result type: object value: $. - name: payment-source-by-id path: /customers/v1/{customer_id}/payment-sources/{payment_source_id} operations: - name: getPaymentSourceById method: GET description: Lean Get Payment Source By Id outputRawFormat: json inputParameters: - name: customer_id in: path type: string required: true - name: payment_source_id in: path type: string required: true outputParameters: - name: result type: object value: $. - name: deletePaymentSource method: DELETE description: Lean Delete Payment Source outputRawFormat: json inputParameters: - name: customer_id in: path type: string required: true - name: payment_source_id in: path type: string required: true outputParameters: - name: result type: object value: $. authentication: type: apikey key: Authorization value: 'Bearer {{env.LEAN_API_TOKEN}}' placement: header exposes: - type: rest namespace: payment-sources-payment-sources-rest port: 8080 description: REST adapter for Lean Payment Sources API — Payment Sources. resources: - path: /v1/customers/v1/{customer_id}/payment-sources name: customer-payment-sources operations: - method: GET name: listCustomerPaymentSources description: Lean List Customer Payment Sources call: payment-sources-payment-sources.listCustomerPaymentSources with: customer_id: rest.path.customer_id - path: /v1/customers/v1/{customer_id}/payment-sources/{payment_source_id} name: payment-source-by-id operations: - method: GET name: getPaymentSourceById description: Lean Get Payment Source By Id call: payment-sources-payment-sources.getPaymentSourceById with: customer_id: rest.path.customer_id payment_source_id: rest.path.payment_source_id - method: DELETE name: deletePaymentSource description: Lean Delete Payment Source call: payment-sources-payment-sources.deletePaymentSource with: customer_id: rest.path.customer_id payment_source_id: rest.path.payment_source_id - type: mcp namespace: payment-sources-payment-sources-mcp port: 9090 transport: http description: MCP adapter for Lean Payment Sources API — Payment Sources. tools: - name: lean-listcustomerpaymentsources description: Lean List Customer Payment Sources hints: readOnly: true destructive: false idempotent: true call: payment-sources-payment-sources.listCustomerPaymentSources with: customer_id: tools.customer_id - name: lean-getpaymentsourcebyid description: Lean Get Payment Source By Id hints: readOnly: true destructive: false idempotent: true call: payment-sources-payment-sources.getPaymentSourceById with: customer_id: tools.customer_id payment_source_id: tools.payment_source_id - name: lean-deletepaymentsource description: Lean Delete Payment Source hints: readOnly: false destructive: true idempotent: true call: payment-sources-payment-sources.deletePaymentSource with: customer_id: tools.customer_id payment_source_id: tools.payment_source_id