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

# Create Payout

> This endpoint allows to initiate a payout process

### Body

<ParamField body="onBehalfOf" type="string" required>
  The identifier of the user or entity on whose behalf the payout is being made
</ParamField>

<ParamField body="amount" type="number">
  Amount to send in the source currency
</ParamField>

<ParamField body="source" type="object">
  Source payment details. Required if deductFromBalance is false

  <Expandable title="Source object">
    <ParamField body="paymentRail" type="string" required>
      The payment rail to use (e.g., "stellar")
    </ParamField>

    <ParamField body="currency" type="string" required>
      The source currency (e.g., "usdc")
    </ParamField>

    <ParamField body="address" type="string" required>
      The source wallet address
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="deductFromBalance" type="boolean" required>
  Whether to deduct the amount from the account balance
</ParamField>

<ParamField body="quoteId" type="string">
  Optional quote ID to use for exchange rate calculation. If provided, the exchange rate from the quote will be used. If not provided, the exchange rate will be calculated on the fly.
</ParamField>

<ParamField body="destination" type="object" required>
  Destination payment details. The structure depends on the destination type.

  <Expandable title="Destination object">
    <ParamField body="type" type="string" required>
      The destination type: "bank", "crypto\_wallet", or "qr\_code"
    </ParamField>

    <ParamField body="currency" type="string" required>
      The destination currency
    </ParamField>

    <ParamField body="details" type="object" required>
      Destination-specific details based on the type

      <Expandable title="Bank destination details">
        <ParamField body="country" type="string" required>
          Country code (e.g., "CO")
        </ParamField>

        <ParamField body="accountType" type="string" required>
          Type of bank account (e.g., "savings")
        </ParamField>

        <ParamField body="bankAccountNumber" type="string" required>
          Bank account number
        </ParamField>

        <ParamField body="bankCode" type="string" required>
          Bank code
        </ParamField>

        <ParamField body="beneficiary" type="object" required>
          Beneficiary information

          <Expandable title="Beneficiary object">
            <ParamField body="email" type="string" required>
              Beneficiary email address
            </ParamField>

            <ParamField body="documentType" type="string" required>
              Document type (e.g., "CC")
            </ParamField>

            <ParamField body="documentNumber" type="string" required>
              Document number
            </ParamField>

            <ParamField body="firstName" type="string" required>
              First name
            </ParamField>

            <ParamField body="lastName" type="string" required>
              Last name
            </ParamField>

            <ParamField body="phone" type="string" required>
              Phone number
            </ParamField>

            <ParamField body="city" type="string" required>
              City
            </ParamField>

            <ParamField body="state" type="string" required>
              State
            </ParamField>

            <ParamField body="address" type="string" required>
              Address
            </ParamField>

            <ParamField body="country" type="string" required>
              Country code
            </ParamField>

            <ParamField body="type" type="string" required>
              Beneficiary type
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>

      <Expandable title="Crypto wallet destination details">
        <ParamField body="chain" type="string" required>
          Blockchain network (e.g., "stellar")
        </ParamField>

        <ParamField body="address" type="string" required>
          Wallet address
        </ParamField>

        <ParamField body="memo" type="string" required>
          Memo or tag for the transaction
        </ParamField>
      </Expandable>

      <Expandable title="QR code id">
        <ParamField body="qrCodeId" type="string" required>
          QR code id obtained during the preview process
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful.
</ResponseField>

<ResponseField name="id" type="string">
  The id of the payout process. Use this id to check the status of the
  process
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://stablecoin-api.sandbox.getmeru.com/v1/payouts' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data-raw '{
      "onBehalfOf": "123",
      "amount": 1000,
      "source": {
          "paymentRail": "stellar",
          "currency": "usdc",
          "address": "123123"
      },
      "deductFromBalance": true,
      "quoteId": "efaaf971-6d8b-4f36-be36-187c9f68fc06",
      "destination": {
          "type": "bank",
          "currency": "cop",
          "details": {
              "country": "CO",
              "accountType": "savings",
              "bankAccountNumber": "1234567890",
              "bankCode": "876",
              "beneficiary": {
                  "email": "beneficiary@example.com",
                  "documentType": "CC",
                  "documentNumber": "12345678",
                  "firstName": "John",
                  "lastName": "Doe",
                  "phone": "+573001234567",
                  "city": "Bogotá",
                  "state": "Cundinamarca",
                  "address": "Calle 123 #45-67",
                  "country": "CO",
                  "type": "individual"
              }
          }
      }
  }'
  ```

  ```js Javascript theme={null}
  const response = await fetch('https://stablecoin-api.sandbox.getmeru.com/v1/payouts', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'api-key': '<api-key>'
    },
    body: JSON.stringify({
      onBehalfOf: "123",
      amount: 1000,
      source: {
        paymentRail: "stellar",
        currency: "usdc",
        address: "123123"
      },
      deductFromBalance: true,
      quoteId: "efaaf971-6d8b-4f36-be36-187c9f68fc06",
      destination: {
        type: "crypto_wallet",
        currency: "usdc",
        details: {
          chain: "stellar",
          address: "GCFXIZY4K5",
          memo: "123123"
        }
      }
    })
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "id": "3ddd0e5b-6276-4b48-b756-c1fcc9a2efd1"
  }
  ```
</ResponseExample>
