# Retrieve Payout by Merchant Reference

This request enables you to retrieve details of a payout based on the  `merchant_reference`, which needs to be provided as a query param.

**GET** `/payouts`

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

Retrieve Payout by Merchant Reference

## Authorization

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

## Query parameters

- `merchant_reference` (string, required)
  Identification of the payout defined by the merchant.

## Responses

### 200

200

- `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": "565c9733-000d-4066-a4bf-b084908dc74c",
    "account_id": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
    "status": "SUCCEEDED",
    "merchant_reference": "MR-Test-12345",
    "purpose": "",
    "country": "US",
    "description": "Test",
    "amount": {
      "currency": "USD",
      "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": "US",
      "date_of_birth": "1980-01-01",
      "document": {
        "document_type": "SSN",
        "document_number": "123-45-6789"
      },
      "phone": {
        "country_code": "1",
        "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:17:30.952178Z",
    "updated_at": "2024-05-27T15:17:32.901454Z",
    "transactions": [
      {
        "id": "bd594d5c-d7b7-48b1-9678-0b5052a69863",
        "status": "SUCCEEDED",
        "type": "ASTROPAY_PAYOUT",
        "response_code": "SUCCEEDED",
        "merchant_reference": "MR-Test-12345",
        "purpose": "",
        "description": "Test",
        "amount": {
          "currency": "USD",
          "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": "32376",
          "account_id": "",
          "beneficiary_id": "test_merchant_deposit_id",
          "status": "APPROVED",
          "status_detail": "APPROVED",
          "raw_response": "\"{\\n  \\\"cashout_id\\\" : 32376,\\n  \\\"merchant_cashout_id\\\" : \\\"bd594d5c-d7b7-48b1-9678-0b5052a69863\\\",\\n  \\\"status\\\" : \\\"APPROVED\\\",\\n  \\\"user_id\\\" : \\\"h15sg84U6rCl\\\"\\n}\""
        },
        "created_at": "2024-05-27T15:17:31.265607Z",
        "updated_at": "2024-05-27T15:17:32.901448Z"
      }
    ]
  }
]
```

### 400

400

Example:

```json
{}
```