> ## 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.

# Create a new payout

> This endpoint create a new payout to a beneficiary. The payout only supported the same currency between payer and beneficiary.

### 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 body="currency" type="string" required>
  Currency of the account balance.<br />
  Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
</ParamField>

<ParamField body="amount" type="string" required>
  Amount to be paid.
</ParamField>

<ParamField body="payout_reason" type="string" required>
  Reason for the payment instruction.
</ParamField>

<ParamField body="payout_reference" type="string">
  Bank payment reference to be shown on beneficiary's bank transaction history.
</ParamField>

<ParamField body="payment_date" type="string" required>
  Date when payment should be made.<br />
  `Format: YYYY-MM-DD`
</ParamField>

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

<ParamField body="is_payer" type="string" required>
  Whether the current user is a payer.<br />
  One of `Y`, `N`
</ParamField>

<ParamField body="payer_id" type="string">
  ID of the payer.
</ParamField>

<ParamField body="entity_type" type="string">
  Payer's entity type.<br />
  One of `individual`, `company`
</ParamField>

<ParamField body="company_name" type="string">
  Payer's company name.<br />
  `required`, if `entity_type` = `company`
</ParamField>

<ParamField body="first_name" type="string">
  Payer's first name.<br />
  `required`, if `entity_type` = `individual`
</ParamField>

<ParamField body="last_name" type="string">
  Payer's last name.<br />
  `required`, if `entity_type` = `individual`
</ParamField>

<ParamField body="birth_date" type="string">
  Payer's date of birth.<br />
  `Format: YYYY-MM-DD`<br />
  `required`, if `entity_type` = `individual`
</ParamField>

<ParamField body="country" type="string">
  Payer's country.<br />
  Two-letter [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code.
</ParamField>

<ParamField body="address" type="string">
  Payer's address.
</ParamField>

<ParamField body="city" type="string">
  Payer's city.
</ParamField>

<ParamField body="state_or_province" type="string">
  Payer's state or province.
</ParamField>

<ParamField body="postal_code" type="string">
  Payer's postal code.
</ParamField>

<ParamField body="identification_type" type="string">
  Payer's identification type. Depends on the value of `entity_type`.<br />

  | entity\_type | identification\_type                                |
  | ------------ | --------------------------------------------------- |
  | individual   | One of `passport`, `drivers_license`, `national_id` |
  | company      | Only `incorporation_number`                         |
</ParamField>

<ParamField body="identification_value" type="string">
  Payer's identification value.
</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>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/payouts/create' \
  -H 'content-type: application/json' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG' \
  --data-raw '{"currency":"SGD","amount":"50","payout_reason":"test","payout_reference":"test","payment_date":"2023-09-13","beneficiary_id":"83c43be5-44f0-4fb1-aa1a-ba8b05f3a3e5","is_payer":"Y","payer_id":"0"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "code": 200,
    "message": "Success",
    "data": {
        "amount": "100",
        "beneficiary_id": "56f3d71d-f732-44c8-8833-55536941e2b0",
        "create_time": "2023-10-23T17:49:08.090161+08:00",
        "currency": "USD",
        "id": "80f11927-ad7f-4182-817b-629a470330c3",
        "payer_id": "0",
        "payment_date": "2023-10-23T00:00:00+08:00",
        "reason": "test payout",
        "reference": "test payout",
        "short_reference": "P231023-TBPQBNDP",
        "status": "processing",
        "unique_request_id": "fdf26c91-27a1-42bb-9654-a69c744b3b34",
        "update_time": "2023-10-23T17:49:08.090161+08:00"
    }
  }
  ```
</ResponseExample>
