openapi: 3.1.0 info: title: Lean Authentication Account on File Payment Sources API description: 'OAuth 2.0 client-credentials token issuance for Lean APIs. Generates two classes of JWT access token: (1) scope=api for server-to-server backend calls, and (2) scope=customer. for the LinkSDK to act on behalf of an end-user. All tokens must be generated from a secure backend using credentials issued in the Lean Application Dashboard. ' version: '1.0' contact: name: Lean Support url: https://help.leantech.me license: name: Lean Terms of Service url: https://www.leantech.me servers: - url: https://auth.leantech.me description: Production - url: https://auth.sandbox.ae.leantech.me description: Sandbox - UAE - url: https://auth.sandbox.sa.leantech.me description: Sandbox - KSA tags: - name: Payment Sources paths: /customers/v1/{customer_id}/payment-sources: get: summary: Lean List Customer Payment Sources operationId: listCustomerPaymentSources tags: - Payment Sources parameters: - $ref: '#/components/parameters/CustomerId' responses: '200': description: Payment sources content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentSource' /customers/v1/{customer_id}/payment-sources/{payment_source_id}: get: summary: Lean Get Payment Source By Id operationId: getPaymentSourceById tags: - Payment Sources parameters: - $ref: '#/components/parameters/CustomerId' - $ref: '#/components/parameters/PaymentSourceId' responses: '200': description: Payment source content: application/json: schema: $ref: '#/components/schemas/PaymentSource' delete: summary: Lean Delete Payment Source operationId: deletePaymentSource tags: - Payment Sources parameters: - $ref: '#/components/parameters/CustomerId' - $ref: '#/components/parameters/PaymentSourceId' responses: '204': description: Deleted components: parameters: CustomerId: name: customer_id in: path required: true schema: type: string format: uuid PaymentSourceId: name: payment_source_id in: path required: true schema: type: string format: uuid schemas: PaymentSource: type: object properties: id: type: string format: uuid customer_id: type: string format: uuid bank_identifier: type: string consent_id: type: string format: uuid account_iban_last4: type: string currency: type: string status: type: string enum: - ACTIVE - EXPIRED - REVOKED created_at: type: string format: date-time