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

# Retrieve a beneficiary by id

> This endpoint returns a beneficiary based on the id.

### Header

<ParamField header="x-client-id" type="string" required>
  `x-client-id`.
</ParamField>

<ParamField header="x-auth-token" type="string" required>
  Bearer `YOUR_TOKEN_HERE`.
</ParamField>

### Parameters

<ParamField path="beneficiary_id" type="string" required>
  ID of the beneficiary.
</ParamField>

### Response

<ResponseField name="code" type="number">
  Indicates whether the call was successful. 200 if successful, 400 if not.
</ResponseField>

<ResponseField name="message" type="string">
  Response Message. "Success" if successful, others not.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="details" defaultOpen>
    <ResponseField name="beneficiary_id" type="string">
      ID of the beneficiary.
    </ResponseField>

    <ResponseField name="entity_type" type="string">
      Entity type of the beneficiary.<br />
      One of `company`, `individual`
    </ResponseField>

    <ResponseField name="payment_method" type="string">
      The payment method needs to be specified to ensure that accurate banking details are captured and validated for the specified payment method. This is required for timely and accurate delivery of funds to the beneficiary account.
    </ResponseField>

    <ResponseField name="beneficiary_email" type="string">
      Email of the beneficiary.
    </ResponseField>

    <ResponseField name="beneficiary_nickname" type="string">
      Nickname of the beneficiary.
    </ResponseField>

    <ResponseField name="beneficiary_company_name" type="string">
      Company name of the beneficiary.
    </ResponseField>

    <ResponseField name="beneficiary_summary" type="string">
      Summary of the beneficiary.
    </ResponseField>

    <ResponseField name="account_currency_code" type="string">
      Account currency code.<br />
      Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
    </ResponseField>

    <ResponseField name="bank_country_code" type="string">
      Bank country code.<br />
      Two-letter [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code.
    </ResponseField>

    <ResponseField name="beneficiary_first_name" type="string">
      First name of the beneficiary.
    </ResponseField>

    <ResponseField name="beneficiary_last_name" type="string">
      Last name of the beneficiary.
    </ResponseField>

    <ResponseField name="beneficiary_bank_details" type="object">
      Beneficiary's bank account details where the payment will be credited.

      <Expandable title="details">
        <ResponseField name="bank_name" type="string">
          Bank name of the beneficiary's bank account.
        </ResponseField>

        <ResponseField name="bank_address" type="string">
          Bank street address.
        </ResponseField>

        <ResponseField name="bank_country_code" type="string">
          Bank country code.<br />
          Two-letter [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code.
        </ResponseField>

        <ResponseField name="account_holder" type="string">
          Account holder name of the beneficiary’s bank account.
        </ResponseField>

        <ResponseField name="account_currency_code" type="string">
          Account currency code.<br />
          Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
        </ResponseField>

        <ResponseField name="account_number" type="object">
          Number of the account this beneficiary is associated with.
        </ResponseField>

        <ResponseField name="iban" type="string">
          International bank account number, mostly for european countries.
        </ResponseField>

        <ResponseField name="swift_code" type="string">
          Bank swift code.
        </ResponseField>

        <ResponseField name="clearing_system" type="string">
          Supported clearing systems to remit incoming funds to the account.
        </ResponseField>

        <ResponseField name="routing_code_type1" type="string">
          Routing code type.
        </ResponseField>

        <ResponseField name="routing_code_value1" type="string">
          Routing code value.
        </ResponseField>

        <ResponseField name="routing_code_type2" type="object">
          Routing code sub type.
        </ResponseField>

        <ResponseField name="routing_code_value2" type="object">
          Routing code sub type value.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="beneficiary_address" type="object">
      Beneficiary's address details.

      <Expandable title="details">
        <ResponseField name="country_code" type="string">
          Country code of the beneficiary.<br />
          Two-letter [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code.
        </ResponseField>

        <ResponseField name="city" type="string">
          City of the beneficiary.
        </ResponseField>

        <ResponseField name="street_address" type="string">
          Street address of the beneficiary.
        </ResponseField>

        <ResponseField name="postal_code" type="string">
          Postal code of the beneficiary.
        </ResponseField>

        <ResponseField name="state" type="string">
          State of the beneficiary.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/beneficiaries/c45a4e8e-5969-4609-8218-091f5db7287e' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "beneficiary_id": "c45a4e8e-5969-4609-8218-091f5db7287e",
          "entity_type": "company",
          "payment_method": "swift",
          "beneficiary_email": "demo@uqpay.com",
          "beneficiary_nickname": "MANY A-SUN",
          "beneficiary_company_name": "Courtesy Hardware Store",
          "beneficiary_summary": "USD account ending in 4557",
          "account_currency_code": "USD",
          "bank_country_code": "US",
          "beneficiary_bank_details": {
              "bank_name": "1ST STATE BANK",
              "bank_address": "4929 Briarwood Drive",
              "bank_country_code": "US",
              "account_holder": "Robert Shishani",
              "account_currency_code": "USD",
              "account_number": "4865393923574557",
              "iban": "",
              "swift_code": "230",
              "clearing_system": "SWIFT",
              "routing_code_type1": "",
              "routing_code_value1": "",
              "routing_code_type2": "",
              "routing_code_value2": ""
          },
          "beneficiary_address": {
              "country_code": "US",
              "city": "Montgomery",
              "street_address": "1230 Stafford Dr",
              "postal_code": "36117",
              "state": "Alabama"
          }
      }
  }
  ```
</ResponseExample>
