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

# 🇪🇺 EUR Payout

This endpoint allows you to send payouts in **Euros (EUR)** to recipients in any **SEPA country** (e.g., Germany, France, Spain).

## Endpoint

**POST:** `https://sandboxapi.me-cash.com/v2/payout`

## Request Details

### Headers

Include these headers in your request:

| **Header**     | **Value**          | **Required** |
| :------------- | :----------------- | :----------- |
| `Content-Type` | `application/json` | ✅ Yes        |
| `x-api-key`    | `YOUR_API_KEY`     | ✅ Yes        |

***

## Request Examples

Here are examples of how to make a EUR payout request in different languages.

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request POST 'https://sandboxapi.me-cash.com/v2/payout' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "recipient": {
      "firstName": "John",
      "lastName": "James",
      "address": "12 main",
      "type": "BUSINESS",
      "account": {
        "bankName": "Adria Bank",
        "bankCountry": "AU",
        "address": "15 Red street",
        "swiftCode": "3456765",
        "accountNumber": "34567876545",
        "iban": "123454"
      },
      "paymentChannel": "BANK_TRANSFER"
    },
    "quoteId": "c8182a2b-bc22-4323-8efc-a36f9ce6c4f0",
    "reason": "Gift",
    "remark": "test"
  }'
  ```

  ```javascript JavaScript (Fetch) theme={null}
  const url = 'https://sandboxapi.me-cash.com/v2/payout';

  const options = {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      recipient: {
        firstName: "John",
        lastName: "James",
        address: "12 main",
        type: "BUSINESS",
        account: {
          bankName: "Adria Bank",
          bankCountry: "AU",
          address: "15 Red street",
          swiftCode: "3456765",
          accountNumber: "34567876545",
          iban: "123454"
        },
        paymentChannel: "BANK_TRANSFER"
      },
      quoteId: "c8182a2b-bc22-4323-8efc-a36f9ce6c4f0",
      reason: "Gift",
      remark: "test"
    })
  };

  fetch(url, options)
    .then(res => {
      if (!res.ok) {
        throw new Error(`HTTP error! status: ${res.status}`);
      }
      return res.json();
    })
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
  ```

  ```python Python (Requests) theme={null}
  import requests
  import json

  url = "https://sandboxapi.me-cash.com/v2/payout"

  payload = {
      "recipient": {
          "firstName": "John",
          "lastName": "James",
          "address": "12 main",
          "type": "BUSINESS",
          "account": {
              "bankName": "Adria Bank",
              "bankCountry": "AU",
              "address": "15 Red street",
              "swiftCode": "3456765",
              "accountNumber": "34567876545",
              "iban": "123454"
          },
          "paymentChannel": "BANK_TRANSFER"
      },
      "quoteId": "c8182a2b-bc22-4323-8efc-a36f9ce6c4f0",
      "reason": "Gift",
      "remark": "test"
  }

  headers = {
      "x-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json"
  }

  try:
      response = requests.post(url, headers=headers, data=json.dumps(payload))
      response.raise_for_status()  # Raises an HTTPError for bad responses
      print(response.json())
  except requests.exceptions.HTTPError as err:
      print(f"HTTP Error: {err}")
  except requests.exceptions.RequestException as e:
      print(f"Request Error: {e}")
  ```

  ```javascript Node.js (Axios) theme={null}
  const axios = require('axios');

  const url = 'https://sandboxapi.me-cash.com/v2/payout';

  const data = {
    recipient: {
      firstName: "John",
      lastName: "James",
      address: "12 main",
      type: "BUSINESS",
      account: {
        bankName: "Adria Bank",
        bankCountry: "AU",
        address: "15 Red street",
        swiftCode: "3456765",
        accountNumber: "34567876545",
        iban: "123454"
      },
      paymentChannel: "BANK_TRANSFER"
    },
    quoteId: "c8182a2b-bc22-4323-8efc-a36f9ce6c4f0",
    reason: "Gift",
    remark: "test"
  };

  const config = {
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY'
    }
  };

  axios.post(url, data, config)
    .then(response => {
      console.log(response.data);
    })
    .catch(error => {
      console.error('Error:', error.response ? error.response.data : error.message);
    });
  ```
</CodeGroup>

***

### Request Body Breakdown

The following fields are required when making a **EUR payout request**.

| **Field**                         | **Type** | **Description**                                              | **Required** |
| :-------------------------------- | :------- | :----------------------------------------------------------- | :----------- |
| `quoteId`                         | String   | The unique ID of the quote for this payout.                  | ✅ Yes        |
| `reason`                          | String   | The purpose of the transfer (e.g., `Payment for services`).  | ✅ Yes        |
| `remark`                          | String   | An optional, additional note about the transaction.          | ✅ Yes        |
| `recipient`                       | Object   | An object containing the recipient's details.                | ✅ Yes        |
| `recipient.firstName`             | String   | The first name of the recipient.                             | ✅ Yes        |
| `recipient.lastName`              | String   | The last name of the recipient.                              | ✅ Yes        |
| `recipient.address`               | String   | The recipient's residential or business address.             | ✅ Yes        |
| `recipient.type`                  | String   | The type of recipient. Enum: `INDIVIDUAL`, `BUSINESS`.       | ✅ Yes        |
| `recipient.paymentChannel`        | String   | The payment method. Must be `BANK_TRANSFER` for EUR payouts. | ✅ Yes        |
| `recipient.account`               | Object   | An object containing the recipient's bank account details.   | ✅ Yes        |
| `recipient.account.bankName`      | String   | The name of the recipient's bank.                            | ✅ Yes        |
| `recipient.account.bankCountry`   | String   | The two-letter ISO country code of the recipient's bank.     | ✅ Yes        |
| `recipient.account.address`       | String   | The address of the recipient's bank branch.                  | ✅ Yes        |
| `recipient.account.swiftCode`     | String   | The Bank Identifier Code (SWIFT/BIC).                        | ✅ Yes        |
| `recipient.account.accountNumber` | String   | The recipient's local bank account number.                   | ✅ Yes        |
| `recipient.account.iban`          | String   | The recipient's International Bank Account Number (IBAN).    | ✅ Yes        |

***

## Success Response (200 OK)

If the payout is successfully created, the API returns the following response:

```json copy theme={null}
{
  "message": "Transaction created successfully",
  "status": "success",
  "data": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f1234567890a",
    "reason": "Gift",
    "remark": "test",
    "referenceNumber": "EUPAYOUT98765",
    "type": "SEND",
    "state": "COMPLETED",
    "quote": {
      "id": "c8182a2b-bc22-4323-8efc-a36f9ce6c4f0",
      "source": {
        "currency": "USD",
        "country": "US",
        "amount": 108.50
      },
      "target": {
        "currency": "EUR",
        "country": "AU",
        "amount": 100
      },
      "rate": 0.9216,
      "fee": {
        "amount": 3.00
      }
    },
    "recipient": {
      "firstName": "John",
      "lastName": "James",
      "address": "12 main",
      "type": "BUSINESS",
      "account": {
        "bankName": "Adria Bank",
        "bankCountry": "AU",
        "address": "15 Red street",
        "swiftCode": "3456765",
        "accountNumber": "34567876545",
        "iban": "123454"
      },
      "paymentChannel": "BANK_TRANSFER",
      "currency": "EUR",
      "country": "AU"
    },
    "created": "2025-09-19T10:15:30.123456Z",
    "processed": "2025-09-19T10:16:45.789101Z"
  }
}

```

***

## Response Breakdown

This section explains each field returned in a successful response.

| **Field**                              | **Type** | **Description**                                                 |
| :------------------------------------- | :------- | :-------------------------------------------------------------- |
| `message`                              | String   | A confirmation message indicating the result of the request.    |
| `status`                               | String   | The overall status of the request, e.g., `success`.             |
| `data`                                 | Object   | A container for all the transaction data.                       |
| `data.id`                              | String   | The unique identifier for this payout transaction.              |
| `data.remark`                          | String   | The remark or note that was provided in the request.            |
| `data.reason`                          | String   | The reason for the payout provided in the request.              |
| `data.referenceNumber`                 | String   | A unique reference number generated for the payout.             |
| `data.type`                            | String   | The type of transaction, e.g., `SEND`.                          |
| `data.state`                           | String   | The current state of the payout (`COMPLETED`, `PENDING`, etc.). |
| `data.quote`                           | Object   | Details of the financial quote used for this payout.            |
| `data.quote.id`                        | String   | The unique ID of the quote.                                     |
| `data.quote.source.currency`           | String   | The three-letter currency code of the source funds.             |
| `data.quote.source.country`            | String   | The two-letter country code of the transaction origin.          |
| `data.quote.source.amount`             | Number   | The amount of money in the source currency.                     |
| `data.quote.target.currency`           | String   | The three-letter currency code of the target funds.             |
| `data.quote.target.country`            | String   | The two-letter country code of the destination.                 |
| `data.quote.target.amount`             | Number   | The converted amount that the recipient will receive.           |
| `data.quote.rate`                      | Number   | The exchange rate applied to the transaction.                   |
| `data.quote.fee.amount`                | Number   | The transaction fee, in the source currency.                    |
| `data.recipient`                       | Object   | Details of the recipient.                                       |
| `data.recipient.firstName`             | String   | The first name of the recipient.                                |
| `data.recipient.lastName`              | String   | The last name of the recipient.                                 |
| `data.recipient.address`               | String   | The address of the recipient.                                   |
| `data.recipient.type`                  | String   | The type of recipient entity, e.g., `BUSINESS`.                 |
| `data.recipient.account.bankName`      | String   | The name of the recipient's bank.                               |
| `data.recipient.account.bankCountry`   | String   | The country code of the recipient's bank.                       |
| `data.recipient.account.address`       | String   | The address of the recipient's bank.                            |
| `data.recipient.account.swiftCode`     | String   | The recipient's Bank Identifier Code (SWIFT).                   |
| `data.recipient.account.accountNumber` | String   | The recipient's account number.                                 |
| `data.recipient.account.iban`          | String   | The recipient's International Bank Account Number.              |
| `data.recipient.paymentChannel`        | String   | The payment method used, e.g., `BANK_TRANSFER`.                 |
| `data.recipient.currency`              | String   | The currency received by the recipient.                         |
| `data.recipient.country`               | String   | The country of the recipient.                                   |
| `data.created`                         | String   | ISO 8601 timestamp of when the transaction was created.         |
| `data.processed`                       | String   | ISO 8601 timestamp of when the transaction was processed.       |

## **Payout Transaction States**

The payout transaction can have one of the following states:

| **State**   | **Description**                          |
| ----------- | ---------------------------------------- |
| `COMPLETED` | The payout was successfully processed.   |
| `PENDING`   | The payout is still being processed.     |
| `FAILED`    | The payout failed to process.            |
| `REFUNDED`  | The payout has been sent back to sender. |

***

***

## Error Handling

| **Status Code** | **Meaning**           | **Example Response**                   |
| :-------------- | :-------------------- | :------------------------------------- |
| `400`           | Insufficient Balance  | Insufficient Balance                   |
| `401`           | Unauthorized          | Invalid API key provided.              |
| `403`           | Forbidden             | IP not whitelisted                     |
| `404`           | Not Found             | The requested endpoint does not exist. |
| `422`           | Unprocessable Entity  | Invalid quote ID provided.             |
| `500`           | Internal Server Error | An internal error occurred.            |

***

## **Best Practices**

* ✅ Ensure `quoteId` is valid and linked to an existing quote.
* ✅ Confirm that the recipient’s **bank account number** and **bank code** are correct.
* ✅ Use a valid API key in the headers.
* ✅ Handle error responses correctly in your integration.
