# QNBPay Integration

## <mark style="color:red;">**Prerequisites**</mark>

### <mark style="color:red;">**Preliminary Works**</mark>

The following information is requested from the provider for the brand-specific and production (live) environment.

* **App ID**
* **App Secret**
* **Merchant Key**

## <mark style="color:red;">**Omnitron Settings**</mark>

This payment method’s configuration can be done on the **Payment Options & Add/Edit POS/Card Setting** pages on Omnitron. After the settings are completed, it will be accessible under a new tab on the checkout payment screen as it is a credit card type payment integration. Bin number must also be configured. For additional information, refer to the [POS Integrations](https://app.gitbook.com/s/IbwGN7KwvYi0iLbjtnXz/omnitron/sales-channels/payment-management/how-to-manage-pos-integrations-in-omnitron) tutorial.

### <mark style="color:red;">**POS Integration**</mark>

One POS integration must be defined in Omnitron to be specific for the extension installed. Explanations on how the settings should be made at this stage are in the table below.

| Field                 | Description                              |
| --------------------- | ---------------------------------------- |
| Name                  | QNB Pay                                  |
| Slug                  | qnb\_pay                                 |
| Gateway               | qnb\_pay                                 |
| Resource URL          | Requested URL from the provider          |
| Three D resource url  | Requested URL from the provider          |
| app\_id               | Requested App Id from the provider       |
| app\_secret           | Requested App Secret from the provider   |
| merchant\_key         | Requested Merchant Key from the provider |
| allowed\_md\_statuses | \["4", "3", "2", "1"]                    |
| three\_d\_enabled     | Yes                                      |

### <mark style="color:red;">**Payment Options**</mark>

Credit card payment option must be defined on Omnitron. Explanations on how the settings should be made at this stage are in the table below.

{% hint style="info" %}
Do not set more than one active payment option with the type “masterpass” or “credit card”.
{% endhint %}

| Field               | Description         |
| ------------------- | ------------------- |
| Payment Option      | Credit Card         |
| Payment Option Name | Any text you prefer |
| Payment Option Slug | credit\_card        |
| Config\*            | {}                  |

### <mark style="color:red;">**Card Integration**</mark>

At least one CARD integration must be defined in Omnitron to use credit card payment. Explanations on how the settings should be made at this stage are in the table below.

| Field                             | Description                   |
| --------------------------------- | ----------------------------- |
| Name                              | A related name                |
| Slug                              | A related slug                |
| Single payment POS infrastructure | Created POS in above          |
| Installment POS Infrastructure    | Created POS in above          |
| 3D POS Infrastructure             | Created POS in above          |
| Card Payment Type                 | Debit or Credit Card          |
| Card Type                         | The related created card type |
| Bank                              | The related created bank      |
| Commercial Card                   | Yes or No                     |

After creating a card, go to its detail and add bin numbers to it.

## <mark style="color:red;">**Additional Notes**</mark>

* If there is any error during the capture process, a void request will be sent, but it will not succeed. Nevertheless, the provider will cancel the payment after 15 minutes.
* For non-3D payment transactions with QNBPay, the status\_code and error\_code fields return **34**, accompanied by the error message: *'The payment integration method is not allowed. Please contact support.'* Non-3D payment transactions are not supported with QNBPay. QNBPay status codes can be found here: [QNBPay Status Codes](https://apidocs.qnbpay.com.tr/#/statuscodes/applicationstatuscodes).
