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

> This endpoint is used to create a card(prepaid,debit,credit). Only `USD` is supported for now.

### 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_holder_id" type="string" required>
  The id of the cardholder for the card.
</ParamField>

<ParamField body="product_code" type="string" required>
  Card product code.
</ParamField>

<ParamField body="balance_id" type="string" required>
  The ID of the account balance this card is associated with.<br />
  Only `USD`
</ParamField>

<ParamField body="card_limit" type="number" required>
  Initial Recharge 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_id" type="string">
      Unique Identifier for card.
    </ResponseField>

    <ResponseField name="card_status" type="string">
      Current card status.<br />
      One of `PENDING`, `ACTIVE`, `INACTIVE`, `BLOCKED`, `LOST`, `STOLEN`, `CLOSED`, `FAILED`
    </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/create' \
  -H 'content-type: application/json' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG' \
  --data-raw '{"card_holder_id":"65dd6638-5c23-4d9c-9672-1e7fd0fb0c14","product_code":"IC_VISA_491724","balance_id":"deaf719f-fc53-439e-bc39-dcc082c9ac28","card_limit":"100","unique_request_id":"QAF141412asdf212391"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "card_id": "84519f70-5414-473a-9bcf-8fa581e69adf",
          "card_status": "pending",
          "unique_request_id": "QAF14141cewadf112391"
      }
  }
  ```
</ResponseExample>
