> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.weblium.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Connecting Square as a payment method

Square is an American financial services platform by _Block, Inc._ for small and medium-sized businesses. It enables accepting credit card payments using smartphones as POS registers, and facilitates various business operations.

||| ${color}[#f97700](Important:) Payment methods are available on websites with paid and Trial subscriptions.

# Connecting Square to your online store

1. [Sign up](https://squareup.com/signup) or [log in](https://squareup.com/login) to the existing account on Square:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-1_1c5iwm6.png)

2. Follow [this link](https://developer.squareup.com/apps) and whether select an existing application or create a new one:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-2_113ctgr.png)

3. Open your application, then go to the **Production** tab:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-3_nd9vbc.png)

4. Copy your **Access token**:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-4_1bz4nni.png)

5. Go to the **Your Store** section, then to the **Payment methods** subsection in your site settings on Weblium, and click on the **Add** button next to **Square**:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-5_s19s0z.png)

6. Paste your **Access token** to the corresponding field **(1)**:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-6_1u5tt9a.png)

7. Go back to your Square account, open the **Locations** tab, and copy your **Location ID**:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-7_k6krgg.png)

…and paste it in your Weblium account to the corresponding field **(2)**.

8. To the **Success redirect URL (3)** and **Failure redirect URL (4)** fields, you can add links to your custom success and failure pages you had created.

||| ${color}[#F97700](Important:) You should paste the links that start from `https://`.
| ${color}[#1AA900](Tip:) To know how to add pages, check [this guide](https://help.weblium.com/en-us/article/adding-pages-and-subpages-xbuaj2/). You can also learn how to customize a "Thank you" page in [this article](https://help.weblium.com/en-us/article/creating-a-thank-you-page-wc8zfu/).

9. In the **Payment reference** field **(5)**, you can specify additional data transferred to Square along with the order. You can click on the **Show variables** button:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/pereroblenij-portmone-angl-4_qcnjw6.png)

...and copy the variable from there, then paste it into the payment reference field. When ordering, instead of the specified variable, the required value will be substituted (order number, time, site domain, etc.) and transmitted as a payment description to Square:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/pereroblenij-portmone-angl-5_ju8f5v.png)

10. After all the fields are filled in correctly, save the changes:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-8_1tz44cy.png)

11. Return to the **Payment methods** section, and in the **Connected payment methods** subsection, make sure the switch next to the newly added Square is on:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-9_17vlwq2.png)

||| ${color}[#F97700](Important:) Your online store currency must match the one in your Square account.

12. [Publish](https://help.weblium.com/en-us/article/publishing-a-site-tgxmch/) your site for the changes to take effect.

# Connecting Square to work in test mode

You can connect Square in test mode to test the payment method's operation without using your bank card. To do this, you need to activate the test mode.

1. Go to your Square account, switch from the **Production** tab to the **Sandbox** tab, and copy the **Access token (1)** there:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-10_1pz8syg.png)

2.  Then open the **Locations** tab and copy your **Location ID (2)**:
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-11_1kzf15y.png)

3. Go back to Weblium, activate the **Test mode**, and paste those credentials to the corresponding fields **(1)** and **(2)** :
![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/square-12_pcgrue.png)

||| ${color}[#F97700](Important:) The non-test mode fields marked with an asterisk below must also be filled in. You can enter the same sandbox credentials there if you have not entered data for real payments.

4. Save changes and [publish](https://help.weblium.com/en-us/article/publishing-a-site-tgxmch/) your website.