> ## Documentation Index
> Fetch the complete documentation index at: https://lemoncash.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Money

> Initiate fiat money transfers to bank accounts.

## Usage

```typescript theme={null}
import { transferMoney, Currency } from '@lemoncash/mini-app-sdk';

const result = await transferMoney({
  amount: '5000',
  currency: Currency.ARS,
  name: 'John Doe',
  paymentDestinationInformation: {
    paymentId: '0000003100010000000001',
  },
});
```

## Parameters

```typescript theme={null}
type PaymentDestinationInformation = {
  paymentId: string;
  [key: string]: unknown;
};

type TransferMoneyData = {
  amount: string;
  currency: Currency;
  name?: string;
  paymentDestinationInformation: PaymentDestinationInformation;
}
```

<ParamField body="amount" type="string" required>
  The amount to transfer.
</ParamField>

<ParamField body="currency" type="Currency" required>
  The fiat currency for the transfer (e.g., `Currency.ARS`, `Currency.PEN`).
</ParamField>

<ParamField body="name" type="string">
  Optional recipient name.
</ParamField>

<ParamField body="paymentDestinationInformation" type="PaymentDestinationInformation" required>
  The payment destination information. Contains a required field `paymentId` (e.g. 'CBU/CVU' for Argentina or 'CCI' for Peru). Could include additional attributes for other countries banking systems.
</ParamField>

<Warning>
  The `paymentId` must be whitelisted by Lemon before it can be used. If you need to change or add a new `paymentId`, contact the Lemon team first — otherwise the transfer will fail.
</Warning>

## Returns

<CodeGroup>
  ```typescript TransferMoneyResponse theme={null}
  type TransferMoneyResponse = {
    result: TransactionResult.SUCCESS;
    data: {
      transferId: string;
    };
  } | {
    result: TransactionResult.FAILED;
    error: MiniAppError;
  } | {
    result: TransactionResult.CANCELLED;
  } | {
    result: TransactionResult.PENDING;
    data: {
      transferId: string;
    };
  }
  ```

  ```typescript SUCCESS icon="check" theme={null}
  {
    result: 'SUCCESS',
    data: {
      transferId: 'tx_abc123'
    }
  }
  ```

  ```typescript FAILED icon="ban" theme={null}
  {
    result: 'FAILED',
    error: {
      message: 'Insufficient balance',
      code: 'INSUFFICIENT_BALANCE'
    }
  }
  ```

  ```typescript CANCELLED icon="user-minus" theme={null}
  {
    result: 'CANCELLED',
  }
  ```

  ```typescript PENDING icon="clock" theme={null}
  {
    result: 'PENDING',
    data: {
      transferId: 'tx_pending456'
    }
  }
  ```
</CodeGroup>

<ResponseField name="result" type="TransactionResult">
  The result of the transfer attempt.

  * `SUCCESS`: The transfer was successful.
  * `FAILED`: The transfer failed.
  * `CANCELLED`: The transfer was cancelled by the user.
  * `PENDING`: The transfer is pending confirmation.
</ResponseField>

<ResponseField name="data" type="object">
  Contains the transfer identifier. Present when the result is `SUCCESS` or `PENDING`.

  * `transferId`: The unique identifier of the transfer.
</ResponseField>

<ResponseField name="error" type="MiniAppError">
  Contains the error information when the transfer fails. Only present when the result is `FAILED`.

  * `message`: The error message.
  * `code`: The error code.
</ResponseField>

## Demo

<div className="w-screen px-0 relative left-1/2 right-1/2 -mx-[50vw]">
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/lemoncash/ZwZzL1RY2KfZTKJh/assets/videos/demo-transfer-money.mp4?fit=max&auto=format&n=ZwZzL1RY2KfZTKJh&q=85&s=8bf3770b86bbf7331e35023c36c35632" data-path="assets/videos/demo-transfer-money.mp4" />
</div>

## Related Functions

<CardGroup cols={2}>
  <Card title="Deposit" icon="arrow-down-right" href="/functions/deposit">
    Deposit funds to your Mini App Wallet.
  </Card>

  <Card title="Withdraw" icon="arrow-up-right" href="/functions/withdraw">
    Withdraw funds from your Mini App Wallet.
  </Card>
</CardGroup>
