# Configure Payment Methods

When online sales features are used in the Instore application, payment and sales transactions can be made with two payment methods: "Pay with QR Code" and "Pay at Checkout". The "Pay with QR Code" payment method enables customers to make payments for items in their cart by scanning the QR code displayed on the Instore application screen or by clicking the payment link sent to their phones via SMS.

"Pay at Checkout" payment method allows customers to make payments for the items in their basket at the store cash register using the barcode photo shown on the Instore application screen or sent to their phone via SMS.

Information regarding the setup of the "Pay with QR" and "Pay at Checkout" payment methods are provided below.

## <mark style="color:red;">QR-Based Payment Installation​</mark> <a href="#qr-based-payment-installation" id="qr-based-payment-installation"></a>

If the online sales features are used in the Instore application, there is no need for installation for the "Pay with QR" payment option, as it becomes automatically active. However, to enable the auto-login and SMS functions, these features need to be activated in Omnitron.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FnAnYQvxk9wzHnJtlGBtO%2Fimage.png?alt=media&#x26;token=66eb4922-d0cf-4b5d-ab05-b743aade8564" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Pay with QR Auto-Login Function​</mark> <a href="#pay-with-qr-auto-login-function" id="pay-with-qr-auto-login-function"></a>

In order for customers to be directly redirected to their shopping carts when they scan or click on the QR code during the payment process, bypassing the need for customer login, the relevant setting needs to be enabled on Omnitron.

To do this, click on the **Sales Channels** in Omnitron, then navigate to **Sales Channel Settings** and access the *Dynamic Settings* screen. From the list of Dynamic Settings, locate the setting named "Checkout\_with\_token\_allow\_anonymous" and mark the value field as **Yes** to activate it.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FHruN40ePdMJ3F9Qy7GTu%2Fimage.png?alt=media&#x26;token=50ad36e8-d0c0-4fe0-a0cc-055831987a74" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FVkgroKXf6Pvl0Gytx2re%2Fimage.png?alt=media&#x26;token=d0bc433a-22f9-4b3d-8e5d-17e000331e54" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Pay with QR SMS Function​</mark> <a href="#pay-with-qr-sms-function" id="pay-with-qr-sms-function"></a>

To send the QR link generated by the Instore application as an SMS to customers' mobile phone numbers during the payment step, the relevant setup needs to be performed on Omnitron.

Access the Instore *Settings* screen in Omnitron's user panel by navigating to **Sales Channels > Sales Channel Settings** in the left menu. Within this screen, use the *Config Settings* section to enable the "Show Send SMS on Pay with QR Step" setting.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FDJ39pldpmKjb4KpU2LjP%2Fimage.png?alt=media&#x26;token=063130b6-a6a7-47d2-b9f8-4dfa3298f327" alt=""><figcaption></figcaption></figure>

After this step, it is necessary to create the SMS to be sent and its content. For this, open the *Mailing Templates* screen in Omnitron by navigating to **Sales Channels > Content Management > Mailing Templates**. By using the **New Mailing Template** button, create a new template and specify the content of the SMS to be sent, along with making the necessary settings.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2Fcty48EzbnjUxMZkm5y5e%2Fimage.png?alt=media&#x26;token=f522ea5b-a8aa-4639-b4b8-18253fac1733" alt=""><figcaption></figcaption></figure>

Enter the following information into the form that appears when you click on the **New Mailing Template** button:

* **Name**: Other
* **Name**: sms/orders/checkout\_url\_with\_token.html
* **Status**: Active
* **Language**: English
* **Content**: The SMS content that is desired to be sent with the {{ checkout\_url }} parameter included in it.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FDaUYS2jXsGXJ1gCdiyvI%2Fimage.png?alt=media&#x26;token=22294662-1e66-4b6c-9eb7-a25a7942da46" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Pay at Checkout Installation​</mark> <a href="#pay-at-checkout-installation" id="pay-at-checkout-installation"></a>

In order to enable payment and sales transactions through the store POS at the payment step in Instore application, installations should be performed on both Omnitron and POS sides.

On the **Sales Channels > Payment Management > Payment Options** screen in Omnitron, the **New Payment Option** button should be clicked and the "Pay at Checkout" payment method should be defined through the form that appears. After defining the payment option, it is mandatory for Omnishop's update services to be running in order for the changes to be applied. It takes about 10-15 minutes for the update to take place.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FV4n4quM1cYoFlH6P35dO%2Fimage.png?alt=media&#x26;token=ba6f3688-cf06-4de8-bdc6-efdfa3db16c0" alt=""><figcaption></figcaption></figure>

The form that opens up after clicking on the **New Payment Option** button should be filled with the following information:

* **Payment Type:** Cash Register
* **Payment Option Name:** Pay at Checkout
* **Payment Option Slug:** cash-register
* **Priority:** 0
* **Config:** {"rule":{"params":{"query":\[\["request**META**HTTP\_X\_STORE\_SECRET\_KEY","Store Secret Key"]]},"klass":"omnishop.payments.rules.LiquerRule"}}
* **Status:** Active

Store Secret Key authorization token can be obtained by sending a request to `/api/v1/application_settings/` with the token. The value is a unique hexadecimal UUID and is defined in the settings file. If it is not defined, it can be obtained by sending a post request to the same endpoint with the STORE\_SECRET\_KEY.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FcpkChl1VECnNHPmI5fAE%2Fimage.png?alt=media&#x26;token=f579888b-457c-479f-ab31-1d9137c91205" alt=""><figcaption></figcaption></figure>

After defining the "Pay at Checkout" payment method in Omnitron, integration should be done with the store's POS devices.

## <mark style="color:red;">Pay at Checkout SMS Function​</mark> <a href="#pay-at-checkout-sms-function" id="pay-at-checkout-sms-function"></a>

In order to send the barcode image created by the Instore application as an SMS to the customer's mobile phone number during the "Pay at the Cashier" payment step, the relevant setup needs to be performed on Omnitron.

Access the Instore *Settings* screen in Omnitron's user panel by navigating to **Sales Channels > Sales Channel Settings** in the left menu. Within this screen, use the *Config Settings* section to enable the "Show Send SMS on Pay with Barcode Step" setting.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2Fw8dp5JYqHZOY4NMDunNz%2Fimage.png?alt=media&#x26;token=b594bce0-05c1-447a-bec1-f4e1204c6d2c" alt=""><figcaption></figcaption></figure>

After this step, it is necessary to create the SMS to be sent and its content in Omnitron. To do this, open the *Mailing Templates* screen under **Content Management** in Omnitron. By using the **New Mailing Template** button, create a new template and specify the content of the SMS to be sent, along with configuring the necessary settings.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2F7GmNw0O7R3Cjj1j3Huqc%2Fimage.png?alt=media&#x26;token=79c6f90e-7778-4d1e-a81a-e5ad43c0dea4" alt=""><figcaption></figcaption></figure>

The form that opens up after clicking on the **New Payment Option** button should be filled with the following information:

* **Name:** Other
* **Name:** sms/orders/barcode.html
* **Status:** Active
* **Language:** English
* **Content:** The SMS content to be sent, which should include the parameter {{ barcode\_url }}.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FOoHQEwXoMUip9PNmExsN%2Fimage.png?alt=media&#x26;token=8ae742e7-c01e-4128-8b69-995130d1f6a0" alt=""><figcaption></figcaption></figure>
