Lean Technologies Refunds API

The Refunds API from Lean Technologies — 2 operation(s) for refunds.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

lean-tech-refunds-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Lean Authentication Account on File Refunds 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.<customer_id> 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: Refunds
paths:
  /payouts/refunds:
    get:
      summary: Lean List Refunds
      operationId: listRefunds
      tags:
      - Refunds
      responses:
        '200':
          description: Refunds
    post:
      summary: Lean Create Refund
      operationId: createRefund
      tags:
      - Refunds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
      responses:
        '201':
          description: Refund created
    put:
      summary: Lean Process Refunds
      operationId: processRefunds
      tags:
      - Refunds
      responses:
        '200':
          description: Refunds processed
  /payouts/refunds/reasons:
    get:
      summary: Lean Get Refund Reasons
      operationId: getRefundReasons
      tags:
      - Refunds
      responses:
        '200':
          description: Refund reasons
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    description:
                      type: string
components:
  schemas:
    RefundRequest:
      type: object
      required:
      - payment_id
      - amount
      - reason_code
      properties:
        payment_id:
          type: string
          format: uuid
        amount:
          type: number
        currency:
          type: string
        reason_code:
          type: string
        description:
          type: string
        idempotency_key:
          type: string