> For the complete documentation index, see [llms.txt](https://developer.paywall.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.paywall.one/payment-orchestration-integration-document/linkqr-service/1.-generate.md).

# 1. Generate

## Generate LinkQr Payment

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/api/paywall/linkqr/generate`

{% hint style="info" %}
**Important**: In order to use this service, you need to send the '**apikeypublic**' and '**apiclientpublic**' parameters in the 'Header' field.\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

| Parameter       | Type   | Compulsory | Description                                                   |
| --------------- | ------ | ---------- | ------------------------------------------------------------- |
| apikeypublic    | string | Yes        | The Public Key you have obtained from the merchant panel.     |
| apiclientpublic | string | Yes        | Public Client that you have obtained from the merchant panel. |

**Parameters that should be sent to the service are as follows:**

| Parameter           | Type    |        |                                                                                                                                              |
| ------------------- | ------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| SalesType           | int     | Yes    | <p>Sales type.</p><p>1 -> Product</p><p>2 -> Service</p>                                                                                     |
| PhotoBase64         | string  | Yes/No | <p>Supported for all sales types. Required for the Product, not required for the Service</p><p><mark style="color:red;">Max 4MB</mark></p>   |
| ItemName            | string  | Yes    | Product/Service name                                                                                                                         |
| ItemDescription     | string  | Yes    | Product/Service description                                                                                                                  |
| ItemAmount          | decimal | Yes    | Product/Service amount                                                                                                                       |
| CurrencyId          | int     | Yes    | <p>Currency<br><a href="https://paywall.gitbook.io/en/system-data/currencies"><https://paywall.gitbook.io/en/system-data/currencies></a></p> |
| StockTrack          | bool    | Yes    | It is determined whether there will be stock support or not.                                                                                 |
| StockCount          | int     | No     | Stock quantity                                                                                                                               |
| CallbackSupport     | bool    | Yes    | Successful payment results are POSTed as feedback to an address                                                                              |
| CallbackAddress     | string  | No     | Address to send feedback on successful payment results                                                                                       |
| InstallmentSupport  | bool    | Yes    | Do you support payment installments?                                                                                                         |
| NotificationSupport | bool    | Yes    | Send notification link to payment?                                                                                                           |
| NotificationEmail   | string  | No     | E-mail to which payment link will be notified                                                                                                |
| NotificationPhone   | string  | No     | The phone number to which the payment link will be notified                                                                                  |
| MerchantOrderId     | string  | No     | Order information to be included in the feedback to be sent for successful payments                                                          |
| MerchantTrackId     | string  | No     | Tracking information to be included in the feedback to be sent for successful payments                                                       |

**An example JSON to be sent to the service is as follows:**

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
    "SalesType": 2,
    "PhotoBase64": "",
    "ItemName": "Test ürünü",
    "ItemDescription": "Test ürün açıklaması",
    "ItemAmount": 100.50,
    "CurrencyId": 1,
    "StockTrack": true,
    "StockCount": 10,
    "CallbackSupport": true,
    "CallbackAddress": "https://callback.paywall.one/method",
    "InstallmentSupport": false,
    "NotificationSupport": true,
    "NotificationEmail": "support@itspaywall.com",
    "NotificationPhone": "5554443322",
    "MerchantOrderId": "UAMDIURUAE24",
    "MerchantTrackId": "ADKFIAXKZ8895AA"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**The parameters returned from the service are as follows:**

| Parameter | Type   | Description                                                                                                                    |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| ErrorCode | int    | Error code. If the operation is successful, it returns '0'.                                                                    |
| Result    | bool   | Returns True or False. Transaction successful request returns 'true'                                                           |
| Message   | string | If the operation is wrong, this is the message about the error, it provides language support according to the local parameter. |
| Body      | string | Returns the payment link under the link parameter                                                                              |

**An example JSON:**

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Link": "https://dev-link.itspaywall.com/?SaleId=cb6955c8-e1cf-47d2-bf4c-66f010e8c30f"
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
