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

# Create Dynamic QRCode

> Endpoint used to create a dynamic QRIS code for a specific amount

<RequestExample>
  ```bash Request Example theme={null}
  curl --request POST 'https://api.mayar.id/hl/v2/qr-codes/create' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data-raw '{
      "amount": 10000
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "success",
      "data": {
          "url": "https://media.mayar.id/images/resized/480/a1b2c3d4-e5f6-4789-a012-3456789abcde.png",
          "amount": 10000
      }
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v2/qr-codes/create
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v2/qr-codes/create
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Request Body

<ParamField body="amount" type="integer" required>
  Nominal payment amount (in IDR) to encode into the dynamic QRIS code.
</ParamField>

## Response

Successful Response

### Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code returned by the API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>

<ResponseField name="data" type="object">
  The generated dynamic QRIS object.
</ResponseField>

### data Structure (Object)

<ResponseField name="data.url" type="string">
  Link to the generated QR image file.
</ResponseField>

<ResponseField name="data.amount" type="integer">
  Nominal payment amount encoded into the QR code.
</ResponseField>
