# Create Payout

This request allows you to create a payout to transfer funds from your account to another account or recipient.

<Note>
**Payout Methods Guide**

To see test guidelines and beneficiary information details that are needed for each integration, please refer to the Payout Methods guide.
</Note>

**POST** `/payouts`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Create Payout

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Body

Content type: `application/json`

- `account_id` (string, required)
  The unique identifier of the account. You find this information on [the WHITELABEL dashboard](https://dashboard.whitelabel.com/) (UUID, 36 chars.).
- `merchant_reference` (string, required)
  The unique identifier of the merchant's payout (MAX 255; MIN 3).
- `description` (string)
  The description of the payout (MAX 255; MIN 3).
- `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY", required)
  Country where the transaction must be processed (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
- `purpose` ("FAMILY_AND_FRIENDS" | "PERSONAL_TRANSFER" | "REMITTANCES" | "PROVIDER_SERVICES" | "ADVERTISING_SERVICES" | "REPRESENTATION_SERVICES" | "ADVISORY_SERVICES" | "FREELANCER_SERVICES" | "SUPPLIER" | "BUSINESS_TO_BUSINESS" | "MARKETPLACE" | "PAYROLL" | "GIFTS_AND_BENEFITS" | "EXPENSES" | "CORPORATE_PAYMENT" | "PURCHASE_OF _PHYSICAL_GOODS" | "PURCHASE_OF _DIGITAL_GOODS" | "PURCHASE_OF_SERVICES" | "INVESTMENTS" | "CAPITAL_CONTRIBUTION" | "INVESTMENTS_SHARES" | "TAXES" | "LOGISTICS_AND_TRANSPORTATION" | "DELIVERY" | "AFFILIATION_PROGRAM" | "LOANS" | "REAL_STATE" | "RENT" | "TRAVEL_FLIGHTS" | "TRAVEL_ACCOMMODATIONS" | "EDUCATION" | "TUITION_COSTS" | "TRAININGS" | "CHARITY" | "MEDICAL_SERVICES" | "SAVINGS" | "RETIREMENT" | "PENSION" | "INSURANCE" | "REWARDS" | "TRADEMARKS_AND_COPYRIGHT" | "ENTERTAINMENT" | "GOVERNMENT" | "OTHERS", required)
  Indicates the purpose for the payout. Possible enum values: Check the <a href='https://docs.whitelabel.com/reference/purposes-list'>Purpose list</a>.
- `amount` (object, required)
  Specifies the payout amount object, with the value and currency.
  - `value` (number, required)
    The payout amount (multiple of 0.0001).
  - `currency` (string, required)
    The currency used to make the payout. For a full list of currency codes, see [Country reference](/reference/country-reference) (MAX 3; MIN 3; ISO 4217).
- `beneficiary` (object, required)
  Specifies the beneficiary object with their identification.
  - `merchant_beneficiary_id` (string, required)
    Unique identifier of the recipient defined by the merchant (MAX 255; MIN 1).
  - `national_entity` ("INDIVIDUAL" | "ENTITY")
    Beneficiary's national entity type. Individual by default
  - `first_name` (string)
    Beneficiary's name (MAX 80).
  - `last_name` (string)
    Beneficiary's last name (MAX 80).
  - `legal_name` (string)
    Beneficiary's name (MAX 80). Only necessary when national entity is ENTITY.
  - `email` (string)
    The beneficiary's email (MAX 255; MIN 3).
  - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY", required)
    The beneficiary's country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
  - `date_of_birth` (string)
    The beneficiary's date of birth in the YYYY-MM-DD format (MAX 10; MIN 10).
  - `document` (object)
    Beneficiary's national document
    - `document_number` (string, required)
      The document number (MAX 40; MIN 3).
    - `document_type` ("DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC")
      Document type (MAX 6, MIN 1; [Country reference](/reference/country-reference)).
  - `phone` (object)
    Beneficiary's cell phone
    - `country_code` (string)
      The country calling code of the phone (MAX 3; MIN 1).  Check the [Country reference](/reference/country-reference) to see the phone codes.
    - `number` (string)
      The phone number, without the country code (MAX 32; MIN 1).
  - `address` (object)
    Beneficiary's address
    - `address_line_1` (string)
      The primary address line (MAX 255; MIN 3).
    - `address_line_2` (string)
      The secondary address line (MAX 255; MIN 1).
    - `city` (string)
      The city considered for the address (MAX 255; MIN 3).
    - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY")
      The country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
    - `state` (string)
      The state/province from the address (MAX 255; MIN 3).
    - `zip_code` (string)
      The zipcode for the address (MAX 11; MIN 4).
- `withdrawal_method` (object, required)
  The withdrawal method to make the payout.
  - `type` ("ASTROPAY_PAYOUT" | "CARD" | "NEQUI_PAYOUT" | "PAYPAL_PAYOUT" | "PIX_PAYOUT" | "AFIRME_PAYOUT" | "ECOMMPAY_PAYOUT" | "QI_PAYOUT" | "STP_PAYOUT" | "TRANSFIYA_PAYOUT" | "UNLIMINT_PAYOUT", required)
    Withdrawal method type.
  - `provider_id` ("ASTROPAY" | "NEQUI" | "PAYPAL" | "UNLIMINT", required)
    The provider to process the payouts with
  - `vaulted_token` (string)
    The vaulted token for a previously stored payment_method. If a payment is created using a vaulted_token (MAX: 64; MIN: 36).
  - `original_transaction_id` (string)
    Id of the referenced payment transaction. Only for payouts to CARD. (MAX 64; MIN 36)
  - `original_payment_id` (string)
    The id of the referenced payment (UUID; 36 chars.).
  - `on_hold` (boolean)
    Defines if the merchant wants to hold the payout and sets it to be processed later using the Release payout endpoint.
  - `detail` (object)
    Withdrawal method details. Only the object corresponding to the withdrawal method type is necessary.
    - `bank_transfer` (object)
      Bank transfer details to make the payout.
      - `code` (string, required)
        The beneficiary's specific financial institution code (MAX 8).
      - `branch` (string)
        The beneficiary's specific financial institution branch (MAX 8).
      - `branch_digit` (string)
        The beneficiary's specific financial institution branch digit (MAX 2).
      - `account` (object)
        Beneficiary's financial institution account number or financial institution account alias, such as Clabe for MX (MAX 255; MIN 3).
        - `number` (string, required)
          Beneficiary's bank account number or bank account alias, such as Clabe for MX (MAX 250; MIN 3)
        - `digit` (string)
          Beneficiary's bank account digit (MAX 250; MIN 3)
        - `type` ("CHECKINGS" | "SAVINGS" | "VISTA" | "PIX_EMAIL" | "PIX_PHONE" | "PIX_DOCUMENT_ID" | "PIX_BANK_ACCOUNT")
          Beneficiary's bank account type.
      - `address` (object)
        Bank transfer address details
        - `address_line_1` (string)
          The primary address line (MAX 255; MIN 3).
        - `address_line_2` (string)
          The secondary address line (MAX 255; MIN 1).
        - `city` (string)
          The city considered for the address (MAX 255; MIN 3).
        - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY" | "")
          The country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
        - `state` (string)
          The state/province from the address (MAX 255; MIN 3).
        - `zip_code` (string)
          The zipcode for the address (MAX 11; MIN 4).
    - `wallet` (object)
      Wallet details to make the withdrawal.
      - `code` (string)
        Beneficiary's wallet account identification code (MAX 3; MIN 250)
      - `email` (string)
        The Beneficiary's email (MAX 255; MIN 3)
      - `country` (string)
        The Beneficiary's country  (ISO 3166-1 MAX 2; MIN 2)
      - `document` (object)
        Wallet's owner national document associated to the withdrawal account.
        - `document_number` (string, required)
          The document number (MAX 40; MIN 3).
        - `document_type` ("DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC")
          Document type (MAX 6, MIN 1; [Country reference](/reference/country-reference)).
      - `phone` (object)
        Wallet's owner phone associated to the withdrawal account.
        - `country_code` (string)
          The country calling code of the phone (MAX 3; MIN 1).  Check the [Country reference](/reference/country-reference) to see the phone codes.
        - `number` (string)
          The phone number, without the country code (MAX 32; MIN 1).
- `metadata` (object[])
  Specifies a list of metadata objects. You can add up to 50 metadata objects.
  - `key` (string)
    The metadata key (MAX 48; MIN 1).
  - `value` (string)
    The metadata key value (MAX 512; MIN 1).

Example:

```json
{
  "account_id": "{{account_id}}",
  "merchant_reference": "test-reference",
  "description": "string",
  "country": "AR",
  "purpose": "FAMILY_AND_FRIENDS",
  "amount": {
    "value": "100",
    "currency": "USD"
  },
  "beneficiary": {
    "merchant_beneficiary_id": "test-beneficiary",
    "national_entity": "INDIVIDUAL",
    "first_name": "string",
    "last_name": "string",
    "legal_name": "string",
    "email": "string",
    "country": "AR",
    "date_of_birth": "string",
    "document": {
      "document_number": "string",
      "document_type": "DNI"
    },
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "address": {
      "address_line_1": "string",
      "address_line_2": "string",
      "city": "string",
      "country": "AR",
      "state": "string",
      "zip_code": "string"
    }
  },
  "withdrawal_method": {
    "type": "ASTROPAY_PAYOUT",
    "provider_id": "ASTROPAY",
    "vaulted_token": "string",
    "original_transaction_id": "string",
    "original_payment_id": "string",
    "on_hold": true,
    "detail": {
      "bank_transfer": {
        "code": "string",
        "branch": "string",
        "branch_digit": "string",
        "account": {
          "number": "string",
          "digit": "string",
          "type": "CHECKINGS"
        },
        "address": {
          "address_line_1": "string",
          "address_line_2": "string",
          "city": "string",
          "country": "AR",
          "state": "string",
          "zip_code": "string"
        }
      },
      "wallet": {
        "code": "string",
        "email": "string",
        "country": "string",
        "document": {
          "document_number": "string",
          "document_type": "DNI"
        },
        "phone": {
          "country_code": "string",
          "number": "string"
        }
      }
    }
  },
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}
```

## Responses

### 201

201

- `id` (string)
- `account_id` (string)
- `status` (string)
- `merchant_reference` (string)
- `purpose` (string)
- `country` (string)
- `description` (string)
- `amount` (object)
  - `currency` (string)
  - `value` (integer)
- `beneficiary` (object)
  - `merchant_beneficiary_id` (string)
  - `national_entity` (string)
  - `first_name` (string)
  - `last_name` (string)
  - `legal_name` (string)
  - `email` (string)
  - `country` (string)
  - `date_of_birth` (string)
  - `document` (object)
    - `document_type` (string)
    - `document_number` (string)
  - `phone` (object)
    - `country_code` (string)
    - `number` (string)
  - `address` (object)
    - `address_line_1` (string)
    - `address_line_2` (string)
    - `country` (string)
    - `state` (string)
    - `city` (string)
    - `zip_code` (string)
- `metadata` (any[])
- `created_at` (string)
- `updated_at` (string)
- `transactions` (object[])
  - `id` (string)
  - `status` (string)
  - `type` (string)
  - `response_code` (string)
  - `merchant_reference` (string)
  - `purpose` (string)
  - `description` (string)
  - `amount` (object)
    - `currency` (string)
    - `value` (integer)
  - `withdrawal_method` (object)
    - `type` (string)
    - `detail` (object)
      - `bank_transfer` (any)
      - `wallet` (object)
        - `code` (string)
        - `email` (any)
        - `country` (any)
        - `document` (any)
        - `phone` (any)
  - `provider_data` (object)
    - `id` (string)
    - `transaction_id` (string)
    - `account_id` (string)
    - `beneficiary_id` (string)
    - `status` (string)
    - `status_detail` (string)
    - `raw_response` (string)
  - `created_at` (string)
  - `updated_at` (string)

Example:

```json
{
  "id": "5223d101-0019-43d3-92cb-5c23391a7410",
  "account_id": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
  "status": "SUCCEEDED",
  "merchant_reference": "MR-Test-123",
  "purpose": "EXPENSES",
  "country": "BR",
  "description": "Test",
  "amount": {
    "currency": "BRL",
    "value": 100
  },
  "beneficiary": {
    "merchant_beneficiary_id": "test_merchant_deposit_id",
    "national_entity": "INDIVIDUAL",
    "first_name": "John",
    "last_name": "Doe",
    "legal_name": "John Doe",
    "email": "john.doe@email.com",
    "country": "BR",
    "date_of_birth": "1980-01-01",
    "document": {
      "document_type": "CPF",
      "document_number": "123456789"
    },
    "phone": {
      "country_code": "55",
      "number": "1234567890"
    },
    "address": {
      "address_line_1": "123 Main St",
      "address_line_2": "Apt 1",
      "country": "US",
      "state": "NY",
      "city": "New York",
      "zip_code": "10001"
    }
  },
  "metadata": [
    null
  ],
  "created_at": "2024-05-27T15:12:22.712914616Z",
  "updated_at": "2024-05-27T15:12:22.712916116Z",
  "transactions": [
    {
      "id": "f0642eb0-31cb-44bc-9dc6-03d55ff4d664",
      "status": "SUCCEEDED",
      "type": "PAYOUT",
      "response_code": "SUCCEEDED",
      "merchant_reference": "",
      "purpose": "",
      "description": "Test",
      "amount": {
        "currency": "BRL",
        "value": 100
      },
      "withdrawal_method": {
        "type": "ASTROPAY_PAYOUT",
        "detail": {
          "bank_transfer": null,
          "wallet": {
            "code": "h15sg84U6rCl",
            "email": null,
            "country": null,
            "document": null,
            "phone": null
          }
        }
      },
      "provider_data": {
        "id": "ASTROPAY",
        "transaction_id": "32373",
        "account_id": "",
        "beneficiary_id": "test_merchant_deposit_id",
        "status": "APPROVED",
        "status_detail": "APPROVED",
        "raw_response": "{\n  \"cashout_id\" : 32373,\n  \"merchant_cashout_id\" : \"f0642eb0-31cb-44bc-9dc6-03d55ff4d664\",\n  \"status\" : \"APPROVED\",\n  \"user_id\" : \"h15sg84U6rCl\"\n}"
      },
      "created_at": "2024-05-27T15:12:23.022588031Z",
      "updated_at": "2024-05-27T15:12:23.022588361Z"
    }
  ]
}
```

### 400

400

Example:

```json
{}
```