openapi: 3.1.0 info: title: Lean Authentication Account on File Payouts 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: Payouts paths: /payouts/v1/payment: post: summary: Lean Create Payout Payment operationId: createPayoutPayment tags: - Payouts requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PayoutRequest' responses: '201': description: Payout created content: application/json: schema: $ref: '#/components/schemas/Payout' /payouts/v1/payments: get: summary: Lean List Payouts operationId: listPayouts tags: - Payouts responses: '200': description: Payouts /payouts/v1/payments/{payment_id}/history: get: summary: Lean Get Payout Payment History operationId: getPayoutPaymentHistory tags: - Payouts parameters: - name: payment_id in: path required: true schema: type: string format: uuid responses: '200': description: History /payouts/v1/{payment_id}: get: summary: Lean Get Payout operationId: getPayout tags: - Payouts parameters: - name: payment_id in: path required: true schema: type: string format: uuid responses: '200': description: Payout /payouts/v1/intents/{payment_intent_id}: get: summary: Lean Get Payout Intent operationId: getPayoutIntent tags: - Payouts parameters: - name: payment_intent_id in: path required: true schema: type: string format: uuid responses: '200': description: Payout intent components: schemas: PayoutRequest: type: object required: - amount - currency - destination_id properties: amount: type: number currency: type: string destination_id: type: string format: uuid description: type: string reference: type: string idempotency_key: type: string Payout: type: object properties: id: type: string format: uuid status: type: string enum: - PENDING - SUBMITTED - COMPLETED - FAILED - REJECTED amount: type: number currency: type: string destination_id: type: string format: uuid created_at: type: string format: date-time