Installation and setup
Requirements
Section titled “Requirements”- CS-Cart or Multi-Vendor 4.17.2 or later.
- Administrator access to the store’s admin panel, and HTTPS on the storefront (Square’s card form, Apple Pay and Google Pay need it).
- A Square account. In the Square Developer Console create an application; it gives you an Application ID, a sandbox access token for testing and a production access token for live payments. Keep the page open, you need these values in step 2.
- A cron job on your server (see step 8).
Install the add-on
Section titled “Install the add-on”- Download the
kv_square_payments-<version>.zippackage from your Kavio Labs or CS-Cart Marketplace account. - In the admin panel, open Add-ons > Manage add-ons.
- Click the gear button and choose Manual installation, then upload the archive.
- Find Square Payments + POS Sync in the list and make sure its status is Active.
- Enter your license key under Settings > License (Kavio Labs downloads) and click Check now.
Connect Square
Section titled “Connect Square”- Open Orders > Square payments and the Connection tab, or Add-ons > Manage add-ons > Square Payments + POS Sync > Settings and click Connection.
- Choose Test (sandbox) mode. Enter the Application ID and the sandbox Access token of your Square application, then click Save and test. A green message names your Square location and its currency.
- With more than one location, choose the one that takes the payments and gets the stock sync in the Square location list, and save again. The shop must sell in that location’s currency.
- Instead of pasting a token you can use Connect with Square: register the OAuth redirect URL shown on the page in your Square application (OAuth page), enter the application’s secret in “Application secret (OAuth)” and click Connect with Square. The access token is renewed automatically.
- In the Square Developer Console open Webhooks and create a subscription for the sandbox with the Webhook notification URL shown on the Connection page and the events
payment.updated,refund.updated,inventory.count.updatedandcatalog.version.updated(addorder.created/order.updatedif you import POS orders). Copy the subscription’s signature key into Webhook signature key and save. The URL must match character for character. - Open Administration > Payment methods, add a method, choose the processor Square and activate it.
- Place a test order with a sandbox test card from Square’s documentation, check the order and the Square payment tab.
- Switch to Live mode, enter the live Application ID, the production access token (or connect through OAuth) and the live webhook signature key, save and test again. For Apple Pay, verify your domain in your Square account (Square gives you a domain verification file that must be served at
/.well-known/apple-developer-merchantid-domain-association). - For POS sync, see Configuration and open Orders > Square payments > POS sync.
- Add the cron job from the settings page (Cron section); every minute is fine. Overlapping runs are prevented.
Multi-Vendor
Section titled “Multi-Vendor”By default the marketplace owner connects one Square account for all payments (Marketplace owner mode on). The POS sync works per Square account and only with the products of the account’s own vendor, so in Multi-Vendor it needs the owner mode switched off: each vendor then connects their own Square account in the vendor panel (Connection tab). Vendors never see another vendor’s connection, queue or sync, and refunds, captures and voids in owner mode are done by the marketplace owner.
Update
Section titled “Update”- Upload the new package the same way. Your settings, credentials and data are kept.
- The add-on adds missing tables and settings by itself on the first request after the update.
See CHANGELOG for what changed in each version.
Uninstall
Section titled “Uninstall”Open Add-ons > Manage add-ons, click the add-on’s gear button and choose Uninstall. By default the add-on keeps its payment records, the Square connection and the POS sync links (so a later reinstall can still capture, void and refund payments); tick Delete payment records on uninstall in the settings first if you want them removed. Capture or void open authorizations before you uninstall. The uninstall clears the settings of the Square payment method itself, so after a reinstall open the payment method (Administration > Payment methods) and save it once.