naftiko: 1.0.0-alpha2 info: label: Lean Payments API — Consents description: 'Lean Payments — manage long-lived consents including details, balance, history, and per-customer listing.' tags: - Lean - Payments - Consents created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: LEAN_API_TOKEN: LEAN_API_TOKEN capability: consumes: - type: http namespace: payments-consents baseUri: https://api2.leantech.me description: Lean Payments API — Consents business capability backed by Lean Technologies APIs. resources: - name: customer-consents path: /consents/v1 operations: - name: listCustomerConsents method: GET description: Lean List Customer Consents outputRawFormat: json inputParameters: - name: customer_id in: query type: string required: false outputParameters: - name: result type: object value: $. - name: consent-details path: /consents/{consent_id} operations: - name: getConsentDetails method: GET description: Lean Get Consent Details outputRawFormat: json inputParameters: - name: consent_id in: path type: string required: true outputParameters: - name: result type: object value: $. - name: consent-balance path: /consents/{consent_id}/balance operations: - name: fetchConsentBalance method: GET description: Lean Fetch Consent Balance outputRawFormat: json inputParameters: - name: consent_id in: path type: string required: true outputParameters: - name: result type: object value: $. - name: consent-history path: /consents/{consent_id}/history operations: - name: getConsentHistory method: GET description: Lean Get Consent History outputRawFormat: json inputParameters: - name: consent_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: payments-consents-rest port: 8080 description: REST adapter for Lean Payments API — Consents. resources: - path: /v1/consents/v1 name: customer-consents operations: - method: GET name: listCustomerConsents description: Lean List Customer Consents call: payments-consents.listCustomerConsents with: customer_id: rest.query.customer_id - path: /v1/consents/{consent_id} name: consent-details operations: - method: GET name: getConsentDetails description: Lean Get Consent Details call: payments-consents.getConsentDetails with: consent_id: rest.path.consent_id - path: /v1/consents/{consent_id}/balance name: consent-balance operations: - method: GET name: fetchConsentBalance description: Lean Fetch Consent Balance call: payments-consents.fetchConsentBalance with: consent_id: rest.path.consent_id - path: /v1/consents/{consent_id}/history name: consent-history operations: - method: GET name: getConsentHistory description: Lean Get Consent History call: payments-consents.getConsentHistory with: consent_id: rest.path.consent_id - type: mcp namespace: payments-consents-mcp port: 9090 transport: http description: MCP adapter for Lean Payments API — Consents. tools: - name: lean-listcustomerconsents description: Lean List Customer Consents hints: readOnly: true destructive: false idempotent: true call: payments-consents.listCustomerConsents with: customer_id: tools.customer_id - name: lean-getconsentdetails description: Lean Get Consent Details hints: readOnly: true destructive: false idempotent: true call: payments-consents.getConsentDetails with: consent_id: tools.consent_id - name: lean-fetchconsentbalance description: Lean Fetch Consent Balance hints: readOnly: true destructive: false idempotent: true call: payments-consents.fetchConsentBalance with: consent_id: tools.consent_id - name: lean-getconsenthistory description: Lean Get Consent History hints: readOnly: true destructive: false idempotent: true call: payments-consents.getConsentHistory with: consent_id: tools.consent_id