> ## Documentation Index
> Fetch the complete documentation index at: https://magic-21.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Link Token

> Generate a Link Token.

### header

<ParamField path="checkout_id" type="string">
  The checkout ID that the merchant received in response to the POST Checkout request.
</ParamField>

<ParamField header="api-key" type="string">
  You will get this API key in the response of 'generate api key button' on merchant object.
</ParamField>

### Response

<ResponseField name="success" type="number">
  This Response field will return unique 'link\_token' and status code 200 if the transaction succeeds.
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request GET 'http://127.0.0.1:8000/api/merchants/checkout/{{checkout_id}}/generate_link_token' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "link_token": "mpch-76438abb114e80c0f52aecab51000d485f467cc5",
      "checkout_id": "ch-49056a5e920b4389a30e941a144c68c1"
  }
  ```
</ResponseExample>
