> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create On Demand Balance Transfer

> The Create On Demand Transfer API will create a new on-demand request either from the merchant ledger or from the vendor ledger to the vendor bank account.



## OpenAPI

````yaml /openapi/payments/v2023-08-01.yaml post /easy-split/vendors/{vendor_id}/transfer
openapi: 3.0.0
info:
  version: '2023-08-01'
  title: Cashfree Payment Gateway APIs
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  description: >-
    Cashfree's Payment Gateway APIs provide developers with a streamlined
    pathway to integrate advanced payment processing capabilities into their
    applications, platforms and websites.
servers:
  - url: https://sandbox.cashfree.com/pg
    description: Sandbox server
  - url: https://api.cashfree.com/pg
    description: Production server
security: []
tags:
  - name: Orders
    description: Collection of APIs to handle orders.
  - name: Payments
    description: Collection of APIs to handle payments.
  - name: Refunds
    description: Collection of APIs to handle refunds.
  - name: Settlements
    description: Collection of APIs to handle settlements.
  - name: Payment Links
    description: Collection of APIs to handle payment links.
  - name: Token Vault
    description: >-
      Collection of APIs to use Cashfree's token Vault. This helps you save
      cards and tokenize them in a PCI complaint manner. We support creation of
      network tokens which can be used across acquiring banks
  - name: softPOS
    description: Collection of APIs to manage softPOS' agent and order
  - name: Offers
    description: Collection of APIs to handle offers
  - name: Eligibility
    description: >-
      Collection of APIs to check eligibile entities - payment methods, offer,
      affordibility
  - name: Settlement Reconciliation
    description: Collection of APIs to handle settlements
  - name: PG Reconciliation
    description: Collection of APIs to handle reconciliation
  - name: Customers
    description: Collection of APIs to handle customers.
  - name: Easy-Split
    description: Collection of APIs to handle Easy-Split.
  - name: Simulation
    description: Collection of APIs to handle simulation.
  - name: Disputes
    description: Collection of APIs to handle disputes.
externalDocs:
  url: https://api.cashfree.com/pg
  description: This url will have the information of all the APIs.
paths:
  /easy-split/vendors/{vendor_id}/transfer:
    post:
      tags:
        - Easy-Split
      summary: Create On Demand Balance Transfer
      description: >-
        The Create On Demand Transfer API will create a new on-demand request
        either from the merchant ledger or from the vendor ledger to the vendor
        bank account.
      operationId: PGESCreateOnDemandTransfer
      parameters:
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/vendorIDParam'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
      requestBody:
        $ref: '#/components/requestBodies/VendorOnDemandSettlementRequestBody'
      responses:
        '200':
          $ref: '#/components/responses/adjustVendorBalanceSuccessResponse'
        '400':
          $ref: '#/components/responses/Response400AdjustVendorBalance'
      deprecated: false
      security:
        - XClientID: []
          XClientSecret: []
        - XClientID: []
          XPartnerAPIKey: []
        - XClientID: []
          XClientSignatureHeader: []
        - XPartnerMerchantID: []
          XPartnerAPIKey: []
components:
  parameters:
    apiVersionHeader:
      in: header
      name: x-api-version
      required: true
      description: API version to be used. Format is in YYYY-MM-DD
      schema:
        type: string
        description: API version to be used
        default: '2023-08-01'
      example: '2023-08-01'
    vendorIDParam:
      name: vendor_id
      in: path
      required: true
      description: The id which uniquely identifies your vendor.
      schema:
        type: string
      example: your-vendor-id
    xRequestIDHeader:
      in: header
      name: x-request-id
      description: >-
        Request id for the API call. Can be used to resolve tech issues.
        Communicate this in your tech related queries to cashfree
      required: false
      schema:
        type: string
      example: 4dfb9780-46fe-11ee-be56-0242ac120002
    xIdempotencyKeyHeader:
      in: header
      name: x-idempotency-key
      required: false
      description: >
        An idempotency key is a unique identifier you include with your API
        call.

        If the request fails or times out, you can safely retry it using the
        same key to avoid duplicate actions.
      schema:
        type: string
        format: UUID
      example: 47bf8872-46fe-11ee-be56-0242ac120002
  requestBodies:
    VendorOnDemandSettlementRequestBody:
      description: Vendor On Demand Settlement Request Body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VendorOnDemandSettlementRequest'
          examples:
            PG:
              value:
                transfer_from: VENDOR
                transfer_type: ON_DEMAND
                transfer_amount: 10
                remark: Testing
                tags:
                  size: 1
                  product: SHRT
  responses:
    adjustVendorBalanceSuccessResponse:
      description: Adjust Vendor Balance Success Response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AdjustVendorBalanceResponse'
          examples:
            PG:
              value:
                settlement_id: 1050232
                transfer_details:
                  vendor_id: test03
                  transfer_from: VENDOR
                  transfer_type: ON_DEMAND
                  transfer_amount: 10
                  remark: Testing
                  tags:
                    product: Paneer Tikka
                    size: L
                    AWB: PNRTKKA12334
                balances:
                  merchant_id: 152707
                  vendor_id: test03
                  merchant_unsettled: 2442
                  vendor_unsettled: 4757.42
                charges:
                  service_charges: 2
                  service_tax: 0.36
                  amount: 10
                  billed_to: MERCHANT
                  is_postpaid: true
    Response400AdjustVendorBalance:
      description: Adjust Vendor Balance Failure Response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
          examples:
            Vendor does not exist:
              value:
                message: vendor does not exist
                code: api_request_failed
                type: invalid_request_error
            Invalid transfer amount:
              value:
                message: Transfer amount should be greater than or equal to 10
                code: api_request_failed
                type: invalid_request_error
            No sufficient balance with vendor:
              value:
                message: VENDOR does not have sufficient funds for express settlement
                code: api_request_failed
                type: invalid_request_error
            No sufficient balance with merchant:
              value:
                message: MERCHANT does not have sufficient funds for express settlement
                code: api_request_failed
                type: invalid_request_error
  schemas:
    VendorOnDemandSettlementRequest:
      title: VendorOnDemandSettlementRequest
      description: Vendor On Demand Settlement Request
      type: object
      properties:
        transfer_from:
          type: string
          description: >-
            Specify the source of the on-demand balance transfer. Possible
            values include: MERCHANT (merchant ledger to vendor bank account) or
            VENDOR (vendor ledger to vendor bank account).
        transfer_type:
          type: string
          description: 'Mention the type of transfer. Possible value: ON_DEMAND.'
        transfer_amount:
          type: number
          format: float64
          description: Mention the on-demand transfer amount.
        remark:
          type: string
          description: Mention remarks if any for the on-demand transfer.
        tags:
          type: object
          description: Provide additional data fields using tags.
      required:
        - transfer_from
        - transfer_type
        - transfer_amount
    AdjustVendorBalanceResponse:
      title: AdjustVendorBalanceResponse
      description: Adjust Vendor Balance Response
      type: object
      properties:
        settlement_id:
          type: number
        transfer_details:
          $ref: '#/components/schemas/TransferDetails'
        balances:
          $ref: '#/components/schemas/BalanceDetails'
        charges:
          $ref: '#/components/schemas/ChargesDetails'
    BadRequestError:
      title: BadRequestError
      description: Invalid request received from client
      example:
        message: bad URL, please check API documentation
        code: request_failed
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
    TransferDetails:
      title: TransferDetails
      type: object
      example:
        vendor_id: test03
        transfer_from: VENDOR
        transfer_type: ADJUSTMENT
        transfer_amount: 10
        remark: Testing
        tags:
          - product: SHRT
          - size: 1
      properties:
        vendor_id:
          type: string
        transfer_from:
          type: string
        transfer_type:
          type: string
        transfer_amount:
          type: number
        remark:
          type: string
        tags:
          type: array
          items:
            type: object
            properties:
              product:
                type: string
              size:
                type: number
    BalanceDetails:
      title: BalanceDetails
      type: object
      example:
        merchant_id: 152707
        vendor_id: test03
        merchant_unsettled: 2442
        vendor_unsettled: 4757.42
      properties:
        merchant_id:
          type: number
        vendor_id:
          type: string
        merchant_unsettled:
          type: number
          format: float64
        vendor_unsettled:
          type: number
          format: float64
    ChargesDetails:
      title: ChargesDetails
      type: object
      example:
        service_charges: 2
        service_tax: 0.36
        amount: 10
        billed_to: MERCHANT
        is_postpaid: true
      properties:
        service_charges:
          type: number
          format: float64
        service_tax:
          type: number
          format: float64
        amount:
          type: number
          format: float64
        billed_to:
          type: string
        is_postpaid:
          type: boolean
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client app ID. You can find your app id in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XPartnerAPIKey:
      type: apiKey
      in: header
      name: x-partner-apikey
      description: >-
        If you are partner and you are making an api call on behalf of a
        merchant
    XClientSignatureHeader:
      type: apiKey
      in: header
      name: x-client-signature
      description: >-
        Use this if you do not want to pass the secret key and instead want to
        use signature
    XPartnerMerchantID:
      type: apiKey
      in: header
      name: x-partner-merchantid
      description: >-
        If you are partner use this to specify the merchant id if you don't have
        the merchant client app id

````