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

# Withdraw a card

> This endpoint allows for withdrawals from the card balance.

### 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="card_number" type="string" required>
  Card number.
</ParamField>

<ParamField body="card_id" type="string" required>
  Unique Identifier for card.
</ParamField>

<ParamField body="amount" type="string" required>
  Withdrawal Amount.
</ParamField>

<ParamField body="unique_request_id" type="string" required>
  A unique request ID specified by the client. Requests with the same request\_id will be ignored. This allows requests to be replayed if client is unsure of the outcome, e.g. due to network issues, system failures, etc. Note: Can be non-UUID as long as it is unique between requests.<br />
  `Maximum Length 36`
</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="card_number" type="string">
      The parameter you passed in.
    </ResponseField>

    <ResponseField name="card_id" type="string">
      The parameter you passed in.
    </ResponseField>

    <ResponseField name="amount" type="string">
      The parameter you passed in.
    </ResponseField>

    <ResponseField name="unique_request_id" type="string">
      The parameter you passed in.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/cards/withdraw' \
  -H 'content-type: application/json' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG' \
  --data-raw '{"card_id":"fd9fd99a-bcdb-4ae6-860f-92e7c70ce41a","card_number":"9333019900054528","amount":"1","unique_request_id":"26c918bd-6605-4bc8-a7f4-797894865e76"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "amount": "1",
          "card_id": "fd9fd99a-bcdb-4ae6-860f-92e7c70ce41a",
          "card_number": "9333019900054528",
          "unique_request_id": "26c918bd-6605-4bc8-a7f4-797894865e76"
      }
  }
  ```
</ResponseExample>
